AI 技术编年史 2026:合成数据成为主力训练源
2026 年合成数据(Synthetic Data)上升为大模型训练主力来源:方法论、架构、趋势、风险与 GitHub 生态,中英文对照。
2026 年合成数据(Synthetic Data)上升为大模型训练主力来源:方法论、架构、趋势、风险与 GitHub 生态,中英文对照。
2026 年全场景边缘通用大模型(Edge Universal LLM):手机、PC、IoT、车载统一模型栈,中英文对照。
2026 年 AI 自主驱动科学实验闭环:从假设到执行到分析的全链路自动化,中英文对照。
2026 年约 40% 企业软件内置任务型 Agent(Task Agent)的趋势分析:架构、场景、优缺点与 GitHub 生态,中英文对照。
2026 年行业 AI MVP 标准化部署方法论:从 PoC 到生产的可复用模板与治理框架,中英文对照。
最后更新 | Last updated: 2026-06-06
中文
个人 Agent 常见四种部署拓扑:
flowchart TB
subgraph A["模式 A:本地 Loopback"]
LAP[笔记本 localhost]
LAP --> GW1[Gateway 仅本机]
end
subgraph B["模式 B:VPS + 消息平台"]
VPS[$5 VPS 长驻]
PHONE[手机 Telegram/WhatsApp]
PHONE --> VPS
end
subgraph C["模式 C:分离式 Gateway/执行"]
GWM[Gateway 机 — 仅消息]
EXE[执行机 — Docker/SSH]
GWM -->|SSH| EXE
end
subgraph D["模式 D:Serverless(Hermes)"]
GWH[Hermes Gateway]
MOD[Modal / Daytona]
GWH --> MOD
end
| 模式 | OpenClaw | Hermes | 适用 |
|---|---|---|---|
| A 本地 | gateway.bind: loopback |
Gateway 默认不暴露 HTTP | 最安全开发 |
| B VPS | openclaw onboard --install-daemon |
hermes gateway install |
最常见生产 |
| C 分离 | sandbox + remote node | terminal.backend: ssh |
高安全 |
| D Serverless | — | Modal/Daytona 后端 | 低闲置成本 |
English
Four deployment patterns: local loopback (safest dev), VPS + messaging (most common prod), split gateway/execution (high security), serverless backends (Hermes Modal/Daytona for near-zero idle cost).
中文
Linux / macOS / WSL2 / Android (Termux):
1 | curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash |
Windows 原生(PowerShell):
1 | iex (irm https://hermes-agent.nousresearch.com/install.ps1) |
Windows 推荐路径:WSL2 内运行 bash 安装脚本 — 与 Linux 生产环境一致。
Termux(Android):直接在手机上运行 Agent,适合轻量 Gateway + Telegram Bot。注意电量与后台进程限制。
| 组件 | 说明 |
|---|---|
| uv | Python 包管理 |
| Python 3.11 | 经 uv 安装,无需 sudo |
| Node.js v22 | 浏览器自动化、WhatsApp bridge |
| ripgrep | 快速文件搜索 |
| ffmpeg | TTS 音频转换 |
| 仓库克隆 | ~/.hermes/hermes-agent/ |
| 全局命令 | ~/.local/bin/hermes |
| 方式 | 代码位置 | 数据目录 |
|---|---|---|
| Git 安装器(用户) | ~/.hermes/hermes-agent/ |
~/.hermes/ |
| pip install | site-packages | ~/.hermes/ |
| sudo 系统安装 | /usr/local/lib/hermes-agent/ |
每用户 ~/.hermes/ 或 $HERMES_HOME |
1 | hermes setup # 完整配置向导 |
hermes setup --portal 覆盖:模型 Provider + web search + image gen + TTS + cloud browser — 最低摩擦无人值守路径。
English
Install via curl script (Linux/macOS/WSL2/Termux) or PowerShell (native Windows; WSL2 preferred). Installer bundles Python, Node, ripgrep, ffmpeg. Run hermes setup --portal for fastest OAuth + Tool Gateway setup.
1 | # 管理员一次性(Debian/Ubuntu) |
English
For systemd service accounts: admin installs Playwright system deps; service user runs installer with --skip-browser if headless only. Verify with hermes doctor.
中文
1 | npm install -g openclaw@latest |
| 步骤 | 作用 |
|---|---|
npm install -g |
全局 CLI + Gateway |
onboard --install-daemon |
引导式配置 + 系统服务(launchd/systemd) |
dashboard |
浏览器控制台 http://127.0.0.1:18789/ |
工作区默认:~/.openclaw/workspace/(SOUL.md、AGENTS.md 等)
主配置:~/.openclaw/openclaw.json
English
npm install -g openclaw@latest, then openclaw onboard --install-daemon for guided setup and daemon install. Control UI at http://127.0.0.1:18789/. Workspace at ~/.openclaw/workspace/.
中文
Telegram 是两框架 上手最快 的渠道之一:Bot Token 申请简单、无需企业资质、长轮询即可运行。
1 | hermes gateway setup |
生产建议:
TELEGRAM_ALLOWED_USERS 或启用 DM pairingterminal.backend: dockerTELEGRAM_HOME_CHANNEL 用于 Cron 投递1 | { |
通过 openclaw dashboard 或 onboard 向导配置。
| 渠道 | 上手难度 | Hermes | OpenClaw |
|---|---|---|---|
| Telegram | ★☆☆ | 内置 Adapter | 内置 |
| Discord | ★★☆ | 内置 | 内置 |
| ★★★ | Cloud API / Baileys | 内置 bridge | |
| iMessage | ★★★★ | BlueBubbles | 内置 + Nodes |
| 企业微信/飞书 | ★★★ | 内置 | 插件 |
English
Telegram is the fastest channel for both frameworks. Hermes: hermes gateway setup + allowlist/pairing. OpenClaw: channels.telegram in openclaw.json with dmPolicy: pairing.
中文
1 | hermes gateway install # 用户级 systemd/launchd |
PID 文件:~/.hermes/gateway.pid(Profile 作用域)
后台任务并行运行:Cron 调度(60s tick)、会话过期、记忆 flush、Provider 缓存刷新。
openclaw onboard --install-daemon 安装 launchd/systemd 服务。
1 | { |
远程访问:Tailscale 或 SSH 隧道 — 避免直接公网暴露 18789。
English
Hermes: hermes gateway install (user or --system service). OpenClaw: daemon via onboard. Bind loopback or enable auth; use Tailscale/SSH for remote access.
中文
1 | hermes claw migrate |
一键从 ~/.openclaw/ 导入:
| 导入项 | 目标 |
|---|---|
| SOUL.md | Hermes 人格 / global SOUL |
| MEMORY.md / USER.md | 持久记忆条目 |
| skills/ | ~/.hermes/skills/ |
| API Keys | .env 映射 |
| 消息/Gateway 设置 | Hermes 平台配置 |
迁移后仍需:
1 | hermes model # 确认 Provider |
适用场景:已有龙虾部署、想叠加 Hermes 学习闭环,或社区 HermesClaw 双栈实验。
English
hermes claw migrate imports SOUL, memory, skills, API keys, and messaging config from ~/.openclaw/. Follow with hermes model, hermes gateway setup, and hermes doctor.
中文
1 | hermes doctor |
检查项包括:
1 | openclaw security audit |
覆盖:入站访问、工具爆炸半径、网络暴露、文件权限、插件策略漂移。
| 操作 | OpenClaw | Hermes |
|---|---|---|
| 健康诊断 | Gateway 日志 + security audit | hermes doctor |
| 安全审计 | openclaw security audit --deep |
doctor + Tirith + 审批配置 |
| 更新 | npm update -g openclaw |
hermes update(自动检测安装方式) |
| 配置检查 | 手动编辑 openclaw.json | hermes config check / migrate |
English
hermes doctor for health and supply-chain advisories. openclaw security audit [--deep] [--fix] for OpenClaw hardening. hermes update auto-detects install method.
中文
1 | pip install -e '.[acp]' # 或在标准安装后 |
| 编辑器 | 配置 |
|---|---|
| VS Code | ACP Client 扩展 → acp.agents.Hermes Agent |
| Zed | ACP Registry → uvx --from 'hermes-agent[acp]' hermes-acp |
| JetBrains | 指向 acp_registry/ |
ACP 使用 hermes-acp 精选 toolset:文件、终端、web、memory、skills、delegate_task — 不含 cronjob、messaging delivery。
审批选项:allow_once / allow_session / allow_always / deny
1 | hermes acp --setup-browser --yes # 可选浏览器工具 |
English
hermes acp for VS Code, Zed (via ACP Registry + uv), JetBrains. Curated toolset for editor workflows. Configure credentials first with hermes model.
中文
Hermes 提供 Batch Runner、ShareGPT 轨迹导出、Atropos RL 集成与断点续跑,面向工具调用模型微调。OpenClaw 会话存于 sessions/*.jsonl,可手动提取但无内置 RL 管线。
English
Hermes: batch runner, ShareGPT export, Atropos RL. OpenClaw: jsonl transcripts only — no built-in RL pipeline.
中文
OpenClaw 通过 Web Control UI 配对 iOS/Android Nodes(Canvas、相机、语音)。Hermes 无原生 Node,以 Telegram/WhatsApp 等消息平台作「口袋助理」;Android 可用 Termux 自托管。需手机硬件深度集成选 OpenClaw Nodes;纯消息 + Cron 选 Hermes Gateway。
English
OpenClaw nodes: canvas, camera, voice via Control UI pairing. Hermes: messaging platforms or Termux on Android — no native mobile SDK.
中文
高安全生产拓扑:
1 | ┌─────────────────────┐ SSH ┌─────────────────────┐ |
Hermes 配置:
1 | terminal: |
OpenClaw:sandbox 配置 + remote node 模式。
English
Split trust: Gateway host for messaging only; execution host via SSH/Docker sandbox. Hermes: terminal.backend: ssh. OpenClaw: sandbox + remote nodes.
中文
| 频率 / 硬化项 | Hermes | OpenClaw |
|---|---|---|
| 每日 | Gateway 日志 / Cron 输出 | Dashboard 会话 |
| 每周 | hermes doctor、command_allowlist |
security audit |
| 每月 | hermes update、轮换 Key |
npm 更新、审计 Skills |
| Allowlist / 配对 | 平台 allowlist + DM pairing | dmPolicy: pairing + dmScope |
| 执行隔离 | terminal.backend: docker/ssh |
sandbox + tools.profile |
| 服务化 | hermes gateway install |
onboard --install-daemon |
| 审计 | hermes doctor |
security audit --deep --fix |
| 插件/供应链 | Cron enabled_toolsets |
plugins.allow + shrinkwrap |
English
Routine ops: logs, weekly doctor/audit, monthly updates and key rotation. Production: allowlists, pairing, sandboxed execution, gateway services, and supply-chain checks for both frameworks.
中文
| 问题 | Hermes 解决 | OpenClaw 解决 |
|---|---|---|
hermes: command not found |
source ~/.bashrc;检查 ~/.local/bin |
检查 npm global bin PATH |
| API key 未设置 | hermes model 或 hermes setup --portal |
onboard 向导 |
| Gateway 不响应 | hermes gateway stop && start;查 PID |
重启 daemon;查 18789 |
| Telegram 无回复 | 检查 allowlist / pairing | dmPolicy、bot token |
| 配置迁移失败 | hermes config check → migrate |
手动合并 openclaw.json |
| 模块导入错误 | 用 venv 的 hermes,非系统 Python |
重装 npm 包 |
| Cron 不触发 | hermes gateway 必须运行;cron status |
Gateway cron 配置 |
| 浏览器工具失败 | hermes acp --setup-browser |
Playwright 依赖 |
| 供应链告警 | hermes doctor --ack |
security audit |
English
Common fixes: PATH for hermes, credentials via hermes model/setup --portal, gateway restart, pairing/allowlists for Telegram, config migrate for Hermes, security audit for OpenClaw. Run hermes doctor / hermes status or openclaw security audit --deep for guided diagnosis.
| 操作 | OpenClaw(龙虾) | Hermes Agent |
|---|---|---|
| 安装 | npm install -g openclaw@latest |
curl -fsSL .../install.sh | bash |
| 初始化 | openclaw onboard --install-daemon |
hermes setup / setup --portal |
| 控制 UI | openclaw dashboard |
CLI TUI + 各平台聊天 |
| 启动 Gateway | daemon 自动 | hermes gateway start |
| 系统服务 | onboard --install-daemon |
hermes gateway install |
| 换模型 | Runtime 配置 | hermes model / /model |
| 安全审计 | openclaw security audit |
hermes doctor |
| 从对方迁移 | — | hermes claw migrate |
| IDE 集成 | 外部 Runtime | hermes acp |
| MCP 桥接 | — | hermes mcp serve |
| 更新 | npm update -g openclaw |
hermes update |
中文
部署个人 Agent 的「最快路径」是:Hermes 用 curl + setup --portal + Telegram;OpenClaw 用 npm + onboard + Dashboard。生产环境无论选型,都应完成 配对/allowlist、执行沙箱、诊断审计、Gateway 系统服务 四件事。已有龙虾用户可通过 hermes claw migrate 平滑叠加学习闭环;高安全场景采用 SSH 分离 Gateway/执行。运维不是一次性安装 — hermes doctor 与 openclaw security audit 应纳入日常节奏。
English
Fastest paths: Hermes curl + setup --portal + Telegram; OpenClaw npm + onboard + Dashboard. Production requires pairing/allowlists, execution sandboxing, diagnostics, and gateway services. Migrate from OpenClaw with hermes claw migrate. Split gateway/execution via SSH for high security. Treat hermes doctor and security audit as routine ops, not one-time setup.
最后更新 | Last updated: 2026-06-06
中文
两个框架都将「核心 Agent 引擎」与「可插拔能力」分离,但扩展面不同:
| 维度 | OpenClaw(龙虾) | Hermes Agent |
|---|---|---|
| 第一层扩展 | Workspace Markdown(SOUL/AGENTS) | Context files + SOUL.md |
| 第二层扩展 | Skills(SKILL.md) | Skills + 自动生成 |
| 第三层扩展 | 进程内插件 + Channel 插件 | Python 插件系统 + pip 分发 |
| 外部工具协议 | 主要靠 Skills / 内置工具 | MCP 客户端 + 服务端 一等公民 |
| 默认姿态 | 插件在 Gateway 进程内 = 可信代码 | 通用插件默认 opt-in(plugins.enabled) |
| 供应链 | npm shrinkwrap 锁定发布依赖 | Tirith + Skills Guard + 懒安装隔离 |
English
Both separate core engines from pluggable capabilities. OpenClaw extends via workspace files, skills, and in-process Gateway plugins plus channel plugins. Hermes adds a Python plugin system with opt-in general plugins, pip distribution, and first-class bidirectional MCP. OpenClaw treats in-process plugins as trusted; Hermes gates arbitrary user plugins behind plugins.enabled.
中文
flowchart TB
subgraph Sources["发现来源(后者覆盖同名前者)"]
B[bundled plugins/]
U[~/.hermes/plugins/]
P[.hermes/plugins/ 项目级]
PI[pip entry_points]
N[Nix extraPlugins]
end
subgraph Categories["子类别路由"]
G[通用 plugins/ — tools/hooks/commands]
PL[platforms/ — Gateway 渠道]
IG[image_gen/ — 图像后端]
MEM[memory/ — 记忆 Provider]
CE[context_engine/ — 压缩引擎]
MP[model-providers/ — 推理后端]
end
Sources --> PM[PluginManager]
PM --> Categories
| 来源 | 路径 | 用例 |
|---|---|---|
| Bundled | 仓库 plugins/ |
随 Hermes 发布(IRC、Teams 等) |
| User | ~/.hermes/plugins/ |
个人定制工具/钩子 |
| Project | ./.hermes/plugins/ |
项目专属(需 HERMES_ENABLE_PROJECT_PLUGINS=true) |
| pip | hermes_agent.plugins entry_points |
团队 pip 包分发 |
| Nix | extraPlugins / extraPythonPackages |
声明式部署 |
同名碰撞时 后加载者覆盖 — 用户插件可替换内置同名 Provider。
| 类型 | 选择方式 | 位置 |
|---|---|---|
| 通用插件 | 多选 plugins.enabled |
plugins/ |
| Memory Provider | 单选 memory.provider |
plugins/memory/ |
| Context Engine | 单选 context.engine |
plugins/context_engine/ |
| Model Provider | 多注册,用户择一 | plugins/model-providers/ |
| Platform 插件 | bundled 自动加载;用户平台需 enabled | plugins/platforms/ |
English
Discovery order: bundled → user → project (opt-in) → pip → Nix. Subdirectories route to specialized loaders (memory, context engine, model providers, platforms). Later sources override same-name plugins.
1 | plugins: |
1 | hermes plugins # 交互式 SPACE 切换 |
不经过 allowlist 的类别(内置基础设施):
| 种类 | 激活方式 |
|---|---|
| Bundled 平台插件(IRC、Teams) | gateway.platforms.*.enabled |
| Bundled 图像后端 | image_gen.provider |
| Memory / Context / Model Provider | 各自 config.yaml 单选 |
第三方 ~/.hermes/plugins/platforms/ 必须 opt-in。
English
General plugins require explicit plugins.enabled. Bundled platforms/backends and provider plugins bypass the allowlist by design. Third-party platform adapters need opt-in.
| 能力 | API |
|---|---|
| 注册工具 | ctx.register_tool() |
| 生命周期钩子 | ctx.register_hook("post_tool_call", ...) |
| 斜杠命令 | ctx.register_command() |
| CLI 子命令 | ctx.register_cli_command() |
| 捆绑 Skill | ctx.register_skill() → plugin:skill |
| 注册 Gateway 平台 | ctx.register_platform() |
| 注册推理 Provider | register_provider(ProviderProfile(...)) |
| 借用用户 LLM | ctx.llm.complete() |
8 种外部记忆后端(Honcho、Mem0、Hindsight、OpenViking 等)通过 plugins/memory/ 发现:
1 | memory: |
独占模式 — 同时仅一个 active Provider。详见 记忆系统。
1 | context: |
用户必须显式设置 — 插件引擎不会自动激活。
English
Plugins can register tools, hooks, commands, skills, platforms, providers, and context engines. Memory and context engines are single-select via config.
中文
OpenClaw 插件在 Gateway 同一 Node.js 进程内运行 — 与 Gateway 共享内存与凭证,视为可信代码。
1 | { |
| 控制 | 说明 |
|---|---|
plugins.allow |
仅加载列出的插件 |
security.installPolicy |
限制插件安装来源 |
openclaw security audit --deep |
扫描已装 Skills/插件 |
内置渠道:WhatsApp、Telegram、Discord、Slack、Signal、iMessage 等。
插件渠道:Matrix、Nostr、Twitch、Zalo、Feishu 等通过 bundled 或 external channel plugins 扩展。
flowchart LR
GW[Gateway :18789] --> BC[内置渠道]
GW --> CP[Channel Plugins]
CP --> MX[Matrix]
CP --> NO[Nostr]
CP --> TW[Twitch]
OpenClaw Skills 以 skills/*/SKILL.md 存在于 workspace,社区通过 ClawHub 等市场分发。插件可附带 Skills 目录 — Skills 与插件 plugins.allow 独立,但同样应限制写入权限。
发布包使用 npm-shrinkwrap.json 锁定依赖图,配合 openclaw security audit 检测已知妥协版本。对比 Hermes 的 hermes doctor 供应链告警。
English
OpenClaw plugins run in-process — trusted code. Use plugins.allow allowlists and security.installPolicy. Channel plugins extend connectivity. Published deps locked via npm-shrinkwrap; audit via openclaw security audit --deep.
中文
Model Context Protocol 让 Hermes 连接外部工具服务器(GitHub、Linear、数据库、文件系统等),无需为每个集成编写原生工具。
Stdio 本地子进程:
1 | mcp_servers: |
HTTP 远程端点:
1 | mcp_servers: |
1 | mcp_<server_name>_<tool_name> |
| MCP 工具 | 注册名 |
|---|---|
| filesystem.read_file | mcp_filesystem_read_file |
| github.create-issue | mcp_github_create_issue |
每个有工具的服务器还创建 runtime toolset:mcp-<server>。
Stdio MCP 子进程 不继承完整 shell 环境:
env + 安全基线OPENROUTER_API_KEY 等的风险English
Hermes connects to MCP servers via stdio or HTTP. Tools register as mcp_<server>_<tool>. Stdio servers get filtered env — not the full shell — reducing credential leakage.
1 | mcp_servers: |
| 规则 | 行为 |
|---|---|
enabled: false |
跳过连接 |
include |
白名单 |
exclude |
黑名单 |
| 同时存在 | include 优先 |
prompts/resources: false |
禁用 utility 包装器 |
1 | hermes mcp # 交互式目录安装 |
运行中修改配置:
1 | /reload-mcp |
服务器也可推送 notifications/tools/list_changed 动态刷新工具列表。
optional-mcps/ 条目经 PR 审核合并。安装会执行 manifest 中的 bootstrap(git clone、pip install、npm install 等)— 安装前阅读 manifest 的 source: 与 install.bootstrap:。
English
Per-server tool filtering via include/exclude. Catalog entries are PR-gated under optional-mcps/. Use /reload-mcp after config changes; servers can push dynamic tool list updates.
MCP 服务器可通过 sampling/createMessage 请求 Hermes 代为推理 — 对不信任服务器设 sampling.enabled: false,并配置 max_rpm / max_tokens_cap 限流。
English
MCP sampling lets servers request LLM inference — disable for untrusted servers; rate limits apply.
中文
hermes mcp serve 将 Hermes 暴露为 MCP 服务器,供 Cursor、Claude Code、VS Code 等客户端调用 消息能力:
1 | { |
| 工具 | 功能 |
|---|---|
conversations_list |
列出活跃会话 |
messages_read |
读取消息历史 |
messages_send |
向 telegram:xxx / discord:#channel 发消息 |
events_poll / events_wait |
近实时事件 |
permissions_respond |
审批危险命令 |
读操作 无需 Gateway 运行;发消息 需要 Gateway 平台适配器在线。
这与 OpenClaw 通过 Gateway WebSocket 统一渠道不同 — Hermes 选择 stdio MCP 桥接 嵌入外部编码 Agent 工作流。
English
hermes mcp serve exposes messaging tools to MCP clients (Cursor, Claude Code). Reads work without gateway; sends require active platform adapters. Bridges external coding agents to Hermes channels.
中文
| 协议 | 角色 | 典型编辑器 |
|---|---|---|
| ACP | Hermes 作为 Agent 服务端,编辑器渲染工具/审批/差异 | VS Code、Zed、JetBrains |
| MCP | Hermes 作为工具服务端(消息)或工具客户端(GitHub 等) | Cursor、Claude Desktop |
1 | hermes acp # 编辑器原生 Agent 体验 |
ACP 使用精选 hermes-acp toolset(含 delegate_task),排除 cronjob、messaging delivery 等不适合编辑器 UX 的工具。
English
ACP: Hermes as agent server for IDE UX. MCP: Hermes as messaging bridge (server) or external tool consumer (client). Complementary, not interchangeable.
中文
| 能力 | OpenClaw | Hermes |
|---|---|---|
| 插件运行时 | Gateway 进程内 Node.js | Python PluginManager |
| 默认加载 | 需 plugins.allow 白名单 |
通用插件 opt-in plugins.enabled |
| 渠道扩展 | Channel Plugins | Platform 插件 + 20 内置 Adapter |
| 外部工具协议 | 主要靠 Skills/内置 | MCP 客户端一等公民 |
| 对外暴露消息 | Gateway WebSocket / Control UI | hermes mcp serve |
| IDE 集成 | 外部 Runtime 生态 | ACP + MCP 双路径 |
| 记忆插件 | Workspace 文件 | plugins/memory/ Provider |
| 上下文引擎 | 无内置可插拔 | plugins/context_engine/ |
| 推理 Provider 插件 | 绑定 Runtime | plugins/model-providers/ 18+ |
| 供应链审计 | shrinkwrap + security audit | Tirith + hermes doctor |
| Skills 随插件分发 | 社区 + workspace | ctx.register_skill() |
| 项目级插件 | workspace skills | .hermes/plugins/(默认关闭) |
English
Matrix: OpenClaw in-process trusted plugins with channel extensions; Hermes opt-in Python plugins with MCP client/server, ACP IDE path, and specialized provider/memory/context plugin loaders.
中文
plugins.allow 显式白名单 — 不用则等于加载全部发现项openclaw security audit --deep 定期扫描chmod 限制写入hermes plugins enable 审查过的通用插件HERMES_ENABLE_PROJECT_PLUGINS=false 除非信任仓库tools.include 最小暴露面samplingenv 仅填必要变量hermes doctor 检查供应链告警hermes mcp 目录安装前阅读 manifestEnglish
OpenClaw: plugins.allow, security audit, lock down skills dirs. Hermes: opt-in plugins, minimal MCP tool exposure, disable sampling for untrusted servers, filtered stdio env, hermes doctor.
中文
| 场景 | 推荐路径 |
|---|---|
| GitHub PR 管理 | Hermes mcp_servers.github + include 白名单 |
| Linear 工单 | 目录 hermes mcp install linear + OAuth |
| 团队自定义 CLI 工具 | Hermes ~/.hermes/plugins/ |
| Matrix 聊天渠道 | OpenClaw channel plugin 或 Hermes bundled platform |
| Cursor 发 Telegram | hermes mcp serve |
| VS Code 编码 Agent | hermes acp |
| Honcho 用户建模 | Hermes memory.provider: honcho |
| 无损长上下文 | Hermes context.engine: lcm 插件 |
English
Scenarios: GitHub/Linear via MCP, custom tools via Hermes plugins, Matrix via channel plugins, Cursor→Telegram via mcp serve, VS Code via ACP, Honcho via memory provider.
中文
| 症状 | Hermes 排查 | OpenClaw 排查 |
|---|---|---|
| 插件未加载 | hermes plugins list 检查 enabled |
检查 plugins.allow |
| MCP 工具缺失 | /reload-mcp、检查 filter |
N/A |
| MCP OAuth 失败 | hermes mcp login <name> 独立终端 |
N/A |
| 渠道未连接 | gateway.platforms.*.enabled |
channel 配置 + plugin |
| 供应链告警 | hermes doctor --ack |
security audit --fix |
English
Hermes: check plugins.enabled, /reload-mcp, hermes mcp login. OpenClaw: check plugins.allow, channel config, security audit.
中文
OpenClaw 的扩展栈是 Workspace + Skills + 进程内 Channel 插件,优势在渠道广度与社区生态,安全关键是 plugins.allow 与 shrinkwrap 供应链。Hermes 的扩展栈是 分层 Python 插件(工具/记忆/上下文/Provider)+ 双向 MCP + ACP,优势在可组合的外部工具生态与 opt-in 默认姿态。实践中常组合使用:Hermes mcp_servers 接 GitHub/Linear,OpenClaw channel plugin 接 Matrix,Cursor 通过 hermes mcp serve 桥接消息 — 插件与 MCP 不是二选一,而是分层装配能力边界。
English
OpenClaw extends via workspace, skills, and in-process channel plugins — maximize connectivity with plugins.allow and supply-chain audits. Hermes extends via layered Python plugins and bidirectional MCP/ACP — compose external tools with opt-in safety. In practice, combine MCP servers for SaaS integrations, channel plugins for niche protocols, and hermes mcp serve to bridge coding agents to messaging — plugins and MCP are layers, not either/or.
最后更新 | Last updated: 2026-06-06
中文
单一 Gateway 往往要同时服务:
两个框架都支持「一个控制平面、多个 Agent 脑」,但路由机制与委派模型不同:
| 维度 | OpenClaw(龙虾) | Hermes Agent |
|---|---|---|
| 路由键 | sessionKey + bindings |
agent:main:platform:chat_type:chat_id |
| 多脑配置 | agents.list[] + 独立 workspace |
hermes -p <profile> 完整隔离 |
| 子代理工具 | sessions_spawn / sessions_send |
delegate_task |
| 子代理上下文 | 精简 bootstrap(目标 workspace) | 仅 goal + context,零对话历史 |
| 跨会话风险 | 高(控制面工具) | 中(委派同步、可取消) |
English
A single Gateway often serves multiple personas, channels, parallel workstreams, or team vs personal bots. Both frameworks support multiple agent brains on one control plane, but routing and delegation differ: OpenClaw uses sessionKey + bindings + sessions_spawn; Hermes uses structured session keys, profiles, and delegate_task.
中文
flowchart TB
subgraph Inbound["入站消息"]
WA[WhatsApp personal]
WB[WhatsApp biz]
TG[Telegram DM]
end
subgraph GW["OpenClaw Gateway :18789"]
BIND[bindings 确定性匹配]
ROUTE[sessionKey 路由]
end
subgraph Agents["agents.list"]
A1[main — workspace-personal]
A2[work — workspace-work]
A3[family — workspace-family]
end
WA --> BIND
WB --> BIND
TG --> BIND
BIND --> ROUTE
ROUTE --> A1 & A2 & A3
每个 Agent 是完整信任边界:
| 资源 | 隔离路径 |
|---|---|
| 工作区 | agents.list[].workspace → SOUL/AGENTS/MEMORY/skills |
| 状态目录 | ~/.openclaw/agents/<agentId>/agent |
| 会话存储 | ~/.openclaw/agents/<agentId>/sessions/*.jsonl |
| 认证配置 | per-agent auth profiles(不共享) |
1 | { |
路由规则:bindings 按 (channel, accountId, peer, guild/team) 确定性匹配,最具体规则优先。
| 值 | 行为 |
|---|---|
per-channel-peer |
每个发送者独立 DM 会话(多用户收件箱推荐) |
per-account-channel-peer |
多账号渠道下按账号+发送者隔离 |
1 | { |
sessionKey 是路由选择器,不是认证令牌。与 dmPolicy: pairing 组合可硬化多用户场景。
English
OpenClaw routes via agents.list (full per-agent workspace, state, sessions, auth) and deterministic bindings. Each agent is an isolated trust boundary. session.dmScope controls DM isolation; sessionKey routes sessions but does not authenticate users.
sessions_spawn — 启动后台子代理:
1 | - 会话键:agent:<agentId>:subagent:<uuid> |
sessions_send — 向另一会话发送消息(跨会话操作,高风险)。
| 深度 | sessionKey 形态 | 角色 | 能否 spawn |
|---|---|---|---|
| 0 | agent:<id>:main |
主代理 | 始终可以 |
| 1 | agent:<id>:subagent:<uuid> |
子代理 / 编排者 | 仅当 maxSpawnDepth >= 2 |
| 2 | agent:<id>:subagent:<uuid>:subagent:<uuid> |
叶子 worker | 永远不能 |
编排者模式(maxSpawnDepth: 2):
1 | Main → Orchestrator sub-agent → Worker sub-sub-agents |
深度 1 编排者保留 sessions_spawn、subagents、sessions_list;深度 2 worker 无 session 工具。
子代理从目标 Agent 的 workspace 加载 bootstrap 文件(AGENTS.md、TOOLS.md 等),但 不继承 主会话完整历史。可选 cwd 指定子任务工作目录。
这与 Hermes delegate_task「仅 goal+context」哲学类似,但 OpenClaw 仍注入 workspace 级人格与工具指南。
sessions_spawn 有两层门禁:
sessions_spawn(或 group:sessions)agents.list[].subagents.allowAgents 必须列出目标 agentId1 | // 正确:allowAgents 与 tools 同级,不在 tools 下 |
用 agents_list 工具验证可 spawn 的目标列表。
English
sessions_spawn starts background sub-agents with reduced bootstrap from the target workspace. Cross-agent spawning requires subagents.allowAgents on the caller — separate from tools.allow. sessions_send is a high-risk cross-session primitive; deny by default on untrusted surfaces.
| 模式 | 配置要点 |
|---|---|
| 个人多人格 | 多 workspace + bindings 按 accountId/peer |
| 团队共享 Bot | dmScope: per-channel-peer + dmPolicy: pairing + 收紧 tools |
| 编排者-专家 | main 绑定全渠道,allowAgents 指向 sandboxed 专家 Agent |
| agentToAgent | tools.agentToAgent.enabled + allow: [ids] |
硬化基线应对不可信面 deny:gateway、cron、sessions_spawn、sessions_send。
English
Patterns: personal multi-persona via bindings, team bots with per-channel-peer + pairing, orchestrator-specialist with sandboxed worker agents. Harden untrusted surfaces by denying control-plane tools.
中文
1 | agent:main:{platform}:{chat_type}:{chat_id} |
示例:agent:main:telegram:private:123456789
| 组成部分 | 说明 |
|---|---|
agent:main |
主 Agent 实例(未来可扩展多 agent id) |
platform |
telegram / discord / slack / cli 等 |
chat_type |
private / group / channel |
chat_id |
平台原生 ID;线程型平台含 thread ID |
禁止手动拼接 — 使用 build_session_key()。详见 Gateway 架构。
1 | hermes -p work gateway start |
每个 Profile 拥有独立:
| 资源 | 路径 |
|---|---|
| HERMES_HOME | ~/.hermes-profiles/<name>/ 或自定义 |
| config.yaml / .env | Profile 作用域 |
| state.db 会话 | Profile 作用域 |
| Gateway PID | Profile 作用域 |
| Bot Token 锁 | acquire_scoped_lock() 防多 Profile 抢同一 Token |
团队 vs 个人:团队 Bot 用 work Profile + 平台 allowlist;个人进化用 default Profile + 学习闭环。
English
Hermes session keys follow agent:main:{platform}:{chat_type}:{chat_id}. Profiles (hermes -p <name>) fully isolate config, sessions, gateway, and token locks — the primary multi-agent pattern on Hermes.
Hermes Gateway 的 delivery.py 支持跨平台投递,但 Cron 投递不镜像进 Gateway 会话历史(避免消息交替违规)。这与 OpenClaw sessions_send 的跨会话写入是不同层面的能力。
English
Cross-platform delivery exists via delivery.py, but cron deliveries are excluded from gateway session history to preserve message ordering invariants.
中文
flowchart LR
PARENT[父 AIAgent] -->|delegate_task| C1[子代理 1]
PARENT -->|delegate_task| C2[子代理 2]
PARENT -->|delegate_task| C3[子代理 3]
C1 --> S1[摘要回注]
C2 --> S2[摘要回注]
C3 --> S3[摘要回注]
S1 & S2 & S3 --> PARENT
1 | delegate_task(tasks=[ |
| 维度 | OpenClaw sessions_spawn | Hermes delegate_task |
|---|---|---|
| 执行模型 | 后台非阻塞,announce 回聊天 | 父轮次内同步等待摘要 |
| 上下文 | workspace bootstrap + 可选 cwd | 仅 goal + context 字符串 |
| 会话键 | agent:id:subagent:uuid |
内部子会话,不暴露给用户 |
| 嵌套 | maxSpawnDepth 2 编排者模式 | role=orchestrator + max_spawn_depth |
| 持久性 | 可 auto-archive 60min | 父中断即丢弃;用 cron 做持久任务 |
| 凭证 | per-agent auth | 继承父 credential pool |
| fallback | per-agent 配置 | 继承父 fallback_providers |
子代理 不知道 父对话任何内容。「修复我们刚讨论的 bug」会失败 — 必须在 context 中写明路径、错误信息、约束。
| 应传入 context | 不应假设 |
|---|---|
| 绝对路径、项目根 | 父会话中的指代 |
| 测试命令、技术栈 | 用户偏好(除非写入 context) |
| 明确目标与验收标准 | 父代理已读过的文件内容 |
1 | delegation: |
| 配置 | 默认 | 说明 |
|---|---|---|
max_concurrent_children |
3 | 单批 delegate_task 并行上限 |
max_spawn_depth |
1 | >1 允许 orchestrator 再委派 |
orchestrator_enabled |
true | false 全局禁用嵌套 |
编排者子代理(role="orchestrator")可保留 delegate_task;叶子子代理默认 禁止 delegate_task、clarify、memory、send_message、execute_code。
1 | delegation: |
子代理使用廉价模型跑并行研究,父代理用强模型综合 — 常见 质量/成本 平衡点。
English
delegate_task spawns isolated children with separate sessions and toolsets; only summaries return to the parent. Synchronous within the parent turn — interrupted parents cancel children. Pass explicit goal + context; children have zero conversation history. Override delegation.provider/model for cost optimization.
| 模式 | 工具选择 |
|---|---|
| 并行研究 | toolsets: ["web"] |
| 代码审查 | toolsets: ["terminal", "file"] |
| 多文件重构 | 多 task 并行,各管不同目录 |
| 收集 + 分析 | execute_code 机械收集 → delegate_task 推理分析 |
English
Patterns: parallel research (web), code review (terminal+file), gather-then-analyze (execute_code then delegate_task).
中文
| 能力 | 风险 | OpenClaw 缓解 | Hermes 缓解 |
|---|---|---|---|
| sessions_spawn | 跨 Agent 越权 spawn | allowAgents 白名单 |
N/A(不同工具) |
| sessions_send | 跨会话注入/泄露 | deny + tools.profile | 无对等一等工具 |
| delegate_task | 父中断丢工作 | N/A | 用 cron / background terminal |
| 多用户 DM | 会话串线 | per-channel-peer + pairing |
平台 allowlist + pairing |
| 团队 Bot | 任意用户触发工具 | sandbox + deny 控制面 | Docker backend + manual approval |
| 嵌套子代理 | 资源耗尽 | maxChildrenPerAgent | max_concurrent_children |
English
Risk matrix: cross-agent spawn gates (allowAgents), deny sessions_send on untrusted surfaces, use cron for durable work instead of delegation, isolate DMs with per-channel-peer and pairing.
中文
flowchart TD
Q[需要多 Agent?] --> OC{要后台长期子任务<br/>+ 聊天 announce?}
OC -->|是| OC1[OpenClaw sessions_spawn]
OC -->|否| HM{要并行摘要<br/>+ 父上下文隔离?}
HM -->|是| HM1[Hermes delegate_task]
HM -->|否| PR{要完全隔离配置<br/>+ 凭证?}
PR -->|OpenClaw| OC2[agents.list 多 workspace]
PR -->|Hermes| HM2[hermes -p profiles]
| 场景 | 推荐 |
|---|---|
| WhatsApp 双账号 → 双人格 | OpenClaw bindings + agents.list |
| Telegram 团队 Bot + 个人 CLI | Hermes -p work / -p personal |
| 三路并行网络调研 | Hermes delegate_task 批量 |
| 编码编排者 → 沙箱 worker | OpenClaw maxSpawnDepth: 2 |
| 跨会话发消息给另一用户 | OpenClaw sessions_send(慎用) |
| IDE 内并行子任务 | Hermes ACP 含 delegate_task |
English
Use OpenClaw sessions_spawn for background announced sub-runs and multi-workspace routing via bindings. Use Hermes delegate_task for parallel in-turn summaries and hermes -p for full profile isolation.
中文
session.dmScope: "per-channel-peer"(多用户)dmPolicy: "pairing"subagents.allowAgents 显式列出可 spawn 目标(避免 ["*"] 除非可信)sessions_send、gateway、cronsandbox.mode: "all"agents_list 定期审计可 spawn 列表GATEWAY_ALLOW_ALL_USERSdelegation.max_concurrent_children 防止 API 风暴delegation.provider 指向 Flash 模型cronjob 而非 delegate_taskcontext 含绝对路径与验收标准English
OpenClaw: per-channel-peer, pairing, explicit allowAgents, deny risky tools, sandbox specialists. Hermes: allowlists, cap concurrent children, cheap delegation models, cron for durable work, explicit subagent context.
| 操作 | OpenClaw | Hermes |
|---|---|---|
| 列出可 spawn Agent | agents_list 工具 |
N/A |
| 启动子代理 | sessions_spawn |
delegate_task |
| 跨会话消息 | sessions_send |
send_message(不同语义) |
| 多配置隔离 | agents.list + workspace |
hermes -p <profile> |
| 查看子代理状态 | subagents 工具 |
父会话内摘要 |
| 会话键 | Gateway sessionKey | build_session_key() |
| DM 隔离 | session.dmScope |
平台 allowlist + pairing |
中文
OpenClaw 的多 Agent 哲学是 bindings 路由多个完整 workspace 脑,用 sessions_spawn 做后台 announce 式子任务,适合「一个 Gateway 服务多渠道、多人格、编排者-专家」拓扑。Hermes 的多 Agent 哲学是 Profile 隔离 + 同步 delegate_task 并行,用极简 context 换父上下文清洁,适合「并行研究/审查 + 强模型综合 + 学习闭环沉淀」。二者可经 hermes claw migrate 迁移人格与技能,但路由与委派语义不可直接互换 — 选型应取决于你需要 后台会话 announce 还是 轮内并行摘要。
English
OpenClaw routes multiple full workspace brains via bindings, with background sessions_spawn sub-runs that announce back — ideal for multi-channel, multi-persona, orchestrator-worker topologies. Hermes isolates via profiles and parallel synchronous delegate_task with minimal context — ideal for in-turn research/review with a strong parent synthesizer. Choose based on whether you need background announced sessions or in-turn parallel summaries.
最后更新 | Last updated: 2026-06-06
中文
个人 AI Agent 的运行成本主要来自三类 Token 消耗:
| 成本来源 | 说明 | 谁更敏感 |
|---|---|---|
| 主模型推理 | 每轮对话 + 工具循环的输入/输出 Token | 两者皆然 |
| 系统提示词前缀 | SOUL/AGENTS/MEMORY/Skills 索引等静态内容 | OpenClaw 全量注入;Hermes 分层控制 |
| 辅助模型调用 | 压缩摘要、视觉、审批评分、网页提取 | Hermes 独有,可独立优化 |
OpenClaw 的模型选择通常绑定在 Gateway 配置或外部 Agent Runtime(Claude Code、Cursor 等),成本优化侧重 工作区文件瘦身 与 工具爆炸半径。Hermes 将 Provider 解析、凭证轮换、fallback、辅助模型、Prompt 缓存、上下文压缩统一纳入 runtime_provider.py 与 AIAgent 循环——适合需要 模型无关 + 长期无人值守 Cron 的场景。
English
Personal agent costs come from three token buckets:
| Source | Description | Who feels it more |
|---|---|---|
| Main model inference | Input/output tokens per turn and tool loop | Both |
| System prompt prefix | SOUL, AGENTS, MEMORY, skill indexes | OpenClaw full injection; Hermes layered control |
| Auxiliary model calls | Compression, vision, approval scoring, web extract | Hermes-specific, independently tunable |
OpenClaw model choice is typically tied to Gateway config or external runtimes; cost control focuses on workspace slimming and tool blast radius. Hermes unifies provider resolution, credential rotation, fallback, auxiliary models, prompt caching, and context compression in runtime_provider.py and the AIAgent loop — ideal for model-agnostic and unattended cron deployments.
中文
Hermes 通过 plugins/model-providers/ 插件注册推理后端,用户插件可覆盖同名内置 Provider。核心解析链:
flowchart LR
REQ[用户消息 / Cron / ACP] --> RES[runtime_provider.py]
RES --> POOL[Credential Pool 轮换]
POOL --> MAIN[主模型 API 调用]
MAIN -->|失败| FB[fallback_providers]
MAIN --> AUX[auxiliary.* 侧任务]
AUX --> COMP[compression / vision / approval]
配置位于 ~/.hermes/config.yaml 的 model: 段:
1 | model: |
| 切换方式 | 作用域 | 说明 |
|---|---|---|
hermes model |
全局默认 | 交互式选择 Provider + 模型 |
hermes setup --portal |
全局 | OAuth 一次覆盖模型 + Tool Gateway |
| Dashboard Models 页 | 全局 | 可视化主模型与 8 个辅助槽位 |
/model provider:model |
当前会话 | Gateway/CLI 内热切换 |
/model ... --global |
全局 + 当前会话 | 等同 Dashboard 的 Change |
English
Hermes registers inference backends via plugins/model-providers/; user plugins override bundled ones. Resolution flow: request → runtime_provider.py → credential pool → main API call → optional fallback_providers → auxiliary tasks.
Main model config lives under model: in config.yaml. Switch via hermes model, hermes setup --portal, dashboard, or /model (session-only or --global).
| api_mode | 适用 Provider | 实现路径 |
|---|---|---|
chat_completions |
OpenRouter、大多数 OpenAI 兼容端点 | 标准 Chat Completions |
codex_responses |
openai-codex |
OpenAI Responses API 专用路径 |
anthropic_messages |
anthropic 原生 |
agent/anthropic_adapter.py 翻译 Messages API |
Fallback 激活时会按目标 Provider 就地切换 api_mode:Codex → codex_responses,Anthropic → anthropic_messages,其余 → chat_completions。
English
Three API modes: chat_completions (default), codex_responses (OpenAI Codex), anthropic_messages (native Anthropic). Fallback swaps api_mode in-place when activating a backup provider.
hermes setup --portal 是最低摩擦路径:
1 | hermes setup --portal # 登录 + 设置 Nous Provider + 启用 Tool Gateway |
对比单独配置 OPENROUTER_API_KEY + 各工具 API Key,Portal 显著降低 密钥管理成本 与 辅助服务账单碎片度。
English
hermes setup --portal covers 300+ models plus Tool Gateway (search, images, TTS, browser) under one OAuth — ideal for unattended cron with automatic token refresh. Portal subscribers get 10% off token-billed providers.
Hermes 严格隔离 API Key 与 base URL:
OPENROUTER_API_KEY 仅发往 openrouter.ai 端点OPENAI_API_KEY 用于自定义 OpenAI 兼容端点及回退provider: custom + custom_providers 列表支持 LM Studio、Together、本地 vLLM 等避免「配置了 OpenRouter 却把 OpenAI Key 泄漏到自定义 localhost」的常见踩坑。
English
API keys are scoped to their base URLs. OPENROUTER_API_KEY never leaks to custom endpoints; provider: custom supports local and third-party OpenAI-compatible servers.
中文
凭证池处理 同 Provider 多 Key 轮换;fallback_providers 处理 跨 Provider 故障转移。执行顺序:先池,后 fallback。
1 | 请求 → 从池选 Key(fill_first / round_robin / least_used / random) |
1 | hermes auth add openrouter --api-key sk-or-v1-second-key |
1 | credential_pool_strategies: |
凭证池使用线程锁保护 select() / mark_exhausted_and_rotate(),多 Telegram/Discord 会话并发时安全。子代理通过 delegate_task _spawn 时 继承父代理凭证池,同 Provider 子任务可共享轮换能力。
English
Credential pools rotate multiple keys for the same provider before cross-provider fallback kicks in. Strategies: fill_first, round_robin, least_used, random. Thread-safe for concurrent gateway sessions; subagents inherit the parent’s pool.
中文
1 | fallback_providers: |
| 特性 | 行为 |
|---|---|
| 触发条件 | 429/5xx 重试耗尽、401/403/404、畸形响应 |
| 作用域 | 按轮(per-turn) — 每轮新消息先尝试主模型 |
| 单轮上限 | 每轮最多激活 fallback 一次,防止级联循环 |
| 会话连续性 | 历史、工具调用、上下文完整保留 |
| CLI 管理 | hermes fallback add/list/remove/clear |
sequenceDiagram
participant U as 用户消息
participant A as AIAgent
participant P as 主 Provider
participant F as fallback_providers
U->>A: 新轮次开始
A->>P: 调用主模型
P-->>A: 429 / 503
A->>F: _try_activate_fallback()
F-->>A: 切换 provider+client+api_mode
A->>F: 继续本轮回话
Note over A: 下一轮消息重新尝试主模型
| 上下文 | 支持 fallback |
|---|---|
| CLI / Gateway 会话 | ✔ |
| Cron 任务 | ✔(继承 fallback_providers) |
| 子代理 delegate_task | ✔(继承父链;可用 delegation.provider 覆盖主模型) |
| 辅助模型任务 | ✘(独立 auto-detection 链) |
English
fallback_providers is an ordered list tried on primary failure. Per-turn scope: each new user message retries the primary first; at most one fallback activation per turn. Cron and subagents inherit the chain; auxiliary tasks use their own routing.
中文
Hermes 将侧任务从主模型剥离,共 8 个辅助槽位:
| 任务 | config 键 | 典型优化 |
|---|---|---|
| Title Gen | auxiliary.title_generation |
Flash 模型写标题(默认 gemini-flash) |
| Vision | auxiliary.vision |
主模型无视觉时指向 gpt-4o-mini / gemini-flash |
| Compression | auxiliary.compression |
勿用 Opus 做摘要 — 1/50 成本 |
| Web Extract | auxiliary.web_extract |
网页摘要用廉价 chat 模型 |
| Approval | auxiliary.approval |
approval_mode: smart 的评分模型 |
| Skills Hub | auxiliary.skills_hub |
技能搜索,通常 auto 即可 |
| MCP | auxiliary.mcp |
MCP 辅助操作 |
| Triage Specifier | auxiliary.triage_specifier |
Kanban 任务规格化 |
1 | auxiliary: |
provider: auto 表示使用主模型 — 对 Compression / Approval 通常是 浪费。
English
Eight auxiliary slots offload side jobs from the main model. Override compression and approval with fast/cheap models — using Opus for summarization wastes reasoning tokens. provider: auto means “use main model.”
approval_mode: smart 时,每条待审批命令会调用 auxiliary.approval 做风险分类:
| 模式 | 行为 | Token 成本 |
|---|---|---|
manual(默认) |
用户手动审批 | 无辅助调用 |
smart |
辅助 LLM 评估低/高风险 | 每条危险模式匹配 + 一次 aux 调用 |
off |
YOLO(硬阻断列表仍生效) | 无辅助调用 |
成本建议:将 auxiliary.approval 指向 haiku / flash / gpt-5-mini;切勿用 Opus 做审批评分。容器后端(Docker/Modal)跳过审批检查 — 容器即边界。
English
approval_mode: smart routes each dangerous-command candidate through auxiliary.approval. Point it at haiku/flash/mini models — never Opus. Container backends skip approval checks entirely.
显式配置 auxiliary.vision.provider: glm 等时,若遇 402/日配额耗尽/连接失败,Hermes 按层回退:
auxiliary.*.fallback_chain(可选)瞬时 429(Retry-After)不触发此阶梯,尊重显式 Provider 选择。
English
Explicit auxiliary providers fall back through optional fallback_chain, then the main agent model, on capacity errors (402, daily quota, connection failure) — not transient 429s.
中文
Hermes 采用 双层压缩,防止长会话 Token 爆炸:
flowchart TB
MSG[新消息到达] --> HY[Gateway Session Hygiene 85%]
HY --> AG[Agent ContextCompressor 50%]
AG --> P1[Phase1: 剪枝旧 tool 输出]
P1 --> P2[Phase2: 划定 head/tail 边界]
P2 --> P3[Phase3: 辅助 LLM 结构化摘要]
P3 --> P4[Phase4: 重组消息列表]
| 层级 | 阈值 | 位置 | 目的 |
|---|---|---|---|
| Gateway 卫生 | 85% 上下文 | gateway/run.py |
隔夜 Telegram 会话安全网 |
| Agent 压缩器 | 50%(可配) | context_compressor.py |
主循环精确 Token 管理 |
1 | compression: |
关键警告:摘要模型的上下文窗口必须 ≥ 主模型。否则中间段无法一次送入摘要 API,压缩退化为 无摘要丢弃 — 最常见的质量劣化原因。
压缩触发 会话分裂(parent_session_id 链),详见 记忆系统。
English
Dual compression: gateway hygiene at 85% (safety net), agent ContextCompressor at 50% (default). Four phases: prune old tool output, bound head/tail, auxiliary LLM structured summary, reassemble. Summary model context must be ≥ main model or middle turns are dropped without summary.
1 | context: |
插件需用户显式设置 context.engine — 默认 "compressor" 始终使用内置实现。
English
Plugins can replace the context engine via context.engine (e.g., lossless lcm). User must opt in explicitly.
中文
对 Claude 模型,Hermes 自动启用 cache_control(agent/prompt_caching.py),多轮对话输入成本可降约 75%。
策略 system_and_3(Anthropic 最多 4 个断点):
1 | 断点 1: 系统提示词(跨轮稳定) |
| 设计原则 | 原因 |
|---|---|
| 系统提示词稳定性 | 保护断点 1 缓存命中 |
| 压缩仅首次追加注记 | 避免 mid-session 突变系统提示 |
| TTL 可选 5m / 1h | 长间隔对话用 1h |
1 | prompt_caching: |
启用条件:Claude 模型名 + Provider 支持 cache_control(原生 Anthropic 或 OpenRouter)。
English
Anthropic prompt caching via system_and_3 strategy: system prompt plus rolling 3-message window. ~75% input cost reduction on multi-turn Claude conversations. Preserve prompt stability; compression appends a note only on first compaction.
中文
无人值守 Cron 是 Token 成本 放大器。Hermes 提供多层节制:
| 机制 | 作用 |
|---|---|
enabled_toolsets |
单任务仅暴露必要 toolset,缩小 schema prompt |
hermes tools → cron 平台 |
全局 Cron 默认 toolset |
no_agent=True |
纯脚本,零 LLM Token |
wakeAgent: false |
预检脚本跳过本轮 Agent |
context_from |
流水线传递上游输出,避免重复抓取 |
| Provider recovery | 凭证池 + fallback_providers 防 Cron 因 429 整体失败 |
每任务 provider/model |
廉价模型跑高频巡检 |
1 | cronjob( |
反面教材:默认携带 moa、browser、delegation 的 Cron 在每次 LLM 调用中注入大量工具 schema — 对小任务极其浪费。
English
Cron amplifies token cost. Control via enabled_toolsets, platform defaults in hermes tools, no_agent script-only jobs, wakeAgent: false gates, per-job cheap models, and inherited fallback/credential pools. Avoid bloated toolsets on simple scheduled tasks.
中文
OpenClaw 模型由 Gateway Runtime 或外部编码 Agent(Claude Code、Cursor)配置,无 Hermes 式 18+ Provider 抽象。成本杠杆:工作区瘦身、tools.profile: messaging、子代理 sessions_spawn 隔离长任务、openclaw security audit 收紧工具面。云账单常见 $10–150+/月;Hermes 对辅助模型、压缩、缓存的可编程控制更细。
English
OpenClaw lacks Hermes-style multi-provider runtime. Cost levers: slim workspaces, tight tool profiles, sessions_spawn isolation, security audit. Cloud bills commonly $10–150+/month; Hermes offers finer aux/compression/caching control.
中文
| 实践 | Hermes | OpenClaw |
|---|---|---|
| 主模型用于推理 | ✔ 复杂工具循环 | ✔ Agent Runtime |
| 廉价模型用于摘要/标题 | auxiliary.* 显式覆盖 |
依赖外部 Runtime 或手动 |
| 视觉任务分离 | auxiliary.vision |
取决于所选 Runtime |
| 高频 Cron 专用模型 | per-job provider/model |
按 Agent 配置 |
| 避免 mid-session 突变系统提示 | 设计原则 + 缓存友好 | 工作区文件顺序注入 |
| 监控用量 | Dashboard Usage analytics | Gateway 日志 + 提供商控制台 |
| 凭证轮换 | hermes auth 多 Key |
按渠道/Provider 手动 |
English
Hygiene checklist: cheap models for aux tasks, dedicated cron models, stable system prompts for cache hits, credential pools for rate limits, dashboard analytics for monitoring.
flowchart TD
START[账单过高?] --> Q1{主模型是否过强?}
Q1 -->|是| A1[降级主模型 / 按任务选模型]
Q1 -->|否| Q2{辅助任务用主模型?}
Q2 -->|是| A2[配置 auxiliary.compression 等 Flash 模型]
Q2 -->|否| Q3{Cron 工具过多?}
Q3 -->|是| A3[enabled_toolsets 精简]
Q3 -->|否| Q4{长会话上下文膨胀?}
Q4 -->|是| A4[调低 compression.threshold / 检查摘要模型窗口]
Q4 -->|否| Q5{Claude 多轮对话?}
Q5 -->|是| A5[确认 prompt caching 已启用]
Q5 -->|否| A6[凭证池 + fallback 防失败重试浪费]
中文
| 目标 | 命令 / 配置 |
|---|---|
| 一键 Portal | hermes setup --portal |
| 交互选模型 | hermes model |
| 管理 fallback | hermes fallback |
| 管理凭证池 | hermes auth |
| 热切换会话模型 | /model provider:model |
| 压缩阈值 | compression.threshold |
| 审批智能模式 | approval_mode: smart + auxiliary.approval |
| Cron 工具集 | enabled_toolsets / hermes tools |
| Prompt 缓存 TTL | prompt_caching.cache_ttl |
English
Quick ref: hermes setup --portal, hermes model, hermes fallback, hermes auth, /model, compression.*, auxiliary.*, enabled_toolsets, prompt_caching.cache_ttl.
中文
Hermes 将 Provider 解析、凭证池、fallback、辅助模型、双层压缩、Anthropic 缓存 串成可配置的成本治理体系;OpenClaw 则通过 工作区瘦身、工具 profile、子代理隔离 控制爆炸半径。实践中的最高 ROI 动作通常是:为 Compression / Title / Approval 配置 Flash 模型、为 Cron 设置 enabled_toolsets、启用凭证池与 fallback 避免失败重试、在 Claude 长会话中依赖 Prompt Caching。模型无关不等于成本无关 — 侧任务与工具 schema 才是隐形大户。
English
Hermes offers a configurable cost stack: providers, credential pools, fallback, auxiliary models, dual compression, and Anthropic caching. OpenClaw leans on workspace slimming, tool profiles, and sub-agent isolation. Highest-ROI moves: flash models for aux tasks, enabled_toolsets for cron, pools + fallback for resilience, prompt caching for long Claude sessions. Model-agnostic doesn’t mean cost-agnostic — auxiliary calls and tool schemas are the hidden spend.
最后更新 | Last updated: 2026-06-06
中文
个人 Agent 的「主动性」取决于能否在无人值守时执行任务。两个框架提供互补机制:
| 维度 | OpenClaw(龙虾) | Hermes Agent |
|---|---|---|
| 定时调度 | cron 工具(Gateway 内) |
cronjob 工具 + Gateway 调度器 |
| 主动巡检 | HEARTBEAT.md + heartbeat 周期 |
Cron + wakeAgent 门控 |
| 调度粒度 | 默认 30m heartbeat | 60s scheduler tick |
| 零成本巡检 | HEARTBEAT_OK 静默 | no_agent + wakeAgent: false |
| 流水线串联 | 单 Agent 内多任务 | context_from 跨任务链 |
| 安全 | deny cron 给不可信面 | Prompt 扫描 + cron 工具禁用 |
English
Proactivity depends on unattended execution. Both frameworks offer complementary automation:
| Dimension | OpenClaw (Lobster) | Hermes Agent |
|---|---|---|
| Scheduling | cron tool (in Gateway) |
cronjob tool + Gateway scheduler |
| Proactive checks | HEARTBEAT.md + heartbeat cadence |
Cron + wakeAgent gate |
| Scheduler tick | Default 30m heartbeat | 60s scheduler tick |
| Zero-cost checks | HEARTBEAT_OK silent ack | no_agent + wakeAgent: false |
| Pipelines | Multi-task within one agent | context_from cross-job chains |
| Security | deny cron on untrusted surfaces | Prompt scan + cron toolset disabled in cron runs |
中文
Hermes 将定时任务管理收敛为单一 cronjob 工具(action 风格),CLI、Gateway、自然语言对话共用同一 API。
| Action | 作用 |
|---|---|
create |
创建一次性或周期性任务 |
list |
列出所有任务 |
update |
修改 schedule、prompt、skills 等 |
pause |
暂停调度 |
resume |
恢复并计算下次运行时间 |
run |
下次 tick 立即触发 |
remove |
删除任务 |
1 | cronjob( |
| 类型 | 格式 | 示例 |
|---|---|---|
| 相对延迟(一次性) | 30m, 2h, 1d |
30 分钟后执行一次 |
| 间隔(周期性) | every 30m, every 2h |
每 2 小时 |
| Cron 表达式 | 标准 5 段 | 0 9 * * 1-5 工作日 9:00 |
| 自然语言 | every day 7am |
解析为等效 cron |
| ISO 时间戳 | 2026-03-15T09:00:00 |
指定时刻一次性 |
重复行为:
| 调度类型 | 默认 repeat | 覆盖 |
|---|---|---|
| 一次性 | 1 | — |
| 间隔 / cron | forever | repeat=5 限制次数 |
任务可附加零个、一个或多个技能,执行时按顺序注入:
1 | cronjob( |
技能内容作为上下文注入,prompt 仅承载任务指令——避免在 cron prompt 中粘贴完整技能正文。
English
Hermes unifies scheduling in the cronjob tool with actions: create, list, update, pause, resume, run, remove. Schedule formats: relative delays, intervals (every N), cron expressions, natural language, ISO timestamps. Attach zero or more skills loaded in order at execution. Prompt carries task instruction only.
中文
Cron 任务默认脱离任何代码库运行——不加载 AGENTS.md、.cursorrules,终端/文件工具使用 Gateway 启动目录。
1 | cronjob( |
当 workdir 设置时:
AGENTS.md、.cursorrules(与交互式 CLI 相同发现顺序)terminal、read_file、patch、execute_code 使用该目录为 cwdworkdir="" 可清除钉扎序列化约束:带 workdir 的任务在 scheduler tick 上串行执行(进程全局 cwd 状态)。
1 | cronjob( |
调度器临时切换 HERMES_HOME 到目标 profile,加载其 .env + config.yaml。带 profile 的任务同样串行执行(HERMES_HOME 是进程全局状态)。
English
Cron jobs default to detached execution without project context. workdir pins AGENTS.md/.cursorrules injection and tool cwd to an absolute project path — serial execution due to global cwd. profile pins HERMES_HOME/config for the run — also serial due to global profile switch.
中文
| 值 | 行为 |
|---|---|
origin / local |
回到来源聊天 / 仅本地 cron/output/ |
telegram / telegram:ID / telegram:chat:thread |
Telegram 目标 |
discord:#channel / slack / whatsapp 等 |
各平台 home 或具名频道 |
all / origin,all |
扇出全部 home channel(去重) |
telegram,discord |
逗号分隔多目标 |
最终响应自动投递,无需 prompt 内 send_message。
默认包装 header/footer 标明来源为定时任务。设 cron.wrap_response: false 可输出原始内容。
若 Agent 最终响应以 [SILENT] 开头,抑制外发投递,输出仍保存到 ~/.hermes/cron/output/ 供审计。
1 | Check if nginx is running. If healthy, respond with only [SILENT]. |
仅成功运行可静默;失败任务始终投递。
English
deliver routes output to origin, local files, specific platforms, or all fan-out. Final agent response auto-delivers without send_message. [SILENT] prefix suppresses outbound delivery on success while saving locally. Failed jobs always deliver. cron.wrap_response: false removes the wrapper header/footer.
中文
1 | hermes cron create "every 5m" \ |
| 语义 | 说明 |
|---|---|
| 执行 | 仅运行脚本,不调用 LLM |
| 输出 | stdout 原文投递 |
| 空 stdout | 静默 tick,不投递 |
| 非零退出/超时 | 投递错误告警 |
| 脚本位置 | 必须在 ~/.hermes/scripts/ |
.sh/.bash 用 /bin/bash;其他用当前 Python 解释器。
带 script= 的 LLM 任务,预检脚本末行可输出 JSON 决定是否唤醒 Agent:
1 | {"wakeAgent": false} |
1 | {"wakeAgent": true, "context": {"new_issues": 3}} |
| 行为 | 说明 |
|---|---|
wakeAgent: false |
跳过本次 Agent 调用,零 Token |
省略或 true |
正常唤醒 Agent(默认) |
context 字段 |
注入 Agent 上下文的结构化数据 |
典型配方:
| 门控类型 | 场景 |
|---|---|
| 文件变更门控 | 仅当 feed.json mtime > last_run 时唤醒 |
| 外部标志门控 | CI 部署后 drop /tmp/ready 文件 |
| SQL 计数门控 | 仅当新行数 > 0 时唤醒,并传递 count |
flowchart TD
T[Scheduler Tick] --> S{有 script?}
S -->|否| A[直接运行 Agent]
S -->|是| R[运行预检脚本]
R --> W{末行 wakeAgent?}
W -->|false| Z[静默跳过 — $0]
W -->|true/省略| A
A --> D[投递结果]
English
no_agent=True: script-only, zero LLM tokens, stdout delivered verbatim, empty stdout = silent tick. wakeAgent gate: pre-check script emits {"wakeAgent": false} on last stdout line to skip the agent call for that tick — useful for 1-5 min polls that only need the LLM when state changed. Optional context object passes structured data to the agent.
中文
Cron 任务在隔离会话中运行,无上次执行记忆。context_from 自动将上游任务最近输出前置到当前 prompt:
1 | # 阶段 1:采集 |
| 格式 | 示例 |
|---|---|
| 单任务 ID/名称 | context_from="ai-news-fetch" |
| 多任务列表 | context_from=["job_a", "job_b"] |
输出从 ~/.hermes/cron/output/{job_id}/*.md 读取,按列表顺序拼接。读取最近已完成输出——不等待同 tick 仍在运行的上游任务。
English
context_from prepends upstream jobs’ most recent completed output from ~/.hermes/cron/output/{job_id}/ to the current prompt. Accepts single job ID/name or list for fan-in. Enables collect → filter → deliver pipelines without glue code or databases.
中文
sequenceDiagram
participant T as 60s Ticker
participant L as .tick.lock
participant J as jobs.json
participant A as AIAgent
participant D as Delivery
T->>L: 获取文件锁
T->>J: 加载任务
T->>T: 筛选 due jobs (next_run <= now)
loop 每个 due job
T->>A: 创建全新会话(无历史)
opt 附加 skills
T->>A: 注入 skills + prompt + context_from
opt script 预检
T->>A: wakeAgent 门控
A->>D: 完成 → 投递
T->>J: 更新 run_count, next_run
end
T->>L: 释放锁
存储:jobs.json(原子写)、cron/output/{job_id}/。Gateway 每 60s tick,.tick.lock 防重叠;Cron 会话禁用 cronjob toolset。enabled_toolsets 可 per-job 收紧工具 schema。
English
60s tick, file lock, fresh sessions, cron toolset disabled in cron runs, enabled_toolsets for cost control, fallback provider inheritance.
中文
OpenClaw 的主动性主要通过 Gateway heartbeat 实现——周期性 Agent turn,默认 30 分钟(Anthropic OAuth 检测时为 1 小时)。
1 | { |
工作区中的 HEARTBEAT.md 是巡检 checklist——短小、稳定、适合每 30 分钟考虑:
1 | # Heartbeat Checklist |
tasks: 结构化块(任务级独立间隔):
1 | tasks: |
| 行为 | 说明 |
|---|---|
| 仅 due tasks 进入 prompt | 节省 Token |
| 无 due tasks | 跳过整个 heartbeat(reason=no-tasks-due) |
| 非 task 正文 | 追加为额外上下文 |
| 状态持久化 | heartbeatTaskState 存 session state |
一切正常时回复 HEARTBEAT_OK — 静默确认,不外发;有异常才 alert 到 target。
English
OpenClaw heartbeat: 30m cadence (1h for Anthropic OAuth), HEARTBEAT.md checklist, optional tasks: per-interval checks, HEARTBEAT_OK silent ack.
中文
OpenClaw 提供 cron 工具让 Agent 创建持久定时任务——属于高风险控制面工具:
| 风险 | 说明 |
|---|---|
| 持久性 | 任务存于 Gateway,重启后仍执行 |
| 权限扩散 | 可调度 exec/browser 等危险操作 |
| Prompt 注入 | 恶意消息诱导创建有害 cron |
| 跨会话 | 与当前聊天上下文解耦 |
硬化:tools.deny: ["cron", "gateway", "sessions_spawn"];不可信面必须 deny;openclaw security audit 定期审查。Hermes 对等:Cron 内禁用 cronjob + Prompt 扫描。
English
OpenClaw cron is high-risk persistent scheduling — deny on untrusted surfaces, minimal profiles, security audit. Hermes: cron toolset disabled in cron runs + prompt scanning.
中文
Hermes 在创建/更新时扫描 prompt:注入、凭证外泄、不可见 Unicode、SSH 后门等——阻断则拒绝创建并返回明确错误。运行时:cron_mode: deny(无人值守推荐)、enabled_toolsets 限制、脚本限于 ~/.hermes/scripts/、script_timeout_seconds 默认 120s。
English
Create/update prompt scanning blocks injection and exfiltration. Runtime: cron_mode: deny, limited toolsets, script sandbox, configurable timeout.
| 场景 | OpenClaw | Hermes |
|---|---|---|
| 30m 收件箱/日历巡检 | HEARTBEAT.md | cron + wakeAgent |
| 每日定时简报 | cron 工具 | cronjob + deliver |
| 多阶段流水线 | 单 Agent 内编排 | context_from 链 |
| 零 Token 看门狗 | — | no_agent |
| 不可信面 | deny cron | deny cronjob + Prompt 扫描 |
中文
skills=[...] 附加enabled_toolsets=["web","file"] 控制成本| 操作 | 命令 |
|---|---|
| 添加 | /cron add 30m "..." 或自然语言描述 |
| 列表 | /cron list / hermes cron list |
| 暂停/恢复 | /cron pause|resume <id> |
| 手动触发 | /cron run <id> / hermes cron tick |
| 安装调度 | hermes gateway install |
English
Hermes: self-contained prompts, skills attachment, limited toolsets, [SILENT] health checks, context_from pipelines, Nous Portal OAuth. Commands: /cron add|list|pause|resume|run, hermes gateway install.
OpenClaw: short HEARTBEAT.md, per-task intervals, activeHours, target last channel, deny cron on chat agents.
中文
自动化调度与主动巡检让个人 Agent 从「被动应答」进化为「持续值守」。OpenClaw 以 HEARTBEAT.md + 30 分钟 heartbeat + HEARTBEAT_OK 静默 提供轻量、内置的主动性,适合多渠道助理的日常巡检。Hermes 以 60 秒调度器、cronjob 统一 API、context_from 流水线、no-agent 零 Token 看门狗和 wakeAgent 门控 提供工业级无人值守能力,适合复杂流水线和成本敏感的高频轮询。安全配置的核心原则一致:不可信面 deny 调度工具,自包含 prompt,最小 toolset,失败必告警。
English
Automation and proactive monitoring evolve personal agents from reactive to always-on. OpenClaw offers lightweight proactivity via HEARTBEAT.md, 30m heartbeat, and HEARTBEAT_OK silent ack — ideal for multi-channel daily checks. Hermes offers industrial unattended capability via 60s scheduler, unified cronjob API, context_from pipelines, no-agent zero-token watchdogs, and wakeAgent gates — ideal for complex pipelines and cost-sensitive frequent polling. Shared security principle: deny scheduling tools on untrusted surfaces, self-contained prompts, minimal toolsets, and fail-loud on errors.