MCPcopy Index your code
hub / github.com/ZhangHanDong/hermes-book

github.com/ZhangHanDong/hermes-book @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
0 symbols 0 edges 1 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Hermes Agent 源码与设计

深入解读 self-improving personal agent 的工程实现

在线阅读 →

本书基于 Hermes Agent v0.8.0 源码,以"构建一个 self-improving personal agent 需要解决哪些工程问题"为主线,将产品理念、架构选择与源码实现三层交织。

全书结构

部分 章节 主题
第一部分 Ch01-02 设计赌注与仓库地图
第二部分 Ch03-05 请求旅程、AIAgent 内核、提示词系统
第三部分 Ch06-09 工具系统、工具剖面、技能系统、子代理委托
第四部分 Ch10-12 SessionDB、Memory Provider、上下文压缩
第五部分 Ch13-16 CLI/TUI、Gateway、定时调度、执行环境后端
第六部分 Ch17-22 配置、模型抽象、并发、进程生命周期、运行时容错、测试
第七部分 Ch23 设计哲学与演化方向
附录 A-D 类索引、流程图、术语表、阅读导航

四个设计赌注

全书围绕 Hermes 的四个核心设计赌注展开分析:

  • Learning Loop — agent 从经验中创建技能、自我改进、主动持久化知识
  • CLI-First — 终端是第一等公民,不是 Web UI 的附庸
  • Personal Long-Term — 跨会话记忆、用户建模、越用越懂你
  • Run Anywhere — 从 $5 VPS 到 GPU 集群,从本地到 Telegram

推荐阅读路径

路径 适合读者 章节顺序
全栈理解 想完整理解系统 前言 → Ch02 → Ch03 → 按顺序读完
想做类似产品 构建自己的 agent Ch01 → Ch04 → Ch06 → Ch08 → Ch11 → Ch14
稳定性工程 关心 7×24 不崩溃 Ch20 → Ch21 → Ch10 → Ch19
记忆与学习 关心 agent 如何学习 Ch08 → Ch10 → Ch11 → Ch12 → Ch15

本地预览

# 安装 mdbook(如未安装)
cargo install mdbook

# 预览
mdbook serve

# 构建
mdbook build

目标读者

  • 有 Python、LLM agent、CLI/服务端工程基础的开发者
  • 希望理解"如何从零构建一个可长期协作的个人 AI 代理"
  • 不需要了解 Hermes 的使用方法,不需要机器学习背景

致谢

License

MIT

Core symbols most depended-on inside this repo

Shape

For agents

$ claude mcp add hermes-book \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact