# Hermes 安装代理配置

- 原文地址：https://www.kuddy.cn/archives/250
- 发布时间：2026-05-14 15:42:32
- 更新时间：2026-06-03 15:43:29
- 分类：AI
- 标签：AI Agent, DevOps, Hermes, npm, Python, 代理工具, 网络

> 在国内网络环境下部署 Hermes Agent 的实战经验：npm 淘宝源、uv/PyPI 清华源、GitHub clone 代理加速、Playwright Chromium 下载优化、DuckDuckGo 替代方案。

---

# 国内环境部署 Hermes Agent 的一些经验

最近在内网服务器上部署 Hermes Agent，踩了几个典型的国内网络问题，简单记录一下。
&gt; Hermes Agent 更新了 0.14.0 可以直接 pip install hermes-agent 了，安装完后执行 hermes postinstall，详细的可以参考 [Hermes Agent 安装指南](https://www.kuddy.cn/archives/345)

## 1. npm 使用国内源

先切换 npm 源，否则部分 Node 依赖会很慢：

```bash
npm config set registry https://registry.npmmirror.com
```

## 2. uv 配置清华源

Hermes 使用 uv 管理 Python 依赖，建议先配置 uv 源：

```bash
mkdir -p ~/.config/uv

cat &gt; ~/.config/uv/uv.toml &lt;&gt; ~/.bashrc
source ~/.bashrc
```

## 3. 先下载脚本并修改仓库地址

国内直接执行远程安装脚本时，可能会卡在 GitHub clone 阶段。建议先把安装脚本下载到本地，确认内容后再改 repo 地址：

```bash
curl -fsSL https://raw.githubusercontent.com/nousresearch/hermes-agent/main/scripts/install.sh -o install-hermes.sh
```

然后编辑脚本：

```bash
nano install-hermes.sh
```

把里面类似：

```text
https://github.com/nousresearch/hermes-agent.git
```

替换成：

```text
https://gh-proxy.org/https://github.com/nousresearch/hermes-agent.git
```

再执行：

```bash
bash install-hermes.sh
```

这类代理适合公开仓库，不建议用于私有仓库或带 token 的地址。

## 4. Playwright 浏览器下载加速

Hermes 可能会自动下载 Chromium，默认 CDN 很慢：

```bash
export PLAYWRIGHT_DOWNLOAD_HOST=https://npmmirror.com/mirrors/playwright
```

如果需要长期生效，也可以写入 `~/.bashrc`。

## 5. DuckDuckGo 问题

Hermes 默认部分功能会访问 DuckDuckGo，国内经常无法访问。建议：

- 配置代理；
- 或关闭 web search；
- 或改用其他搜索 API。


整体来看，国内部署 Hermes 主要问题集中在：

```text
GitHub + PyPI + Playwright CDN + DuckDuckGo
```

把这些源和代理处理好后，部署体验会顺畅很多。