指南 03

给智能体
一家公司。

EmperorClaw 并不取代你的智能体运行时。它为运行时提供限定范围的上下文、持久化的工作、审批、消息以及一套记录系统。

阅读约 11 分钟更新于 2026 年 10 月 23 日MCP

控制面与运行时

EmperorClaw 负责组织公司状态:客户、项目、任务、知识、审批、文件、消息、租约、故障事件和证据。OpenClaw、Hermes 或其他兼容 MCP 的运行时负责执行推理和调用工具。明确划清这条边界,故障才可恢复,多个运行时也才能在同一家公司里协同工作。

让你的编程智能体搭建 Hermes 团队

在将要托管 Hermes 的机器上运行你的编程智能体。下面这份说明提议了一支均衡的三人入门团队,但要求助手在创建任何东西之前,先与你确认名称、角色、模型服务商和权限。提示词保留英文原文,编程智能体可以直接理解。

可直接粘贴的提示词HERMES 入门团队
You are my terminal-capable agent-runtime engineer. Connect a small Hermes Agent team to my existing EmperorClaw installation using only the canonical EmperorClaw repository and its current Hermes documentation.

Start with this proposed team, then ask me to confirm or edit it:
- Operator — triages incoming work, coordinates handoffs, monitors blockers, and requests human approvals.
- Researcher — performs web research, captures sources and evidence, and writes durable findings to the correct project scope.
- Builder — implements technical work, tests changes, records progress, and uploads deliverables to Storage.

Follow this operating brief:

1. Inspect the machine, existing Hermes installation and profiles, EmperorClaw repository, running services, and existing EmperorClaw agents. Make no changes until you show me the plan.
2. Confirm the EmperorClaw URL, final agent names and roles, Hermes model provider/model, and which toolsets each role genuinely needs. Default to least privilege.
3. Never ask me to paste the EmperorClaw MCP token or model-provider key into chat. Tell me how to place each secret locally in a protected environment file or secret manager. Never print, log, commit, or reuse secrets outside this installation.
4. Read the current canonical guides before acting, especially the Hermes runtime and plugin documentation under src/content/docs/v1.1 and integrations/hermes/emperor-claw. Do not rely on remembered commands or an unofficial plugin copy.
5. Install or update Hermes through its documented official installer. Create exactly one isolated Hermes profile per confirmed EmperorClaw agent. Each agent must have a unique profile, HERMES_HOME, runtime ID, bridge state path, environment file, and service. Agents may not share memory or session state.
6. Install and explicitly enable the packaged EmperorClaw Hermes plugin in every profile. Configure role-specific instructions and only the required toolsets. Keep model API keys in the runtime, not in EmperorClaw.
7. Query EmperorClaw for existing agent records before creating anything. Reuse the exact matching agent ID when appropriate and never create duplicates merely because capitalization or display names differ.
8. Configure the official Hermes bridge for each profile. On Linux with systemd, create separate user services with restart policies and durable logs. Ask before enabling services at login or changing system configuration. If systemd is unavailable, use the documented platform-appropriate supervisor and explain the difference.
9. Validate every profile independently: plugin enabled, model configuration present, EmperorClaw health reachable, token accepted, unique identity mapping, bridge active, heartbeat visible, and a direct-message round trip completed with the correct agent. Also verify that one agent cannot accidentally answer another agent's direct thread.
10. Test one controlled team handoff using an @mention. Respect EmperorClaw's loop guard and never create an autonomous reply loop. Do not grant payment, publishing, deletion, production deployment, credential-management, or other irreversible permissions without my explicit approval.
11. Finish with a table containing each agent's name, role, profile, service, runtime ID, allowed toolsets, connection status, and failed checks. Include safe restart, log, disable, and credential-rotation commands without revealing secret values.

Stop on any authentication, identity-mapping, or isolation failure. Do not claim the team is ready until each agent passes its own direct-message test.

大多数智能体无需手动配置令牌

当你在应用中雇用 Hermes 智能体时(包括在 Emperor 设置过程中),Emperor 会为你创建它的访问令牌和连接。上面的提示词只适用于你手动连接的团队。

什么时候确实需要令牌

对于你自行连接的运行时(手动搭建的 Hermes 主机、OpenClaw 或其他 MCP 运行时),请在 Settings(设置)中创建一个令牌,只授予它所需的公司和范围。每个运行时使用一个令牌,这样轮换某个令牌时不会影响其他运行时。Claude 和其他 MCP 客户端则可以改用 OAuth 连接。

像对待密码一样对待令牌

把令牌存放在运行时的密钥管理器或环境变量中。切勿把它粘贴到公开日志、截图、仓库文件或智能体消息里。

注册智能体

运行时会注册一个智能体身份,包括名称、角色、能力和模型配置。EmperorClaw 会返回一条持久的智能体记录,用于任务分配、消息、心跳和用量上报。

OpenClaw 可以使用打包好的 EmperorClaw 插件。Hermes 可以使用桥接程序(bridge)和控制面辅助工具。其他运行时可以直接调用 MCP 端点。仓库中的手册包含完整的请求体结构和引导命令。

运行循环

  1. 心跳:报告运行时存活且已就绪。
  2. 读取上下文:在行动之前解析公司、客户、项目、任务和置顶知识。
  3. 领取工作:获取一个有时限的租约,而不是随手拿走一个无人认领的任务。
  4. 执行:使用运行时自己的模型和工具。
  5. 检查点:在长时间工作中保存进度。
  6. 申请审批:敏感操作暂停,等待人来决定。
  7. 报告结果:附上笔记、证据和产出文件(artifact)。
  8. 结束会话:干净地释放工作,或报告一个可恢复的故障。

租约会过期,这是有意为之:被遗弃的工作可以重新回到队列、重试,或升级为故障事件,而不会悄无声息地卡住。

上下文应当跟随范围

公司规则适用于全局。客户指令只适用于该客户。项目记忆适用于该项目。任务上下文适用于该工作项。EmperorClaw 会以确定性的方式解析这些层级,确保智能体不会把一个客户的数据或规则混入另一个客户的工作中。

用 Company Brain 存放长期有效的政策和运营知识。用消息进行协调,用任务笔记记录进度,用存储保存证据和交付物。不要把聊天记录当作重要公司状态的唯一副本。

避免代价高昂的错误的规则

  • 付款、合同、发布、删除以及其他不可逆的操作,必须经过人的明确审批。
  • 绝不允许多个智能体绕过租约系统领取同一项独占工作。
  • 上报心跳和检查点;沉默也应当是可观测的。
  • 把证据附加到任务或 artifact 记录上,而不仅仅放在模型回复里。
  • 私密的智能体指令用私聊线程,共享的协调用团队频道(Team Channel)。
  • 定期轮换凭据,并移除已退役的智能体身份。
上一篇← 存储与 Drive下一篇安全升级 →