CLI 工具
Hermes
NousResearch 开源的自托管 AI 代理,可接入 Telegram Bot
Hermes 是 NousResearch 开源的 AI 代理框架,支持自托管 + 学习用户偏好 + Telegram Bot 接入。不需要原生订阅 OpenAI / Anthropic,挂上 VisionCoder 就能用。
- 在 API Key 管理 创建 API Key
- 已装 Node.js 18+
- Windows 用户:强烈推荐用 WSL2,Hermes 主要在 Unix 环境下测试
安装 Hermes
Section titled “安装 Hermes”打开 Terminal:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash耐心等装完(会拉依赖、初始化数据目录)。
打开 WSL2 终端:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash先进 WSL:
wsl然后跑上面的 curl 命令。
配置模型(关键步骤)
Section titled “配置模型(关键步骤)”装完后 Hermes 会问你走哪个上游,选 Custom endpoint(不是 Quick setup,那个是接 OpenAI 官方订阅)。
进入设置:
hermes model填以下两项:
Base URL: https://coder.api.visioncoder.cn/v1API Key: YOUR_API_KEY再选模型 ID。Hermes 通过 OpenAI Chat Completions 协议调用 VisionCoder,所以所有 chat 模型都能选:
| 推荐 | 适合场景 |
|---|---|
gpt-5.4 |
日常默认 |
gpt-5.5 |
复杂推理 |
claude-sonnet-5 |
偏好 Claude 风格 |
claude-opus-5 |
最强 Claude 推理 |
deepseek-v4-pro |
中文场景 / 高性价比 |
接入 Telegram Bot
Section titled “接入 Telegram Bot”Hermes 最有意思的能力是把代理挂到 Telegram,用手机直接聊。
1. 申请 Telegram Bot
Section titled “1. 申请 Telegram Bot”打开 BotFather
Telegram 里搜 @BotFather,发起对话。
创建 Bot
发 /newbot,按提示填名字(必须以 bot 结尾,比如 my_hermes_bot)。
保存 Token
BotFather 返回一串 123456:ABC-DEF... 格式的 Token。这是 Bot 的密钥,保管好。
2. 拿自己的 Telegram 数字 ID
Section titled “2. 拿自己的 Telegram 数字 ID”Hermes 需要知道哪个用户能跟 Bot 说话,避免被陌生人调用。
- 在 Telegram 里搜
@userinfobot,发任意消息 - Bot 返回的
Id: 12345678就是你的数字 ID
3. 在 Hermes 配置消息通道
Section titled “3. 在 Hermes 配置消息通道”安装流程到「选择消息通道」时:
选 Telegram
按空格选中、回车。
粘贴 Bot Token
从 BotFather 拿到的那串。
粘贴自己的 Telegram 数字 ID
从 @userinfobot 拿到的。
部署完,在 Telegram 里给你的 Bot 发消息,它会调用 VisionCoder 后端、回复你。
hermes model # 查看 / 切换模型hermes setup # 重新跑配置向导hermes --help # 完整命令清单安装脚本卡住 / 报网络错
Hermes 安装脚本要从 GitHub 拉东西。国内网络不稳的话,先 git clone https://github.com/NousResearch/hermes-agent 手动拉,然后看 README 的本地安装方式。
Telegram Bot 不回复消息
- 数字 ID 填错:Bot 只回复你的 ID,错了就装聋
- 网络问题:Bot 进程要能访问
api.telegram.org,被墙就要走代理 - 检查 Hermes 日志:默认在
~/.hermes/logs/
模型调用 401
hermes model 重设 Base URL 与 Key。注意 Base URL 必须带 /v1 后缀。
重新初始化 Hermes
hermes setup会重新走一遍配置向导,模型 / 消息通道全部重设。
- 协议端点(Hermes 实际调用的接口):POST /v1/chat/completions
- 模型列表:GET /v1/models
- Hermes 仓库:github.com/NousResearch/hermes-agent
加群 & 客服


