OpenClaw + Hermes 速查表

OpenClaw + Hermes 速查表

💡 原文中文,约4000字,阅读约需10分钟。
📝

内容提要

本文提供OpenClaw与Hermes两款AI工具的速查表,涵盖安装配置、状态诊断、网关控制、会话管理、技能工具、配置文件位置、故障排查及模型路由选择,并总结五条通用急救命令,帮助用户按场景快速运维和排障。

🔎

延伸解读

安全配置要点

安装后应立即将网关绑定到本地回环地址,防止端口暴露到公网。OpenClaw 提供 `openclaw config set gateway.bind loopback` 命令,而 Hermes 默认安全。这一步骤是防止外部访问的第一道防线,建议在配置修改后重启网关使设置生效。

故障排查思路

速查表提供了 OpenClaw 五步修复法和 Hermes 六步排查法,核心思路是先检查整体状态,再尝试自动修复,然后重启网关,最后清理残留文件或检查系统资源。这些步骤按顺序执行可解决大部分日常故障,但需注意 Hermes 的 `doctor` 只诊断不自动修复。

模型路由选择

根据任务类型选择不同模型:高频低负载任务可用免费模型(如 Gemini Flash、Groq),日常对话和草稿用 Sonnet 5 或 GLM-5.2,高难度任务用 Opus 5(建议每周 2-3 次),超长上下文用 Kimi K3(1M token),本地离线运行可用 Qwen3.6-35B-A3B 或 Gemma 4 12B(需 16GB 显存)。

Q&A

如何安装和初始化配置 OpenClaw 和 Hermes?

OpenClaw 安装后建议执行 `openclaw config set gateway.bind loopback` 将网关绑定到本地回环地址,然后运行 `openclaw doctor --fix` 自动修复常见问题,最后用 `openclaw gateway restart` 使配置生效。Hermes 可通过 `curl -fsSL https://hermes.nousresearch.com/install | bash` 安装,然后运行 `hermes setup` 进行交互式配置,并用 `hermes doctor` 检查环境是否满足要求。

如何检查 OpenClaw 和 Hermes 的运行状态?

OpenClaw 可用 `openclaw gateway status` 查看网关进程状态,`openclaw status --all` 输出完整系统状态报告,`openclaw logs --follow` 实时查看日志,`openclaw channels status --probe` 探测通信渠道。Hermes 可用 `hermes chat -q "hello"` 测试核心推理,`hermes gateway status` 查看网关状态,`hermes doctor` 进行诊断(不自动修复)。

如何管理 OpenClaw 和 Hermes 的会话?

两者通用 `/new` 清空当前会话历史但保留长期记忆,`/compact`(Hermes 也可用 `/compress`)压缩上下文。OpenClaw 独有 `/btw` 插入临时问题(不写入主历史),`/model sonnet` 切换模型。Hermes 独有 `/learn` 自动提炼技能,`/moa` 开启多模型协同,`hermes sessions list` 列出会话,`hermes sessions clean` 删除旧会话。

OpenClaw 和 Hermes 的技能和工具如何管理?

OpenClaw 用 `openclaw skills list` 查看技能,`openclaw skills install` 从 ClawHub 安装,`openclaw tools` 列出外部工具。Hermes 用 `hermes skills list` 查看技能,`hermes skills install` 安装,`hermes skills enable` 激活,`hermes curator` 管理自动生成的技能,`hermes memory setup` 配置记忆后端。

OpenClaw 和 Hermes 的配置文件分别在哪里?

OpenClaw 主配置文件为 `~/.openclaw/openclaw.json`,人格定义在 `~/.openclaw/agents/main/SOUL.md`,长期记忆在 `~/.openclaw/agents/main/MEMORY.md`,自动化规则在 `~/.openclaw/agents/main/AGENTS.md`。Hermes 主配置文件为 `~/.hermes/config.yaml`,当前 profile 记录在 `~/.hermes/active_profile`,人格定义在 `~/.hermes/souls/default.md`,会话和记忆存储在 `~/.hermes/state.db`,技能目录为 `~/.hermes/skills/`。

OpenClaw 和 Hermes 的故障排查步骤是什么?

OpenClaw 五步修复法:1. `openclaw status --all` 查看整体状态;2. `openclaw doctor --fix` 自动修复;3. `openclaw gateway restart` 重启网关;4. 删除会话锁文件 `rm ~/.openclaw/agents/main/sessions/*.lock`;5. 用 `curl -sf http://127.0.0.1:18789/health` 探测健康端点。Hermes 六步排查法:1. `hermes chat -q "hello"` 测试推理;2. `hermes gateway status` 检查网关;3. `hermes config show | grep -A3 allowed` 查看权限;4. `cat ~/.hermes/active_profile` 确认 profile;5. `ps aux | grep -E 'hermes|openclaw'` 检查重复进程;6. `dmesg | grep -i "killed process"` 检查 OOM。

如何根据任务类型选择模型?

心跳、定时任务、简单分类:Gemini Flash 或 Groq(免费,成本最低);日常对话、草稿、研究:Sonnet 5 或 GLM-5.2(输出稳定);高难度任务:Opus 5(每周 2-3 次,贵但精准);超长上下文:Kimi K3(1M token 窗口);本地离线运行:Qwen3.6-35B-A3B 或 Gemma 4 12B(16GB 显存可跑,免费)。

遇到通用故障时,有哪些急救命令?

按顺序执行:1. 查状态:`openclaw status --all` 或 `hermes doctor`;2. 自动修复:`openclaw doctor --fix` 或 `hermes doctor`;3. 重启网关:`openclaw gateway restart` 或 `hermes gateway restart`;4. 清会话:`/new`;5. 锁定网关:`openclaw config set gateway.bind loopback`(仅 OpenClaw,Hermes 默认安全)。

🏷️

标签

➡️

继续阅读