CLI 工具
Hermes
OpenAI Chat Completions 协议:把 NousResearch 开源的自托管 AI 代理 Hermes 指向 VisionCoder,可接入 Telegram Bot
Hermes 是 NousResearch 开源的 AI 代理框架,支持自托管、学习用户偏好和 Telegram Bot 接入。Hermes 通过 OpenAI Chat Completions 协议调用模型,可直接使用 VisionCoder。
| 项目 | 值 |
|---|---|
| API Key | 在 API Key 管理 创建 |
| Base URL | https://visioncoder.cn/v1(必须带 /v1) |
| 运行环境 | Node.js 18+;Windows 推荐使用 WSL2(Hermes 主要在 Unix 环境下测试) |
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 命令。
安装后 Hermes 会询问使用哪个上游,选择 Custom endpoint。不要选 Quick setup,它对接的是 OpenAI 官方订阅。
也可随时进入设置:
hermes model填写:
Base URL: https://visioncoder.cn/v1API Key: YOUR_API_KEY然后选择模型 ID,例如 gpt-5.4 或 claude-opus-5。
接入 Telegram Bot(可选)
Section titled “接入 Telegram Bot(可选)”创建 Bot
在 Telegram 中搜索 @BotFather 并发起对话,发送 /newbot,按提示填写名字(必须以 bot 结尾,例如 my_hermes_bot)。BotFather 返回形如 123456:ABC-DEF... 的 Token,这是 Bot 的密钥,需妥善保管。
获取自己的数字 ID
Hermes 需要知道哪些用户可以与 Bot 对话,避免被陌生人调用。在 Telegram 中搜索 @userinfobot 并发送任意消息,返回的 Id: 12345678 即你的数字 ID。
在 Hermes 中配置消息通道
安装流程进入「选择消息通道」时:按空格选中 Telegram 并回车,粘贴 BotFather 返回的 Token,再粘贴自己的数字 ID。
配置完成后,在 Telegram 中给你的 Bot 发一条消息。Bot 调用 VisionCoder 并回复,即配置成功。未配置 Telegram 时,可运行 hermes 的对话入口验证;命令清单见 hermes --help。
运行 hermes model 查看或切换模型。常用命令:
hermes model # 查看 / 切换模型hermes setup # 重新运行配置向导hermes --help # 完整命令清单可用模型 ID 以 GET /v1/models 的返回为准,价格见 模型价格。
安装脚本卡住或报网络错误
原因:安装脚本需要从 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 setup 重新走一遍配置向导,模型和消息通道都会重设。
