我如何使用开源 HarnessRouter + 一个 Grok Bot 处理个人工作并服务企业客户 大多数人把多智能体系统看作“一个大机器人”,或一堆互不相连的工具。我最终采用的模式有所不同:让一个长期运行的协调者(Grok Bot,或具备记忆、例行任务和共享计算机的同类智能体)充当唯一的对话界面,再通过 HarnessRouter,把专业工作分派给最适合这项任务的外部智能体运行框架。 HarnessRouter 是实现 Unified Harness Protocol(UHP)的开源(Apache-2.0)基础设施层。它提供一个兼容 OpenAI Responses 的 API,可在各自的原生运行环境中驱动 Codex、Claude Code、Hermes、DeepSeek Harness、Pi、Grok Build,以及另外大约二十多种智能体运行框架。会话、流式传输、文件交换、取消操作和错误处理都已标准化,因此协调者不必为每个专业执行者学习一种新的集成方式。 真正有效的架构 Grok Bot 始终担任编排者。它决定需要做什么,将工作拆分成步骤,并携带选定的 harness_id(和模型)调用 HarnessRouter。每项委派任务都在各自独立的 HarnessRouter 会话中运行,使用对应运行框架的工具、技能、智能体循环和沙箱。结果和文件通过同一套接口约定返回,随后协调者继续与用户对话,或触发下一步。 这与启动更多 Grok Bot 有明确区别。这些外部执行者不是 Grok 生态系统中的额外机器人,而是保留各自原生优势的独立运行框架。 个人使用 处理日常工作时,我在自己掌控的机器上自托管运行 HarnessRouter: docker run -d --name harnessrouter \ -p 127.0.0.1:3000:3000 \ -v harnessrouter:/data \ harnessrouter/harnessrouter 首次启动并安装各个运行框架的 CLI 后,我通过控制台添加服务提供商密钥,并生成一个 API 密钥。随后,Grok Bot(或我自己的智能体)调用 Responses 端点,在元数据中传入所需的运行框架。典型的个人工作流程如下: - 研究或长上下文分析交给 DeepSeek Harness 或 Claude Code。 - 大量编码或重构工作交给 Codex 或 Pi。 - 仪表板或报告生成分开处理:在一个运行框架上做分析,在另一个上完成实现,最后回到协调者的浏览器中验证。 - 定期检查(收件箱分类处理、状态摘要、监控)仍作为 Grok Bot 的例行任务;只有繁重工作才会委派出去。 由于一切都采用自托管方式,密钥也保留在我的基础设施中,个人数据绝不会离开我掌控的环境。出于成本或质量考虑切换运行框架或模型,只需修改元数据,无须重写。 企业客户 同样的模式也能顺畅地扩展到客户场景,只是多了几项约束,而自托管恰好能很好地解决这些问题。 数据控制与合规。企业客户关心代码、文档和对话历史存放在哪里。在他们的 VPC、专用 VPS 或本地部署的机器上运行 Community Edition,意味着他们的密钥、状态、工作区和文件绝不会接触第三方云,除非他们明确选择托管式 HarnessRouter Cloud 方案。两种部署方式都使用同一套 UHP 接口约定,因此先在 Cloud 上试点,之后也能迁移到自托管,而不必更改集成。 专业分工,不被绑定。不同团队偏好的模型和工具各不相同。法务或研究团队可能看重 Claude Code 的优势;工程团队可能更喜欢用 Codex 或 Grok Build 处理代码仓库工作;数据团队则可能把分析任务路由给 DeepSeek Harness。协调者(通常是客户专属的 Grok Bot,或由我们搭建的定制智能体)为每项任务或每个例行流程选择运行框架。客户既能为每项工作使用最合适的工具,又始终只需与一个界面交互。 第 1 部分,共 2 部分
看原文
How I Use Open Source HarnessRouter + a Grok Bot For Personal Work and Corporate Clients Most people treat multi-agent systems as either “one big bot” or a pile of disconnected tools. The pattern I’ve settled on is different: keep a long-lived coordinator (Grok Bot or an equivalent agent with memory, routines, and a shared computer) as the single conversation interface, then farm specialized work out to the best external harness for the job through HarnessRouter. HarnessRouter is the open-source (Apache-2.0) infrastructure layer that implements the Unified Harness Protocol (UHP). It exposes one OpenAI Responses-compatible API that can drive Codex, Claude Code, Hermes, DeepSeek Harness, Pi, Grok Build, and roughly two dozen other agent harnesses in their native runtimes. Sessions, streaming, file exchange, cancellation, and error handling are standardized, so the coordinator never has to learn a new integration for each specialist. The Architecture That Actually Works Grok Bot stays the orchestrator. It decides what needs to happen, breaks the work into steps, and calls HarnessRouter with a chosen harness_id (and model). Each delegated task runs inside its own HarnessRouter session with that harness’s tools, skills, agent loop, and sandbox. Results and files come back through the same contract, and the coordinator continues the conversation with the user or triggers the next step. This is explicitly different from spawning more Grok Bots. The external workers are not additional bots inside the Grok ecosystem; they are independent harnesses that keep their native strengths. Personal Use For day-to-day work I run HarnessRouter self-hosted on a machine I control: docker run -d --name harnessrouter \ -p 127.0.0.1:3000:3000 \ -v harnessrouter:/data \ harnessrouter/harnessrouter After the first launch installs the harness CLIs, I add provider keys through the console and generate an API key. The Grok Bot (or my own agent) then calls the Responses endpoint, passing the desired harness in metadata. A typical personal flow looks like this: - Research or long-context analysis goes to DeepSeek Harness or Claude Code. - Heavy coding or refactoring goes to Codex or Pi. - Dashboard or report generation is split: analysis on one harness, implementation on another, then verification back in the coordinator’s browser. - Recurring checks (inbox triage, status digests, monitoring) stay as Grok Bot routines; only the heavy lifting is delegated. Because everything is self-hosted and keys stay on my infrastructure, personal data never leaves the environment I control. Switching harnesses or models for cost or quality is a metadata change, not a rewrite. Corporate Clients The same pattern scales cleanly for clients, with a few extra constraints that self-hosting solves well. Data control and compliance. Corporate clients care about where code, documents, and conversation history live. Running the Community Edition on their VPC, a dedicated VPS, or an on-prem machine means their keys, state, workspaces, and files never touch a third-party cloud unless they explicitly choose the managed HarnessRouter Cloud option. The same UHP contract works in both places, so a pilot on Cloud can later move to self-hosted without changing the integration. Specialization without lock-in. Different teams have different preferred models and tools. A legal or research team may want Claude Code’s strengths; an engineering team may prefer Codex or Grok Build for repository work; a data team may route analytical tasks to DeepSeek Harness. The coordinator (often a client-specific Grok Bot or a custom agent we stand up) chooses the harness per task or per routine. Clients get the best tool for each job while still talking to one interface. 1 of 2