项目简介
Hermes Agent 是由 Nous Research 构建的自我改进 AI 代理。它拥有内置学习循环,能从经验中创建技能并主动持久化知识。支持多种消息平台、任何 LLM 提供商,并可在各种后端上运行。
README 预览
\n \n\n\n# Hermes Agent ☤\n\n\n \n \n \n \n \n\n\n**The self-improving AI agent built by [Nous Research](https://nousresearch.com).** It's the only agent with a built-in learning loop — it creates skills from experience, improves them during use, nudges itself to persist knowledge, searches its own past conversations, and builds a deepening model of who you are across sessions. Run it on a $5 VPS, a GPU cluster, or serverless infrastructure that costs nearly nothing when idle. It's not tied to your laptop — talk to it from Telegram while it works on a cloud VM.\n\nUse any model you want — [Nous Portal](https://portal.nousresearch.com), [OpenRouter](https://openrouter.ai) (200+ models), [NVIDIA NIM](https://build.nvidia.com) (Nemotron), [Xiaomi MiMo](https://platform.xiaomimimo.com), [z.ai/GLM](https://z.ai), [Kimi/Moonshot](https://platform.moonshot.ai), [MiniMax](https://www.minimax.io), [Hugging Face](https://huggingface.co), OpenAI, or your own endpoint. Switch with `hermes model` — no code changes, no lock-in.\n\n\nA real terminal interfaceFull TUI with multiline editing, slash-command autocomplete, conversation history, interrupt-and-redirect, and streaming tool output.\nLives where you doTelegram, Discord, Slack, WhatsApp, Signal, and CLI — all from a single gateway process. Voice memo transcription, cross-platform conversation continuity.\nA closed learning loopAgent-curated memory with periodic nudges. Autonomous skill creation after complex tasks. Skills self-improve during use. FTS5 session search with LLM summarization for cross-session recall. Honcho dialectic user modeling. Compatible with the agentskills.io open standard.\nScheduled automationsBuilt-in cron scheduler with delivery to any platform. Daily reports, nightly backups, weekly audits — all in natural language, running unattended.\nDelegates and parallelizesSpawn isolated subagents for parallel workstreams. Write Python scripts that call tools via RPC, collapsing multi-step pipelines into
常见问题 (5)
故障排除为什么在 Linux 上运行 'hermes desktop' 会出现 'ENOENT: no such file or directory, rename electron -> Hermes' 的错误?
该错误由每用户Electron下载缓存中损坏的Electron发行版缓存zip文件导致。请删除缓存文件并重新运行构建。
- 对于Linux:rm ~/.cache/electron/electron-v*.zip (或指定版本,例如 rm ~/.cache/electron/electron-v40.9.3-linux-x64.zip)
- 对于macOS:rm ~/Library/Caches/electron/*.zip
- 对于自定义缓存的macOS:若设置了XDG_CACHE_HOME或ELECTRON_CACHE,请遵循对应路径。
清除损坏的zip文件后,重新执行'hermes desktop'。构建将重新下载干净的Electron发行版并成功完成。这是一个已知问题,跟踪编号为#39127(自愈缓存清除)。
故障排除如何修复 Hermes tui_gateway 中的 'result of groups.log violates its wire contract' 错误(display_name/profile 上的 RoomActor extra_forbidden)?
原因:tui_gateway/contracts/groups_bot_relay.py 中的 RoomActor 契约模型仅声明了 kind 和 id,并设置了 extra="forbid",而 gateway/hosted_room_discussion.py 中的生产者 _member_actor() 还会额外发出 profile、display_name 和 connection_id。该 actor 字典被原样持久化为 state.db 中的 actor_json,并在每次加载 groups.log 页面时重放,因此每个由成员产生的事件都会重新触发校验错误(或在 HERMES_TEST_ISOLATION=1 下抛出 ContractViolation)。
修复:在 RoomActor 上声明这些可选字段,使其与 gateway/hosted_rooms.py 中的 _OPTIONAL_ACTOR_FIELDS 保持一致:
class RoomActor(Result):
kind: str
id: str
profile: str | None = None
display_name: str | None = None
connection_id: str | None = None
然后运行 scripts/gen_gateway_contracts.py(依照 tui_gateway/AGENTS.md)重新生成契约产物,以更新 apps/shared/src/gateway-contract.generated.ts 和 gateway-contract.openrpc.json。修复模式与 issue #118067/profiles.list 相同(ProfileRow 缺少 previous_names),该问题已在提交 9a4a598bfcd 中修复。可选地,可以添加一个不变量测试,断言与 _member_actor() 结构相同的字典能通过 RoomActor 校验。
故障排除为什么 Hermes Desktop 在 Windows 上显示"We couldn't reach the update server",以及如何修复?
这条消息具有误导性——通常并不是网络故障。在由官方 bootstrap 安装程序创建的 Windows 安装中,git 仅被安装到包管理器工具存储目录(%LOCALAPPDATA%\hermes\tools\git-<ver>-win32-x64),但 Desktop 的 resolveGitBinary() 从不探测该位置。在未安装 Git for Windows 且 PATH 中没有 git 的情况下,更新检查会以 head-unavailable("Could not read the installed revision.")失败,而 UI 会将其错误地标记为服务器可达性问题。
确认真正的原因:打开 %HERMES_HOME%\source-checks\<install_id>.json——如果你看到 "error": "head-unavailable" 且 "currentSha": null,说明未找到 git(而不是网络问题)。
临时解决方法(任选其一):
1. 创建一个 junction,使托管的 git 与应用探测的路径一致。在 Command Prompt(而非 PowerShell)中:
mklink /J "%LOCALAPPDATA%\hermes\git" "%LOCALAPPDATA%\hermes\tools\git-2.53.0+3-win32-x64"
(调整版本文件夹名称以匹配你的安装),然后重启应用。
2. 安装 Git for Windows(安装到 C:\Program Files\Git 或 %LOCALAPPDATA%\Programs\Git),或将 git 添加到你的 PATH——解析器会探测这两个位置。
请注意,在相同的安装形态下,这还会影响其他 Desktop git 功能(worktrees、review、分支操作)。永久修复需要更新 apps/desktop/electron/main.ts 中的 resolveGitBinary(),使其探测 %LOCALAPPDATA%\hermes\tools\git-* 存储目录。
故障排除为什么Hermes Desktop应用中的聊天滚动条会向后跳动?
这是 useThreadScrollAnchor 逻辑(thread-virtualizer.tsx)中的一个已知错误。ResizeObserver 的解除条件在中间滚动事件中误触发,导致 sticky-bottom 行为暂时失效。该修复已合并到 PR #38221 中,并将包含在 Hermes Desktop v0.15.2 中。在此之前,作为临时解决方案,请尽量减少 composer 的大小调整(例如,关闭 suggestion chips,避免大型代码块重新渲染),或手动将滚动保持在底部。
故障排除为什么Hermes磁盘清理会删除cron/jobs.json,以及如何阻止它?
当旧的 tracked.json 条目(来自 cron 分类修复之前的 Hermes 版本)将 cron/jobs.json 标记为 "cron-output" 时,会导致 disk-cleanup 在 14 天后将其删除。为防止删除,请手动编辑 tracked.json 文件(位于 ~/.hermes/disk-cleanup/tracked.json),移除所有涉及 cron/jobs.json 或 cron/ 目录的条目,然后重启 Hermes。较新版本(在 commit d473e7c93 之后)不会添加此类条目,但已有的陈旧条目必须手动清除。