基于官方文档站 230 个页面的精读 + 本机源码实证 + 社区与 GitHub 生态调研
Hermes Agent 是 Nous Research 推出的个人 AI agent 框架。和单纯的聊天机器人不同,它强调的是「同一个大脑跑在多个入口」——同一个 agent 核心,既能跑命令行,也能接消息平台,还能开桌面窗口。
| 入口 | 说明 |
|---|---|
| 命令行 CLI | hermes 直接开聊;hermes -c 恢复上次会话 |
| 消息平台网关 | 约 20 个平台:Telegram、Discord、Slack、飞书、企业微信、微信群、元宝、QQ、Matrix、WhatsApp、Signal、Email、SMS、IRC、Line 等 |
| 终端 UI | hermes --tui(Ink/React 写的全屏界面) |
| 桌面应用 | Electron 桌面版(macOS 仅 Apple Silicon,Intel Mac 不支持) |
| 编辑器 | ACP 适配器,接 VS Code / Zed / JetBrains |
session_search 把「上周五那个 bug」找回来/learn 命令专门干这个| 资源 | 地址 |
|---|---|
| GitHub 仓库 官方 | github.com/NousResearch/hermes-agent(MIT 协议) |
| 官方文档站 | hermes-agent.nousresearch.com/docs(230 页) |
| 文档的机器可读入口 | /docs/llms.txt(全站索引)/docs/llms-full.txt(全站拼成一份,约 1.8MB) |
| 中文文档 | 文档站有 /zh-Hans/ 路径,如 /docs/zh-Hans/guides/tips |
llms.txt 值得一提:文档站专门为 AI 读者准备了机器可读入口,可以把整个文档一次性喂给任意大模型。社区还在提 issue 建议把它做成人人都能用的内置自知技能(#28505)。# Linux / macOS / WSL2
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
# Windows 原生 PowerShell
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
安装器会自动处理依赖:uv、Python 3.11、Node.js、ripgrep、ffmpeg。前提只需 git,Linux 额外需要 curl 和 xz-utils。
可选跳过项:--skip-browser(不装 Chromium)、--skip-computer-use、--no-skills(不预置技能)。
hermes setup --portal
这一步做一次 OAuth,同时搞定模型和四个工具网关(网页搜索、图片生成、TTS 语音、云浏览器),不用给每个工具单独配 key。只想换模型端点用 hermes model;要接机器人再跑 hermes gateway setup。
--ctx-size 65536,Ollama 用 -c 65536)。社区反馈说,用 4K 上下文的小模型是「最让人困惑的失败模式」。文档里有一条我很认同的规则:在一次干净的对话没跑通之前,不要叠加网关、定时任务、技能、语音。顺序是:
hermes 能聊天hermes -c 能恢复会话hermes gateway setup 接机器人| 需求 | 命令 |
|---|---|
| 更新 | hermes update(--check 只预览、--backup 更新前快照) |
| 整机搬迁 | hermes backup → 目标机 hermes import xxx.zip |
| 换个 provider 试试 | /model provider:model,如 /model zai:glm-5 |
| 看用量 / 成本 | hermes usage、hermes insights --days 7 |
hermes backup 才是完整备份(含 key、记忆、技能、会话);hermes profile export 按设计不含凭据,单独拿它迁移会丢 key。这一节是最值得先看懂的——四个概念经常被混着用,但各管一摊,用错地方要么浪费 token,要么根本不起作用。
| 概念 | 存什么 | 放哪 | 生效方式 |
|---|---|---|---|
| 技能 Skill | 「怎么做」——多步骤流程、可复用方案 | ~/.hermes/skills/<分类>/<名字>/SKILL.md | 按需加载,只在相关时进上下文 |
| 记忆 Memory | 「是什么」——环境、偏好、项目位置 | ~/.hermes/memories/MEMORY.md 和 USER.md | 每轮都注入,常驻成本 |
| 工具 Tool | 能力本体(跑命令、抓网页、看图) | 核心代码里注册 | 每次 API 调用都随 schema 发出 |
| 插件 Plugin | 能注册新工具/钩子/平台的 Python 代码 | ~/.hermes/plugins/ | 启动时加载,可改 agent 运行时行为 |
| 项目 | 额度 | 说明 |
|---|---|---|
| MEMORY.md | 约 2200 字符 | 满了要合并,不能无限塞 |
| USER.md | 约 1375 字符 | 同上 |
| 技能索引 | 约 3000 tokens | 只列名字+描述,每轮都付费;所以技能的 description 有 60 字符硬上限 |
| SKILL.md 全文 | 上限 10 万字符 | 但官方建议简单技能约 100 行、复杂约 200 行 |
| 历史会话 | 无上限 | 存在 SQLite 里,靠 session_search 召回 |
以下每条都标了来源:官方表示出自官方文档,第三方表示来自社区/博客,未标注的为我本机实测。
Alt+Enter 或 Ctrl+J 插入换行。注意 Shift+Enter 只在 Kitty / foot / WezTerm / Ghostty 这类支持独立按键的终端有效,iTerm2、Alacritty、VS Code 终端需要先启用 Kitty 键盘协议。官方Ctrl+C 按一次中断当前回复,然后输入新消息即可改方向;2 秒内双击 Ctrl+C 才是强制退出。官方Ctrl+V 把剪贴板里的图片粘进对话,自动走视觉分析——报错弹窗、界面截图不用先存成文件再传。官方/ 后按 Tab,列出全部内置命令和已装技能。官方hermes -c 恢复上一次;hermes -r "标题" 按标题挑。恢复不上先看 hermes sessions list 确认 profile 对不对。官方/verbose 在 off → new → all → verbose 之间循环,调你想要的详细度。官方subdirectory_hints.py 在工具调用期间延迟发现并注入,不会预先占系统提示。.cursorrules 和 .cursor/rules/*.mdc,从工作目录自动加载——你在 Cursor 里写的规则文件不用重写一遍。官方~/.hermes/SOUL.md 放实例级的持久人格(系统提示槽位 #1),AGENTS.md 放项目指令。但上下文文件要精简,因为每条消息都注入。/learn/learn 命令有四种用法——
/learn the REST client in ~/projects/acme-sdk, focus on auth + pagination
/learn https://docs.example.com/api/quickstart
/learn how I just deployed the staging server ← 把刚才的操作流程固化
/learn ~/books/xxx.pdf ← 大素材会变成知识库型技能
大来源会拆成「精简 SKILL.md + 索引 + references/ 每章一个提炼文件」的结构。官方hermes model → Configure auxiliary models 单独指。可配的槽位有 vision、title_generation、tts_audio_tags、compression、approval、triage_specifier、kanban_decomposer、profile_describer、delegation。官方delegation.model / delegation.provider 能让子代理跑便宜模型,主对话留在大模型上。这是官方在多模型分工上的推荐做法。官方/model 每次切换都会重置提示缓存,切换后第一条消息按全价重读整段对话。长会话里优先 delegate 或开新会话,别反复切模型。官方hermes prompt-size 离线拆解系统提示和工具 schema 的字节占用,用来定位「为什么还没说话就花了这么多」。官方/reasoning none|minimal|low|medium|high|xhigh,或 /fast 切快速模式。官方hermes config set terminal.backend docker。Docker 后端的隔离强度不低:--cap-drop ALL 只回加两个能力、no-new-privileges、--pids-limit 256、/tmp 512MB 限额 tmpfs,容器空闲 300 秒自动回收。官方terminal.persistent_shell: true 能记住 cd 和 export;本地临时开是 export TERMINAL_LOCAL_PERSISTENT=true。官方[[as_document]],图表、截图这类需要原文件的场景就不会被当成预览缩略图。官方delegate_task 派出去的,三个子代理同时跑、各自独立上下文,互不污染。其中一个跑到一半因为我的 provider 余额耗尽报 HTTP 402 中断,充值后单独重跑那一路即可——子任务失败不会连累其他路,也不用重头再来。技能是 Hermes 最核心的扩展方式:把你反复要教它的流程,写成一份按需加载的说明书。
| 层级 | 调用 | 拿到什么 | 成本 |
|---|---|---|---|
| Level 0 | skills_list() | 只有 name / description / category | 约 3000 tokens,每轮都付 |
| Level 1 | skill_view(name) | SKILL.md 全文 | 只在相关时付 |
| Level 2 | skill_view(name, path) | 只取某个 references 文件 | 需要时才付 |
这个设计解释了为什么技能的 description 必须精简:它是唯一常驻的部分,而且系统提示在第 57 个字符处就截断了。
/k8s deploy the staging manifest ← 带参数直接执行
/k8s ← 只加载,让 agent 反问你
github-pr-workflow /test-driven-development fix issue #123 ← 多个技能叠加
只在 CLI 里列技能:hermes chat --toolsets skills -q "What skills do you have?"
| 分类 | 代表技能 |
|---|---|
| apple | apple-notes、apple-reminders、findmy(FindMy 设备/AirTag)、imessage |
| autonomous-ai-agents | computer-use(驱动桌面)、hermes-agent(配置/扩展/排障 Hermes 本体)、hermes-ai-persona、claude-code、codex、opencode、skill-packaging-and-distribution |
| creative | ascii-video(视频转彩色 ASCII MP4)、architecture-diagram、dashscope-image-gen、humanizer(去 AI 味)、image-vision-and-generation、manim-video、p5js、claude-design |
| devops | sdlc-review 等 |
| email-inbox-triage、himalaya | |
| media | gif-search、songsee、youtube-content |
| note-taking | obsidian |
| productivity | docx、xlsx、pdf、maps(OpenStreetMap/OSRM)、meeting-action-items、document-processing、document-to-action-items、notion、airtable、google-workspace、box |
| research | arxiv、competitor-news-monitor、grounded-citations(带引用)、llm-wiki |
| social-media | xurl |
| software-development | github(gh CLI 管 PR/issue)、codebase-inspection、dogfood(探索式 Web QA)、systematic-debugging、test-driven-development、python-debugpy、node-inspect-debugger、requesting-code-review、simplify-code |
| web | blocked-page-recovery(抓取被拦的恢复手段) |
仓库里随附但默认不激活,需要显式安装:hermes skills install official/<分类>/<技能>
| 分类 | 里面有什么(举例) |
|---|---|
| finance | 金融分析类 |
| data-science / mlops | chroma、flash-attention、guidance、outlines |
| security | 1password 等 |
| blockchain | solana 等 |
| research | bioinformatics、osint-investigation、research-paper-writing、rss-feeds、duckduckgo-search、searxng-search |
| web-development | har-derived-api-client、page-agent |
| software-development | code-wiki、pr-lens、grill-me、subagent-driven-development、rest-graphql-debug |
| smart-home / health / gaming / payments / communication / migration | 家居、健康、游戏、支付、通讯、迁移各类 |
| yuanbao | 元宝平台相关(本机在用的平台,官方有专门分类) |
统一入口是 hermes skills。支持多个来源:official(仓库可选技能)、skills.sh(Vercel 的公开目录)、well-known(站点自行发布的技能端点)、GitHub 直连(openai/skills、anthropics/skills、huggingface/skills 等)、以及直接给 URL。
| 命令 | 作用 |
|---|---|
hermes skills browse | 分页浏览,--source 可选 all/official/skills-sh/well-known/github/clawhub/lobehub/openai/anthropic/huggingface… |
hermes skills search <关键词> | 跨源搜索,--json 给脚本用 |
hermes skills inspect <标识> | 安装前先预览 |
hermes skills install <标识> | 安装并触发安全扫描 |
hermes skills list --enabled-only | 看当前 profile 实际会加载哪些 |
hermes skills check / update | 查上游更新 / 重装有更新的 |
hermes skills audit --deep | 重扫安全问题,--deep 做 AST 级分析 |
hermes skills publish <路径> --to github --repo owner/repo | 发布自己的技能 |
hermes skills tap add owner/repo | 把 GitHub 仓库加成自定义技能源 |
hermes skills snapshot export setup.json | 导出技能清单,换机复现 |
hermes curator status|archive|restore|pin | 技能生命周期:30 天不用转 stale,90 天归档(只动 agent 自建的) |
标识的写法很灵活,都支持:
official/productivity/docx
openai/skills/k8s
skills-sh/vercel-labs/json-render/json-render-react
well-known:https://domain/.well-known/skills/<name>
https://example.com/SKILL.md ← 直接给 URL,连它引用的附件一起装
| 等级 | 来源 | 待遇 |
|---|---|---|
| builtin | 随 Hermes 发布 | 永远信任 |
| official | 仓库 optional-skills/ | 内置信任,无第三方警告 |
| trusted | openai / anthropics / huggingface 的官方仓库 | 信任 |
| community | skills.sh、well-known、自定义 GitHub 仓库 | 扫描数据外泄、提示注入、破坏性命令;非危险结论可 --force 覆盖,dangerous 结论始终拦截 |
目录结构(~/.hermes/skills/<分类>/<名字>/):
SKILL.md ← 必需
references/ ← 分主题补充文档(推荐:细节都放这)
templates/ ← 输出模板
scripts/ ← 辅助脚本(别让模型每次现写解析器)
assets/ examples/
frontmatter 最小形态:
---
name: my-skill-name
description: Concise capability statement, under sixty chars.
version: 0.1.0
author: 真实姓名 (github-handle), Hermes Agent
license: MIT
platforms: [linux, macos, windows]
metadata:
hermes:
tags: [Short, Descriptive, Tags]
related_skills: [other-skill]
---
正文推荐段落顺序:# 名字 Skill → 2-3 句简介 → ## When to Use(含「不要用在什么场景」)→ ## Prerequisites → ## How to Run → ## Quick Reference → ## Procedure(每步带可检查的完成判据)→ ## Pitfalls → ## Verification。
张三 (zhangsan), Hermes Agent。不能只写「Hermes Agent」——那等于把功劳给工具terminal、read_file、patch、search_files…),不能写已被包装的 shell 命令(grep → search_files、cat → read_file、sed → patch)/learn 从素材生成。| 项目 | 数值 |
|---|---|
| 已装技能总数 | 58 个(含 9 个已归档在 .archive/) |
| 仓库内置技能分类 | 13 个 |
| 仓库可选技能 | 534 个,22 大类 |
| 本机自建/第三方安装的 | marketing、finance、dianping-search、oo-amap、tencent-novnc-chromium-cdp、find-skill-skillhub 等 |
skills.external_dirs 里的技能只要进程可写,agent 就能用 skill_manage 直接改它;要共享只读就靠文件权限或单独 profile。②Hub 装的社区技能会做安全扫描,dangerous 结论连 --force 都覆盖不了。Hermes 的 provider 是插件化的,本机源码里就能看到 26 个 provider 插件。文档里列出的凭据环境变量(部分):
| 服务商 | 环境变量 |
|---|---|
| DeepSeek | DEEPSEEK_API_KEY |
| Anthropic | ANTHROPIC_API_KEY(也支持 OAuth) |
| OpenAI | OpenAI Codex OAuth |
| OpenRouter | OPENROUTER_API_KEY |
| Google / Gemini | GOOGLE_API_KEY / GEMINI_API_KEY |
| 阿里云 DashScope | DASHSCOPE_API_KEY(一个 key 覆盖通义全系:文本、视觉、图像、语音) |
| 智谱 / Z.AI | GLM_API_KEY / ZAI_API_KEY |
| Kimi | KIMI_API_KEY(中国区 KIMI_CN_API_KEY) |
| MiniMax | MINIMAX_API_KEY(中国区 MINIMAX_CN_API_KEY) |
| xAI | XAI_API_KEY(也支持 Grok OAuth) |
| Hugging Face | HF_TOKEN |
| GitHub Copilot | COPILOT_GITHUB_TOKEN / GH_TOKEN |
| 腾讯 | TOKENHUB_API_KEY / TOKENPLAN_API_KEY |
| 本地 | Ollama(OLLAMA_API_KEY)、LM Studio(LM_API_KEY + LM_BASE_URL) |
| 其他 | Fireworks、Novita、Nebius、GMI、Arcee、Azure Foundry、Vercel AI Gateway、Kilo Code、OpenCode… |
hermes model 里可选:OpenAI Codex(设备码)、Anthropic Claude、Nous Portal、MiniMax OAuth、xAI Grok OAuth、Qwen OAuth。也可以用 hermes auth add <provider> 直接加。
社区经验:首次测试别让本地模型纯聊天,让它做工具型任务(列目录、抓网页、总结本地文档)才看得出真实能力。
| 手段 | 做法 |
|---|---|
| 辅助任务降级 | auxiliary.vision / compression / approval / title_generation 指向便宜模型 |
| 子代理降级 | delegation.model + delegation.provider |
| 凭据轮询 | credential_pool_strategies.openrouter: round_robin、anthropic: least_used |
| 缓存时长 | prompt_caching.cache_ttl: "5m" | "1h" | "auto" |
| 查账 | hermes usage、hermes insights --days 30 |
这一节全部来自官方 FAQ 与本机实测,属于「不知道就会浪费一晚上」的类型。
📊 Context limit: 128000 tokens,或看 /usage;显式修正用 model.context_length: 131072。/reload-mcp / 中途增删工具,都会让提示缓存失效,第一条消息按全价重读整段对话。长会话里优先 delegate 或开新会话。session_search 找回来。/usr/local/bin/hermes 和 ~/.local/bin/hermes 并存、调错解释器。经典症状是 ModuleNotFoundError: No module named 'dotenv'——说明你手动跑了仓库源码而不是 venv 启动器。~/.bashrc 里放重活会拖垮每一次命令。Hermes 会起大量非交互 shell,慢初始化(nvm)、需要 TTY 的东西(tmux/read/菜单)、无条件 echo 都会造成超时或输出污染。解法是在顶部加守卫:case $- in *i*) ;; *) return;; esac。sudo npx playwright install-deps chromium;并且 sudo loginctl enable-linger <用户>,否则登出即停、开机不自启。git clone --depth 1;PyPI 常超时,改清华源 -i https://pypi.tuna.tsinghua.edu.cn/simple/。第三方MEDIA: 时用宿主可见路径。在容器里写 /workspace/report.txt 然后发 MEDIA:/workspace/... 是发不出去的。terminal.env_passthrough: [MY_TOKEN] 并在该 profile 的 .env 里定义。hermes profile create coder 会生成 ~/.local/bin/coder 别名(等价 hermes -p coder)。第三方hermes update 只迁移当前活跃 profile 的 config schema,兄弟 profile 会静默漂移(#81797、#20438)。| 资源 | 地址 |
|---|---|
| GitHub 仓库 | github.com/NousResearch/hermes-agent(MIT,main 分支) |
| 文档站 | hermes-agent.nousresearch.com/docs |
| 工具网关信息 | hermes portal info 查看已接入哪些后端,可用自带 key 逐工具覆盖 |
| Reddit 社区 | r/hermesagent、r/AI_Agents(活跃度不错) |
hermescn.org/docs/tutorials/docs/zh-Hans/guides/tipshermes: command not found 查 PATH)→ 网络层(查 GitHub/API 连通与镜像)→ 权限层;并建议用 hermes doctor 自诊断、升级后跑 hermes config migrate| 框架 | 定位 |
|---|---|
| Claude Code | 仓库内的编码代理 |
| Cursor | 编辑器内的补全与改写 |
| OpenClaw | 配置驱动的任务运行器 |
| Hermes | 跨会话自改进、能通过任意渠道找到你的通用代理 |
有一篇 Towards AI 的实测(2026-05-18,第三方)称同批 18 个任务 Hermes 胜 14 个,输的 4 个全是纯编码场景;作者认为它的胜负手是 SQLite + FTS5 的会话库能记住「上周五那个 bug」。社区多数人的结论是两个一起跑,而不是二选一。
这份报告坚持标注来源,也如实列出没验证到的部分,避免把二手说法当事实。