来源:Hermes Agent 官方文档 + 实际使用验证
适用版本:Hermes Agent v0.11+
范围:本文档覆盖 Hermes 的内部子命令、后台系统、底层配置、slash commands、agent 派生
区别于hermes-commands-cheatsheet.md(常用命令),本文档聚焦进阶/底层功能
目录
- MCP 服务器
- 认证与凭据池
- 插件管理
- 内存系统
- ACP / IDE 集成
- 其他内部命令
- In-Session Slash Commands
- 派生 Agent 实例
- Durable & Background Systems
- Voice & Transcription
- 安全与隐私开关
- 配置章节详解
1. MCP 服务器
# 启动 Hermes 作为 MCP server(让 Claude Desktop / 其他 MCP client 连接)hermes mcp serve# 加 MCP serverhermes mcpaddmyserver--urlhttp://localhost:8080 hermes mcpaddmyserver--command"node /path/to/server.js"# 删除hermes mcp remove myserver# 列出hermes mcp list# 测试连接hermes mcptestmyserver# 切换 tool 选择hermes mcp configure myserver解释:MCP (Model Context Protocol) 是 Anthropic 开放的标准,让外部工具/数据源接入 LLM。mcp serve把 Hermes 本身变成 MCP server(暴露它的工具);mcp add让 Hermes 连接其他 MCP server。
2. 认证与凭据池
# 交互式添加凭据hermes auth hermes authaddopenai-codex# OAuth flowhermes authaddanthropic# API key# 列出hermes auth list hermes auth list openai# 按 provider 过滤# 删除hermes auth remove openai-codex0# provider + index# 重置 exhaustion 状态(key 被标记为耗尽后)hermes auth reset openai解释:Hermes 支持凭据池 — 同一个 provider 可以配多个 API key,自动轮换避免限流。auth list <provider>看每个 key 的状态。exhaustion表示 key 被标记为暂时用完(rate limit 等),reset恢复。
3. 插件管理
# 列出已装插件hermes plugins list# 安装hermes pluginsinstallhoncho hermes pluginsinstall<github-url># 卸载hermes plugins remove honcho常用插件:
honcho— 跨 session 内存(推荐)kanban— 多 agent 协作web-search— 内置(不需要装)
4. 内存系统
# Honcho 集成hermes honcho setup# 配置hermes honcho status# 状态# Memory providerhermes memory setup# 初始化hermes memory status# 看配置hermes memory off# 禁用# 内存后端:built-in, Honcho, Mem0(看 plugins)配置示例:
memory:memory_enabled:trueuser_profile_enabled:trueprovider:honcho# 或 built-in / mem0解释:Memory 跨 session 持久化。Honcho 是 Nous Research 出的分布式 memory 服务,能在多 device 同步。“User profile” 让 Hermes 自动学习 Jack 的偏好(已经看到了 Jack 收藏的文章)。
5. ACP / IDE 集成
hermes acp# 启动 ACP serverACP= Agent Client Protocol。让 IDE(VS Code、JetBrains)作为 client 连接 Hermes。配置例子(VS Codesettings.json):
{"acp.agent.command":"hermes","acp.agent.args":["acp"]}解释:通过 ACP,IDE 内的文件/项目直接喂给 Hermes agent,agent 改文件、跑命令像在 CLI 一样。
6. 其他内部命令
# 平台 DM 授权(首次有人 DM Telegram bot 需 admin 批准)hermes pairing list hermes pairing approve<code>hermes pairing revoke<code># 更新到最新版本hermes update# 卸载 Hermeshermes uninstall# 从 OpenClaw 迁移(老项目)hermes claw migrate# Shell 自动补全hermes completionbash>~/.bash_completion hermes completionzsh>"${fpath[1]}/_hermes"# 用量分析hermes insights--days30# Debug 报告(上传到 nous 服务器,生成可分享链接)hermes debug解释:pairing用于 DM-first 平台(Telegram、Discord、Signal)防止陌生人触发 agent。update拉最新 release。debug打包 system info + logs + config,输出一个 URL 给开发者定位问题。
7. In-Session Slash Commands
这些是 chat session 内的命令,输入/触发。
Session 控制
/new (/reset) 全新 session /clear 清屏 + 新 session(CLI) /retry 重发上一条 /undo 删最后一个 exchange /title [name] 命名当前 session /compress 手动压缩 context /stop kill 后台进程 /rollback [N] 恢复 filesystem checkpoint /snapshot [sub] 创建/恢复 Hermes 状态快照(CLI) /background <prompt> 后台跑 prompt /queue <prompt> 排队到下一 turn /steer <prompt> 在下一个 tool call 后注入(不打断当前) /agents (/tasks) 列出活跃 subagent 和 running task /resume [name] 恢复命名 session /goal [text|sub] 设定持续目标(agent 跨 turn 工作直到完成) sub: status, pause, resume, clear /redraw 强制刷新 UI(CLI)配置
/config 显示配置(CLI) /model [name] 显示或切换模型 /personality [name] 设定 personality /reasoning [level] none|minimal|low|medium|high|xhigh|show|hide /verbose off → new → all → verbose /voice [on|off|tts] voice 模式 /yolo 切换 approval bypass /busy [sub] 控制 Enter 行为(queue, steer, interrupt, status) /indicator [style] 选 busy-indicator(kaomoji, emoji, unicode, ascii) /footer [on|off] gateway 元数据 footer /skin [name] 改主题(CLI) /statusbar 切换状态栏Tools & Skills
/tools 管理工具(CLI) /toolsets 列出 toolset(CLI) /skills 搜索/安装 skills(CLI) /skill <name> 加载 skill 到 session /reload-skills 重新扫描 ~/.hermes/skills/ /reload 重载 .env(CLI) /reload-mcp 重载 MCP servers /cron 管理 cron jobs(CLI) /curator [sub] 后台 skill 维护(status, run, pin, archive, ...) /kanban [sub] 多 profile 协作看板(tasks, links, comments) /plugins 列出插件(CLI)Gateway
/approve 批准待执行的命令 /deny 拒绝 /restart 重启 gateway /sethome 当前 chat 设为 home channel /update 更新 gateway /topic [sub] Telegram DM topic session /platforms (/gateway) 看平台连接状态Utility
/branch (/fork) 分叉当前 session /fast 切换 priority/fast /browser 开 CDP 浏览器 /history 历史(CLI) /save 保存对话到文件(CLI) /copy [N] 复制最后一条到剪贴板 /paste 附剪贴板图片 /image 附本地图片Info
/help 命令列表 /commands [page] 浏览命令 /usage token 用量 /insights [days] 分析 /gquota Gemini 配额 /status session 信息 /profile 当前 profile /debug 上传 debug 报告Exit
/quit (/exit, /q) 退出 CLI解释:slash commands 是 in-session 的快捷操作。/goal是 Hermes 独有 — 设定目标后 agent 跨多个 turn 工作直到完成(适合长任务)。
8. 派生 Agent 实例
8.1 vsdelegate_task的选择
delegate_task | Spawnhermesprocess | |
|---|---|---|
| 隔离 | 独立对话,共享 process | 完全独立 process |
| 时长 | 分钟级 | 小时/天 |
| 工具 | 父 agent 工具的子集 | 完整工具 |
| 交互 | 否 | 是(PTY) |
| 场景 | 快速并行子任务 | 长自主任务 |
8.2 One-shot 模式
# 前台跑terminal(command="hermes chat -q 'Research GRPO papers and write to ~/research/grpo.md'",timeout=300)# 后台跑(不阻塞当前 turn)terminal(command="hermes chat -q 'Set up CI/CD for ~/myapp'",background=true)8.3 Interactive PTY 模式(用 tmux)
# 启动派生 agentterminal(command="tmux new-session -d -s agent1 -x 120 -y 40 'hermes'",timeout=10)# 等启动完后发消息terminal(command="sleep 8 && tmux send-keys -t agent1 'Build a FastAPI auth service' Enter",timeout=15)# 读输出terminal(command="sleep 20 && tmux capture-pane -t agent1 -p",timeout=5)# 后续指令terminal(command="tmux send-keys -t agent1 'Add rate limiting middleware' Enter",timeout=5)# 退出terminal(command="tmux send-keys -t agent1 '/exit' Enter && sleep 2 && tmux kill-session -t agent1",timeout=10)8.4 多 Agent 协调
# Agent Aterminal(command="tmux new-session -d -s backend -x 120 -y 40 'hermes -w'",timeout=10)terminal(command="sleep 8 && tmux send-keys -t backend 'Build REST API for user management' Enter",timeout=15)# Agent B(同时跑)terminal(command="tmux new-session -d -s frontend -x 120 -y 40 'hermes -w'",timeout=10)terminal(command="sleep 8 && tmux send-keys -t frontend 'Build React dashboard' Enter",timeout=15)# 互相传递上下文terminal(command="tmux capture-pane -t backend -p | tail -30",timeout=5)terminal(command="tmux send-keys -t frontend 'Here is the API schema from backend: ...' Enter",timeout=5)8.5 Session Resume
# 恢复最近 sessionterminal(command="tmux new-session -d -s resumed 'hermes --continue'",timeout=10)# 恢复指定 sessionterminal(command="tmux new-session -d -s resumed 'hermes --resume 20260225_143052_a1b2c3'",timeout=10)8.6 派生参数
# -w (worktree) — 隔离 git 改动hermes-wchat-q"Add OAuth"# -p (profile) — 用指定 profilehermes-pmyproject chat-q"..."# 预加载 skillshermes-s"kimi-model-setup,plan"chat-q"Build a CLI tool"# 传 session ID 给后续 system prompthermes --pass-session-id chat-q"..."解释:-w防止多 agent 在同一 git 仓库改文件冲突。-p切换 profile(独立 config/skills/memory)。-s预加载 skills(跳过自动触发)。
9. Durable & Background Systems
四个"持久化"系统:subagent 派生、cron、curator、kanban。
9.1 Delegation (delegate_task)
# 通过 LLM 工具调用(不是 CLI)# 实际是 in-session 调:delegate_task(goal="...",context={...},toolsets=[...])delegate_task(tasks=[{goal:...},{goal:...}],...)# 并行配置:
delegation:model:kimi-k2.6provider:kimi-coding-cnmax_iterations:50reasoning_effort:mediummax_concurrent_children:3# 并行上限max_spawn_depth:1# 不允许嵌套不持久:父 agent 中断时子任务被取消。需要持久化用cronjob或terminal(background=true, notify_on_complete=true)。
9.2 Cron(持久化调度)
hermescroncreate"0 9 * * *"\--prompt"Daily report"\--skillsreport-aggregator\--delivertelegram\--deliver-extrachat_id=-1001234567890支持的 schedule 格式:
"30m","2h"— 持续时间"every monday 9am"— 自然语言"0 9 * * *"— 5-field cron"2026-07-01T09:00:00"— ISO 时间戳
不变量:
- 每次 run 3 分钟硬中断
.tick.lock防多 process 重复 tick- cron session 默认
skip_memory=True - 投递用 header/footer 框架,不污染目标 session
9.3 Curator(skill 生命周期)
hermes curator status hermes curator run# 立即跑维护hermes curator pause hermes curator resume hermes curator pin<skill># 钉住 = 不会被自动归档hermes curator unpin<skill>hermes curator archive<skill># 归档(不删除)hermes curator restore<skill>hermes curator prune hermes curator backup hermes curator rollback作用:后台维护 agent 创建的 skill。追踪使用率、标记 idle skill 为 stale、归档 stale。created_by: "agent"的 skill 才会被 curator 处理(in-repo + hub-installed 不动)。不删除,最大动作是 archive。
遥测:~/.hermes/skills/.usage.json记录use_count/view_count/last_activity_at/state/pinned。
配置:
curator:enabled:trueinterval_hours:24min_idle_hours:72stale_after_days:30archive_after_days:90backup:enabled:truekeep:59.4 Kanban(多 Agent 协作)
hermes kanban init hermes kanban create"Implement X"--assignbackend hermes kanban list# 别名 lshermes kanban show<id>hermes kanban assign<id>frontend hermes kanbanlink<id><other-id># 任务间链接hermes kanban comment<id>"..."hermes kanban complete<id>hermes kanban block<id>"等待 Y"hermes kanban unblock<id>hermes kanban archive<id>hermes kanbantail<id># 跟 loghermes kanbanwatch# 实时hermes kanban stats hermes kanban runs hermes kanban log<run-id>hermes kanban dispatch# 启动 dispatcherhermes kanban daemon# 后台跑 dispatcherhermes kanban gc# 清理特性:
- 持久化 SQLite board
- Dispatcher 自动 reclaim stale claims、原子认领任务、spawn 派给 profile
failure_limit次连续失败后自动 block task- Worker 通过
kanban_*toolset 交互(被HERMES_KANBAN_TASKenv gate) - Board 是隔离边界,tenant 是 workspace-path + memory-key 隔离
10. Voice & Transcription
10.1 STT(语音 → 文本)
# 自动转录(无需命令)— gateway 收到 voice message 自动转# 配置 provider:hermes configsetstt.enabledtruehermes configsetstt.provider groq# local / groq / openai / mistralhermes configsetGROQ_API_KEY ***# free tier优先级(自动检测):
- Local faster-whisper— 免费:
pip install faster-whisper - Groq Whisper— 免费 tier
- OpenAI Whisper— 付费
- Mistral Voxtral— 付费
stt:enabled:trueprovider:locallocal:model:base# tiny/base/small/medium/large-v310.2 TTS(文本 → 语音)
| Provider | Env Var | Free? |
|---|---|---|
| Edge TTS | (none) | ✓ 默认 |
| ElevenLabs | ELEVENLABS_API_KEY | Free tier |
| OpenAI | VOICE_TOOLS_OPENAI_KEY | 付费 |
| MiniMax | MINIMAX_API_KEY | 付费 |
| Mistral Voxtral | MISTRAL_API_KEY | 付费 |
| NeuTTS (local) | 无(pip install neutts[all]) | ✓ Free |
用法:
/voice on— voice-to-voice 模式/voice tts— 总是用 voice/voice off— 关闭
11. 安全与隐私开关
11.1 Secret Redaction
hermes configsetsecurity.redact_secretstrue# 默认开hermes configsetsecurity.redact_secretsfalse# 调试用重要:redact_secrets在启动时 snapshot,session 中改不生效。要重启 Hermes。
效果:tool output (terminal/read_file/web/subagent) 自动 scan 看起来像 API key/token 的字符串再进 context。
11.2 PII Redaction(Gateway)
hermes configsetprivacy.redact_piitrue# 开启hermes configsetprivacy.redact_piifalse# 默认关效果:Gateway 哈希 user ID,剥电话号码后再喂给 model。
11.3 Command Approvals
hermes configsetapprovals.mode manual# 默认:每次危险命令都问hermes configsetapprovals.mode smart# 推荐:LLM 判风险hermes configsetapprovals.mode off# 全跳过hermes--yolo# 单次 bypassexportHERMES_YOLO_MODE=1# 临时开不变量:YOLO 不关 secret redaction(独立机制)。
11.4 Shell Hooks Allowlist
# 首次跑会交互式询问# 手动管理:~/.hermes/shell-hooks-allowlist.json解释:Shell hook 是触发器(pre/post command),需明确 allowlist 后才执行。
11.5 禁用网络/媒体工具
hermes tools# curses UI 切换# 改动需新 session(/reset)生效12. 配置章节详解
~/.hermes/config.yaml的所有顶层 section:
| Section | 关键 keys | 作用 |
|---|---|---|
model | default,provider,base_url,api_key,context_length | LLM 配置 |
agent | max_turns(90),tool_use_enforcement | 主循环 |
terminal | backend(local/docker/ssh/modal),cwd,timeout(180) | 命令执行 |
compression | enabled,threshold(0.50),target_ratio(0.20) | Context 压缩 |
display | skin,tool_progress,show_reasoning,show_cost | UI |
stt | enabled,provider(local/groq/openai/mistral) | 语音转文本 |
tts | provider(edge/elevenlabs/openai/MiniMax/mistral/neutts) | 文本转语音 |
memory | memory_enabled,user_profile_enabled,provider | 跨 session 内存 |
security | tirith_enabled,website_blocklist,redact_secrets | 安全 |
delegation | model,provider,max_iterations(50),max_concurrent_children(3) | subagent |
checkpoints | enabled,max_snapshots(50) | filesystem 快照 |
curator | enabled,interval_hours(24),stale_after_days(30) | skill 维护 |
auxiliary | vision,compression,title_generation各自的 provider | 辅助模型 |
Toolsets(按需启用)
hermes toolsenableNAME hermes tools disable NAME完整列表(toolsets.py::_HERMES_CORE_TOOLS):
| Toolset | 用途 |
|---|---|
web | Web 搜索 + 内容提取 |
search | 仅搜索(web 子集) |
browser | 浏览器自动化(Browserbase/Camofox/local Chromium) |
terminal | Shell 命令 |
file | 读/写/搜索/patch |
code_execution | 沙箱 Python |
vision | 图像分析 |
image_gen | AI 图像生成 |
video | 视频分析/生成 |
tts | TTS |
skills | skill 浏览/管理 |
memory | 内存 |
session_search | 搜历史对话 |
delegation | subagent |
cronjob | cron |
clarify | 问用户澄清 |
messaging | 跨平台消息 |
todo | session 内 todo |
kanban | 多 agent 看板(worker 默认 gate) |
debugging | 调试(默认关) |
safe | 低风险 toolset |
spotify | Spotify |
homeassistant | 智能家居(默认关) |
discord/discord_admin | Discord |
feishu_doc/feishu_drive | 飞书 |
yuanbao | 元宝 |
rl | 强化学习(默认关) |
moa | Mixture of Agents(默认关) |
注意:toolset 改动需要/reset新 session 才生效(避免破坏 prompt cache)。
路径速查
| 用途 | 路径 |
|---|---|
| 配置 | ~/.hermes/config.yaml |
| 环境变量 | ~/.hermes/.env |
| 认证 | ~/.hermes/auth.json |
| 会话存储 | ~/.hermes/state.db(SQLite + FTS5) |
| Gateway 日志 | ~/.hermes/logs/gateway.log |
| Skills 根 | ~/.hermes/skills/<cat>/<name>/ |
| Profile skills | ~/.hermes/profiles/<name>/skills/... |
| Profile config | ~/.hermes/profiles/<name>/config.yaml |
| Skill 使用遥测 | ~/.hermes/skills/.usage.json |
| Shell hooks 允许列表 | ~/.hermes/shell-hooks-allowlist.json |
| 源码(git 安装) | ~/.hermes/hermes-agent/ |
相关 Skills
hermes-agent— 完整参考(本文档是浓缩)kimi-model-setup— Kimi/MiniMax 配置hermes-agent-skill-authoring— 写 SKILL.md 规范skill-invocation— 何时加载哪个 skillhermes-webhook-integration— Webhook 集成
生成时间:2026-06-05
来源:Hermes Agent 官方文档 + 实际使用经验
对应文档:hermes-commands-cheatsheet.md(常用命令)