波波技术栈
article

Hermes Agent 国内安装完全指南

hermes Agent 是一款支持自我进化、长期记忆的开源 AI Agent。由于官方源位于海外,国内用户安装时需使用镜像源或特定脚本以解决网络问题。以下是针对不同操作系统的详细安装命令与步骤。

方案一:国内社区官网安装(推荐)

Hermes Agent 中文社区官网 的「Get Started」中复制对应系统的安装命令(以官网最新说明为准)。

类 Unix 系统(Linux / macOS / WSL2)

curl -fsSL https://res1.hermesagent.org.cn/install.sh | bash

Windows 原生 PowerShell

irm https://res1.hermesagent.org.cn/install.ps1 | iex

说明:上述命令已内置国内镜像源,一般无需额外配置网络,约 60 秒内可完成部署。


方案二:手动安装(备选)

若官网脚本不可用,可按下面步骤手动安装。

Windows(WSL2)

  1. 安装 WSL2(以 管理员身份打开 PowerShell):

    wsl --install
    
  2. 进入 Ubuntu 后执行:

    sudo apt update && sudo apt install -y curl git python3.11 python3.11-venv nodejs npm
    
    git clone https://ghfast.top/https://github.com/NousResearch/hermes-agent.git ~/hermes-agent
    cd ~/hermes-agent
    
    curl -LsSf https://astral.sh/uv/install.sh | sh
    export PATH="$HOME/.local/bin:$PATH"
    
    uv venv venv --python 3.11
    source venv/bin/activate
    export UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple/
    
    uv pip install -e ".[all]"
    playwright install && playwright install-deps
    

macOS

/bin/bash -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
brew install git

git clone https://ghfast.top/https://github.com/NousResearch/hermes-agent.git ~/hermes-agent
cd ~/hermes-agent

curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

uv venv venv --python 3.11
source venv/bin/activate
export UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple/

uv pip install -e ".[all]"
playwright install && playwright install-deps

Linux

sudo apt update && sudo apt install -y curl git python3.11 python3.11-venv nodejs npm

git clone https://ghfast.top/https://github.com/NousResearch/hermes-agent.git ~/hermes-agent
cd ~/hermes-agent

curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

uv venv venv --python 3.11
source venv/bin/activate
export UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple/

uv pip install -e ".[all]"
playwright install && playwright install-deps

初始化与启动

cd ~/hermes-agent && source venv/bin/activate
hermes doctor
hermes setup   # 配置模型 API Key
hermes         # 启动

配置模型

Hermes Agent 支持多种模型与提供商:

  • 国产模型:DeepSeek、Qwen(通义千问)、GLM(智谱)、Kimi、MiniMax
  • 国际模型:Gemini、Claude
  • 本地部署:Ollama、LM Studio
  • 中转站:OpenRouter 等

运行 hermes setup 后按提示选择并填入 API Key 即可。


接入消息网关(可选)

将 Hermes Agent 接入常用社交与办公平台:

  • 国内:微信、飞书、企业微信、钉钉、QQ
  • 国际:WhatsApp、Discord、Slack

常见问题

| 问题 | 解决方案 | | --------------------------- | ------------------------------------------------------------------------- | | git clone 超时 | 将ghfast.top 换成 gitcode.com 等镜像或加速站 | | uv pip install 很慢 | 确认已执行export UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple/ | | Playwright 安装失败 | 执行playwright install-deps 安装系统依赖 | | WSL2 无法访问外网 | 在 Windows 上为代理开启「允许局域网连接」,必要时使用 TUN 模式 | | hermes: command not found | 确认已执行source venv/bin/activate 激活虚拟环境 |