更新与卸载
🔧 Update Hermes Agent
✅ If installed via pip (recommended for most users):
pip install --upgrade hermes-agent
This will automatically download and install the latest version of Hermes Agent.
✅ If using a virtual environment:
Make sure you're in the correct environment before running the upgrade command.
# Activate your virtual environment first (example):
source venv/bin/activate # Linux/macOS
# or
venv\Scripts\activate # Windows
# Then upgrade:
pip install --upgrade hermes-agent
✅ If installed from source (GitHub):
-
Navigate to your local Hermes Agent directory:
cd /path/to/hermes-agent -
Pull the latest changes:
git pull origin main -
Reinstall the package:
pip install -e .
The
-eflag installs it in "editable" mode, so changes are reflected immediately.
🗑️ Uninstall Hermes Agent
✅ If installed via pip:
pip uninstall hermes-agent
You’ll be prompted to confirm the removal. Type y and press Enter.
✅ If using a virtual environment:
Ensure you’re in the correct environment, then run:
pip uninstall hermes-agent
✅ If installed from source (editable install):
pip uninstall hermes-agent
This removes the package even if it was installed with pip install -e ..
💡 Tips
-
Check current version:
pip show hermes-agent -
Verify installation after update:
hermes-agent --version -
For advanced users: Use
pip checkto verify dependencies after upgrade.
If you're using Hermes Agent through a platform like MCP, Honcho, or SOUL.md, refer to their respective documentation for updates/uninstall instructions.
For support, visit the official repo:
👉 https://github.com/agentgpt/hermes-agent
⚠️ Always back up your configurations (e.g.,
config.yaml,skills/,agents/) before updating or uninstalling."
更新与卸载
更新
使用单条命令即可更新到最新版本:
hermes update
该命令会拉取最新代码,更新依赖项,并提示你配置自上次更新以来新增的任何选项。
hermes update 会自动检测新添加的配置选项,并提示你进行设置。如果你跳过了该提示,可以手动运行 hermes config check 查看缺失的选项,然后通过 hermes config migrate 交互式地添加它们。
更新时发生的过程
当你运行 hermes update 时,将执行以下步骤:
- Git 拉取 — 从
main分支拉取最新代码,并更新子模块 - 依赖安装 — 运行
uv pip install -e ".[all]"以获取新增或变更的依赖项 - 配置迁移 — 检测自你当前版本以来新增的配置选项,并提示你设置它们
- 网关自动重启 — 如果网关服务正在运行(Linux 上为 systemd,macOS 上为 launchd),将在更新完成后 自动重启,使新代码立即生效
预期输出如下:
$ hermes update
Updating Hermes Agent...
📥 Pulling latest code...
Already up to date. (or: Updating abc1234..def5678)
📦 Updating dependencies...
✅ Dependencies updated
🔍 Checking for new config options...
✅ Config is up to date (or: Found 2 new options — running migration...)
🔄 Restarting gateway service...
✅ Gateway restarted
✅ Hermes Agent updated successfully!
推荐的更新后验证
hermes update 处理了主要的更新流程,但快速验证可确保一切正常落地:
git status --short— 若工作树状态意外显示“未提交更改”,请检查后再继续hermes doctor— 检查配置、依赖和各服务健康状况hermes --version— 确认版本号已按预期更新- 若你使用了网关:
hermes gateway status - 若
doctor报告 npm 审计问题:请在提示的目录中运行npm audit fix
如果 git status --short 显示 hermes update 后出现意外更改,请停止并检查这些变更。这通常意味着本地修改被重新应用到了更新后的代码上,或某个依赖步骤刷新了锁文件。
检查当前版本
hermes version
与 GitHub 发布页面 上的最新版本对比,或检查是否有可用更新:
hermes update --check
从消息平台直接更新
你也可以通过 Telegram、Discord、Slack 或 WhatsApp 直接发送以下指令来更新:
/update
此操作将拉取最新代码,更新依赖,并重启网关。机器人在重启期间会短暂离线(通常为 5–15 秒),之后将恢复正常运行。
手动更新
如果你是手动安装的(非通过快速安装器):
cd /path/to/hermes-agent
export VIRTUAL_ENV="$(pwd)/venv"
# Pull latest code and submodules
git pull origin main
git submodule update --init --recursive
# Reinstall (picks up new dependencies)
uv pip install -e ".[all]"
uv pip install -e "./tinker-atropos"
# Check for new config options
hermes config check
hermes config migrate # Interactively add any missing options
回滚说明
若更新引入了问题,你可以回滚到之前的版本:
cd /path/to/hermes-agent
# List recent versions
git log --oneline -10
# Roll back to a specific commit
git checkout <commit-hash>
git submodule update --init --recursive
uv pip install -e ".[all]"
# Restart the gateway if running
hermes gateway restart
要回滚到特定发布标签:
git checkout v0.6.0
git submodule update --init --recursive
uv pip install -e ".[all]"
回滚可能导致配置不兼容,特别是当新增了配置选项时。回滚后请运行 hermes config check,并删除 config.yaml 中任何无法识别的选项,以防出错。
Nix 用户注意
如果你通过 Nix flake 安装,更新由 Nix 包管理器管理:
# Update the flake input
nix flake update hermes-agent
# Or rebuild with the latest
nix profile upgrade hermes-agent
Nix 安装是不可变的——回滚由 Nix 的版本系统处理:
nix profile rollback
更多详情请参见 Nix 设置。
卸载
hermes uninstall
卸载程序会提示你是否保留配置文件(~/.hermes/),以便未来重新安装时使用。
手动卸载
rm -f ~/.local/bin/hermes
rm -rf /path/to/hermes-agent
rm -rf ~/.hermes # Optional — keep if you plan to reinstall
如果你将网关作为系统服务安装,请先停止并禁用它:
hermes gateway stop
# Linux: systemctl --user disable hermes-gateway
# macOS: launchctl remove ai.hermes.gateway