Hermes Agent + Web UI 完整指南:安装、微信配置、模型设置与卸载
简介
Hermes Agent 是由 Nous Research 构建的自我改进型 AI 智能体,具备持续学习、技能自动创建、跨会话记忆等独特能力。配合 Hermes Web UI,你可以通过全功能 Web 面板管理聊天会话、监控用量、配置平台渠道、管理定时任务。
本文将基于快速安装流程,带你完成从安装到微信对话配置、模型选择、以及卸载的完整流程。
一、快速安装 Hermes Agent
前置要求
- Linux / macOS / WSL2:直接安装
- Windows:需先安装 WSL2
- Android:通过 Termux 安装(使用
.[termux]精简依赖)
一键安装
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
安装器会自动处理平台特定的配置。
Receiving objects: 100% (43711/43711), 129.24 MiB | 11.54 MiB/s, done.
Resolving deltas: 100% (30701/30701), done.
✓ Cloned via HTTPS
✓ Repository ready
→ Creating virtual environment with Python 3.11...
Using CPython 3.11.15
Creating virtual environment at: venv
Activate with: source venv/bin/activate
✓ Virtual environment ready (Python 3.11)
→ Installing dependencies...
安装到上面 这个位置会时间长一些耐心等待
安装后初始化
source ~/.bashrc # 或 source ~/.zshrc
hermes # 启动交互式对话
完整设置向导
hermes setup # 一次性完成所有配置
设置向导会引导你完成:
- LLM 提供商和模型选择
- API 密钥配置
- 消息渠道设置(Telegram、Discord、微信等)
- 工具启用
二、安装 Hermes Web UI
方式一:npm 安装(推荐)
npm install -g hermes-web-ui
hermes-web-ui start
访问 http://localhost:8648 即可打开 Web 管理面板。
方式二:一键自动安装
自动检测系统并安装 Node.js(如未安装)和 Web UI,支持 Debian/Ubuntu/macOS:
bash <(curl -fsSL https://cdn.jsdelivr.net/gh/EKKOLearnAI/hermes-web-ui@main/scripts/setup.sh)
方式三:Docker Compose
docker compose up -d --build hermes-agent hermes-webui
访问 http://localhost:6060(可通过 PORT=16060 环境变量自定义端口)。
Web UI CLI 命令速查
| 命令 | 说明 |
|------|------|
| hermes-web-ui start | 后台启动 Web UI |
| hermes-web-ui start --port 9000 | 自定义端口启动 |
| hermes-web-ui stop | 停止后台进程 |
| hermes-web-ui restart | 重启 |
| hermes-web-ui status | 查看运行状态 |
| hermes-web-ui update | 更新到最新版本 |
三、配置微信对话
方案 A:Hermes 原生微信支持
Hermes Agent 原生支持微信,通过腾讯 iLink API 实现。
1. 启动微信 Gateway
hermes gateway setup
在设置向导中选择 WeChat(微信),系统会引导你:
- 启用微信渠道
- 配置提及控制和消息模式
2. 启动 Gateway
hermes gateway start
首次使用时,需要在浏览器中打开二维码页面进行微信扫码登录,凭证会自动保存到 ~/.hermes/auth.json。
3. 通过 Web UI 配置
打开 Web UI (http://localhost:8648) → 平台渠道 → 微信,可以:
- 启用/禁用微信渠道
- 配置提及控制
- 设置提及模式
- 扫码登录(浏览器扫码,自动保存凭证)
方案 B:HermesClaw(Hermes + OpenClaw 双开)
如果你需要在同一个微信账号上同时运行 Hermes 和 OpenClaw:
curl -fsSL https://raw.githubusercontent.com/AaronWong1999/hermesclaw/main/install.sh | bash
HermesClaw 作为唯一的 iLink 轮询者,通过双代理架构让两个 Gateway 各连各的,互不冲突。
微信命令切换:
| 命令 | 说明 |
|------|------|
| /hermes | 仅路由到 Hermes |
| /openclaw | 仅路由到 OpenClaw |
| /both | 同时路由到两者 |
| /whoami | 查看当前路由状态 |
默认路由为 Hermes。在
/both模式下,回复会标注[Hermes Agent]/[OpenClaw]。
四、配置模型
方式一:交互式配置
hermes model
会引导你选择提供商和模型。
方式二:CLI 直接设置
hermes model [provider:model]
例如:
hermes model openrouter:anthropic/claude-sonnet-4
hermes model openai:gpt-4o
方式三:对话中切换
在任意对话中使用:
/model openrouter:anthropic/claude-sonnet-4
支持的提供商
| 提供商 | 说明 |
|--------|------|
| OpenRouter | 200+ 模型,推荐首选 |
| OpenAI | GPT-4o、GPT-4 等 |
| Anthropic | Claude 系列 |
| Nous Portal | Nous Research 自有模型 |
| 小米 MiMo | 小米大模型 |
| z.ai / GLM | 智谱 GLM |
| Kimi / Moonshot | 月之暗面 |
| MiniMax | MiniMax 模型 |
| Hugging Face | 开源模型 |
| 自定义端点 | 任何 OpenAI 兼容 API |
模型凭证配置
API 密钥存储在 ~/.hermes/auth.json 中,也可通过 hermes setup 向导配置。
Web UI 中的模型管理
打开 Web UI → 模型管理:
- 自动从凭证池发现可用模型(读取
~/.hermes/auth.json) - 从每个 Provider 端点获取可用模型列表(
/v1/models) - 添加自定义 OpenAI 兼容 Provider
- Provider 级别模型分组展示
五、常用操作速查
核心命令
hermes # 启动交互式终端对话
hermes model # 选择/切换模型
hermes tools # 配置启用的工具
hermes config set # 设置配置项
hermes gateway # 消息网关管理
hermes setup # 完整设置向导
hermes update # 更新到最新版本
hermes doctor # 诊断问题
hermes claw migrate # 从 OpenClaw 迁移
终端与消息平台通用命令
| 命令 | 功能 |
|------|------|
| /new 或 /reset | 新建对话 |
| /model [provider:model] | 切换模型 |
| /personality [name] | 设置人格 |
| /retry | 重试最后一次 |
| /undo | 撤销最后一次 |
| /compress | 压缩上下文 |
| /usage | 查看用量 |
| /skills | 浏览已安装技能 |
| /stop | 中断当前工作 |
六、卸载指南
卸载 Hermes Agent
# 停止 gateway
hermes gateway stop
# 删除安装目录
rm -rf ~/.hermes
# 如果使用 pip 安装
pip uninstall hermes-agent
# 清理 shell 配置中的 hermes 路径(~/.bashrc 或 ~/.zshrc)
如果需要保留配置和记忆,请先备份
~/.hermes/目录。
卸载 Hermes Web UI
# 停止 Web UI
hermes-web-ui stop
# 卸载 npm 全局包
npm uninstall -g hermes-web-ui
# 如果需要,清理相关进程
pkill -f "hermes-web-ui" || true
卸载 HermesClaw(如果安装了)
sudo systemctl stop hermesclaw
sudo systemctl disable hermesclaw
sudo rm -f /etc/systemd/system/hermesclaw.service
sudo systemctl daemon-reload
# 恢复 openclaw-weixin 配置
find "$HOME" -maxdepth 5 -name "*.json.bak" -path "*/openclaw-weixin/accounts/*" -exec sh -c 'for f; do cp "$f" "${f%.bak}"; done' sh {} +
# 恢复 Hermes .env
[ -f "$HOME/.hermes/.env.bak" ] && cp "$HOME/.hermes/.env.bak" "$HOME/.hermes/.env"
rm -rf "$HOME/hermesclaw"
七、常见问题
1. Windows 用户怎么办?
Windows 原生不支持 Hermes Agent,请先安装 WSL2,然后在 WSL2 中运行安装命令。
2. 微信 Gateway 启动后没反应?
- 确认已完成扫码登录
- 检查
~/.hermes/.env中WEIXIN_BASE_URL是否正确 - 使用
hermes doctor诊断问题
3. 模型切换不生效?
- 确认 API 密钥已正确配置在
~/.hermes/auth.json - 使用
/model provider:model格式指定完整路径 - 检查网络连接是否正常
4. Web UI 端口冲突?
Web UI 启动时会自动检测端口冲突并清理残留进程。如需自定义端口:
hermes-web-ui start --port 9000
总结
Hermes Agent 提供了一条命令完成安装的极简体验,配合 Web UI 的可视化管理,无论是快速上手还是深度定制都非常方便。微信对话通过原生 iLink 集成或 HermesClaw 双开方案都能轻松实现。模型配置支持 200+ 模型自由切换,真正做到零锁定。
快速上手三步走:
curl -fsSL ... | bash一键安装 Hermesnpm install -g hermes-web-ui && hermes-web-ui start启动 Web UIhermes model选择你喜欢的模型,开始对话!
更多文档请访问: