cerredz/HarnessHub

GitHub: cerredz/HarnessHub

一个帮助开发者在模型之外拥有完整控制权的 LLM Agent 构建框架,提供 manifest 驱动的 harness 架构和丰富的预置能力。

Stars: 1 | Forks: 0

# Harnessiq Harnessiq 是一个 Python SDK,用于构建具有 manifest 支持的 harness、provider 支持的工具工厂以及可编写脚本的 CLI 的持久化、工具使用型 agent。 下面的 agent、provider 和 CLI 表格由 `python scripts/sync_repo_docs.py` 从实时仓库代码生成。 ## 安装 ``` pip install harnessiq ``` 基于此仓库进行本地开发: ``` pip install -e . ``` ## 快速开始 ``` from harnessiq.tools import ECHO_TEXT, create_builtin_registry registry = create_builtin_registry() result = registry.execute(ECHO_TEXT, {"text": "hello"}) print(result.output) ``` ## 动态工具选择 Harnessiq 默认保持静态工具路径。当你需要在每一轮中缩减庞大的工具范围时,可以通过 `AgentRuntimeConfig.tool_selection` 或 `--dynamic-tools` CLI 标志启用动态工具选择。 有关运行时契约、CLI 标志、embedding-model 配置以及现有工具键与 Python-only 自定义 callable 之间的边界,请参阅 `docs/dynamic-tool-selection.md`。 ## Google Cloud 集成 Harnessiq 提供了专用的 Google Cloud 部署接口,用于将 manifest 支持的 harness 作为 Cloud Run jobs 运行,而无需引入第二套运行时模型。 - `harnessiq gcloud init` 在 `~/.harnessiq/gcloud/.json` 下为每个逻辑 agent 保存一份 JSON 部署配置,包括 region、Artifact Registry、Cloud Run、Scheduler、model-selection、sink 和 parameter 设置。 - `harnessiq gcloud health` 和 `harnessiq gcloud credentials check` 验证操作员前置条件,例如 `gcloud` CLI、活跃身份验证、ADC、所需 API 以及 Secret Manager 访问权限。 - `harnessiq gcloud credentials ...` 复用仓库本地的 harness 凭证绑定,并通过 `status`、`sync`、`set` 和 `remove` 流程将运行时 secrets 同步到 Secret Manager。 - 基于 manifest 的部署规范派生自 harness manifest 和已保存的配置文件状态,因此远程运行会保留 model selection、runtime/custom parameters、adapter arguments、sink specs、provider families 和声明的持久化 memory 文件。 - `build`、`deploy`、`schedule` 和 `execute` 涵盖了 Cloud Build、Cloud Run Jobs 和 Cloud Scheduler 生命周期,而 `logs` 和 `cost` 提供运行时可观测性和月度成本估算。 - Cloud Run 运行时封装器在执行前后将 harness memory 目录同步到 GCS,保留 harness 原生的持久化状态,而不是将所有内容扁平化为单个 blob。 - GCloud 命令族输出 JSON 并在 mutating 操作上支持 `--dry-run`,因此它可以在 CI 和操作员工具中编写脚本。 ## 实时快照 | Metric | Count | | --- | --- | | 具体 harness manifest | 10 | | 顶层 CLI 命令 | 24 | | 已注册 CLI 命令路径 | 199 | | 模型 provider | 4 | | 服务 provider 包 | 27 | | 仅工具的外部服务接口 | 1 | | 内置 sink 类型 | 10 | | 测试模块 | 135 | ## Agent 矩阵 | Harness | CLI | Import | Memory Root | Runtime Params | Custom Params | Providers | | --- | --- | --- | --- | --- | --- | --- | | Exa Outreach | `outreach` | `harnessiq.agents.exa_outreach:ExaOutreachAgent` | `memory/outreach` | max_tokens, reset_threshold | - | exa, resend | | Email Campaign | `email` | `harnessiq.agents.email:EmailCampaignAgent` | `memory/email` | max_tokens, reset_threshold, batch_size, recipient_limit | open-ended | resend | | Instagram Keyword Discovery | `instagram` | `harnessiq.agents.instagram:InstagramKeywordDiscoveryAgent` | `memory/instagram` | max_tokens, recent_result_window, recent_search_window, reset_threshold, search_result_limit | open-ended | playwright | | Knowt Content Creator | - | `harnessiq.agents.knowt:KnowtAgent` | `memory/knowt` | max_tokens, reset_threshold | - | creatify | | Leads Agent | `leads` | `harnessiq.agents.leads:LeadsAgent` | `memory/leads` | max_tokens, reset_threshold, prune_search_interval, prune_token_limit, search_summary_every, search_tail_size, max_leads_per_icp | - | apollo, arcads, arxiv, attio, browser_use, coresignal, creatify, exa, expandi, hunter, inboxapp, instantly, leadiq, lemlist, lusha, outreach, paperclip, peopledatalabs, phantombuster, proxycurl, resend, salesforge, serper, smartlead, snovio, zerobounce, zoominfo | | LinkedIn Job Applier | `linkedin` | `harnessiq.agents.linkedin:LinkedInJobApplierAgent` | `memory/linkedin` | max_tokens, reset_threshold, action_log_window, linkedin_start_url, notify_on_pause, pause_webhook | open-ended | playwright | | Mission Driven | - | `harnessiq.agents.mission_driven:MissionDrivenAgent` | `memory/mission_driven` | max_tokens, reset_threshold | mission_goal, mission_type | - | | Google Maps Prospecting | `prospecting` | `harnessiq.agents.prospecting:GoogleMapsProspectingAgent` | `memory/prospecting` | max_tokens, reset_threshold | qualification_threshold, summarize_at_x, max_searches_per_run, max_listings_per_search, website_inspect_enabled, sink_record_type, eval_system_prompt | playwright | | Research Sweep | `research-sweep` | `harnessiq.agents.research_sweep:ResearchSweepAgent` | `memory/research_sweep` | max_tokens, reset_threshold | query, allowed_serper_operations | serper | | Spawn Specialized Subagents | - | `harnessiq.agents.spawn_specialized_subagents:SpawnSpecializedSubagentsAgent` | `memory/spawn_specialized_subagents` | max_tokens, reset_threshold | objective, available_agent_types | - | ## Provider 接口 Harnessiq 目前随附 4 个 model-provider 适配器,27 个位于 `harnessiq/providers/` 下的 service provider 包,以及 1 个位于 provider 包树之外的仅工具外部服务接口。 ### 模型 Provider | Provider | Package | | --- | --- | | anthropic | `harnessiq/providers/anthropic/` | | openai | `harnessiq/providers/openai/` | | grok | `harnessiq/providers/grok/` | | gemini | `harnessiq/providers/gemini/` | ### 服务 Provider | Family | Ops | Provider Package | Tool Factory | | --- | --- | --- | --- | | apollo | 13 | `harnessiq/providers/apollo` | `harnessiq/tools/apollo/operations.py` | | arcads | 10 | `harnessiq/providers/arcads` | `harnessiq/tools/arcads/operations.py` | | arxiv | 4 | `harnessiq/providers/arxiv` | `harnessiq/tools/arxiv/operations.py` | | attio | 7 | `harnessiq/providers/attio` | `harnessiq/tools/attio/operations.py` | | browser_use | 43 | `harnessiq/providers/browser_use` | `harnessiq/tools/browser_use/operations.py` | | coresignal | 9 | `harnessiq/providers/coresignal` | `harnessiq/tools/coresignal/operations.py` | | creatify | 58 | `harnessiq/providers/creatify` | `harnessiq/tools/creatify/operations.py` | | exa | 15 | `harnessiq/providers/exa` | `harnessiq/tools/exa/operations.py` | | expandi | 22 | `harnessiq/providers/expandi` | `harnessiq/tools/expandi/operations.py` | | google_drive | 10 | `harnessiq/providers/google_drive` | `harnessiq/tools/google_drive/operations.py` | | hunter | 14 | `harnessiq/providers/hunter` | `harnessiq/tools/hunter/operations.py` | | inboxapp | 9 | `harnessiq/providers/inboxapp` | `harnessiq/tools/inboxapp/operations.py` | | instantly | 75 | `harnessiq/providers/instantly` | `harnessiq/tools/instantly/operations.py` | | leadiq | 12 | `harnessiq/providers/leadiq` | `harnessiq/tools/leadiq/operations.py` | | lemlist | 34 | `harnessiq/providers/lemlist` | `harnessiq/tools/lemlist/operations.py` | | lusha | 40 | `harnessiq/providers/lusha` | `harnessiq/tools/lusha/operations.py` | | outreach | 65 | `harnessiq/providers/outreach` | `harnessiq/tools/outreach/operations.py` | | paperclip | 48 | `harnessiq/providers/paperclip` | `harnessiq/tools/paperclip/operations.py` | | peopledatalabs | 11 | `harnessiq/providers/peopledatalabs` | `harnessiq/tools/peopledatalabs/operations.py` | | phantombuster | 15 | `harnessiq/providers/phantombuster` | `harnessiq/tools/phantombuster/operations.py` | | proxycurl | 11 | `harnessiq/providers/proxycurl` | `harnessiq/tools/proxycurl/operations.py` | | salesforge | 22 | `harnessiq/providers/salesforge` | `harnessiq/tools/salesforge/operations.py` | | serper | 10 | `harnessiq/providers/serper` | `harnessiq/tools/serper/operations.py` | | smartlead | 48 | `harnessiq/providers/smartlead` | `harnessiq/tools/smartlead/operations.py` | | snovio | 23 | `harnessiq/providers/snovio` | `harnessiq/tools/snovio/operations.py` | | zerobounce | 22 | `harnessiq/providers/zerobounce` | `harnessiq/tools/zerobounce/operations.py` | | zoominfo | 12 | `harnessiq/providers/zoominfo` | `harnessiq/tools/zoominfo/operations.py` | ### 仅工具的外部接口 | Family | Ops | Tool Surface | | --- | --- | --- | | resend | 64 | `harnessiq/tools/resend.py` | ## CLI 生成的命令目录位于 `artifacts/commands.md`。请将其用作实时命令树的高信噪比参考。 | Command | Direct Subcommands | Description | | --- | --- | --- | | harnessiq agents | list, show | Inspect registered harness manifests | | harnessiq connect | confluence, discord, google_sheets, linear, mongodb, notion, obsidian, slack, supabase | Configure a global output sink connection | | harnessiq connections | list, remove, test | Inspect or manage configured sink connections | | harnessiq credentials | bind, show, test | Manage persisted harness credential bindings | | harnessiq email | configure, get-recipients, prepare, run, show | Manage and run the email campaign agent | | harnessiq export | - | Export ledger entries in a structured format | | harnessiq gcloud | build, cost, credentials, deploy, execute, health, init, logs, schedule | Manage Google Cloud deployment configuration and operations | | harnessiq inspect | email, exa_outreach (outreach), instagram, knowt, leads, linkedin, mission_driven, prospecting, research_sweep (research-sweep), spawn_specialized_subagents | Inspect one harness manifest and generated CLI surface | | harnessiq instagram | configure, get-emails, prepare, run, show | Manage and run the Instagram keyword discovery agent | | harnessiq leads | configure, prepare, run, show | Manage and run the leads discovery agent | | harnessiq linkedin | configure, init-browser, prepare, run, show | Manage and run the LinkedIn agent | | harnessiq logs | - | Inspect the local audit ledger | | harnessiq models | add, export, import, list, remove, show, validate | Manage reusable provider-backed model profiles | | harnessiq outreach | configure, prepare, run, show | Manage and run the ExaOutreach agent | | harnessiq prepare | email, exa_outreach (outreach), instagram, knowt, leads, linkedin, mission_driven, prospecting, research_sweep (research-sweep), spawn_specialized_subagents | Prepare and persist generic config for a harness | | harnessiq prompts | activate, clear, current, list, search, show, text | Inspect bundled master prompts | | harnessiq prospecting | configure, init-browser, prepare, run, show | Manage and run the Google Maps prospecting agent | | harnessiq providers | list, show | Inspect provider-backed tool families | | harnessiq report | - | Build a cross-agent report from the local ledger | | harnessiq research-sweep | configure, prepare, run, show | Manage and run the ResearchSweepAgent harness | | harnessiq run | email, exa_outreach (outreach), instagram, knowt, leads, linkedin, mission_driven, prospecting, research_sweep (research-sweep), spawn_specialized_subagents | a harness through the platform-first CLI | | harnessiq show | email, exa_outreach (outreach), instagram, knowt, leads, linkedin, mission_driven, prospecting, research_sweep (research-sweep), spawn_specialized_subagents | Show persisted platform config and harness state | | harnessiq stats | agent, export, instance, rebuild, session, summary | Inspect local stats and analytics snapshots | | harnessiq tools | families, import, list, show, validate | Inspect the registered HarnessIQ tool catalog | ## 仓库文档 - `docs/agent-runtime.md`: Runtime loop、manifest 和持久化参数部分。 - `docs/dynamic-tool-selection.md`: 在静态运行时工具接口之上进行可选的逐轮工具缩减。 - `docs/gcloud.md`: Google Cloud 部署工作流、凭证同步以及 GCS 支持的运行时 memory 连续性。 - `docs/tools.md`: Tool registry 组成和 provider 支持的工具使用。 - `docs/output-sinks.md`: Ledger/output-sink 注入和 sink 连接命令。 - `docs/linkedin-agent.md`: LinkedIn harness 使用和浏览器会话工作流。 - `docs/leads-agent.md`: Leads harness memory 模型和 CLI 工作流。 - `artifacts/file_index.md`: 实时仓库的生成架构图。 - `artifacts/commands.md`: 生成的 CLI 命令目录。
标签:AI基础设施, API集成, Claude, Cloud Run, CVE检测, DLL 劫持, Google Cloud, GPT, LLM开发框架, Python SDK, 上下文管理, 动态工具选择, 可观测性, 大语言模型, 工具调用, 控制层, 数字取证, 文档结构分析, 漏洞管理, 编排引擎, 自动化脚本, 逆向工具