AI应用开发:服务器部署篇(Hermes Agent + Open-WebUI )

AI应用开发学习:服务器部署篇(Hermes Agent + Open-WebUI )

最近尝试 Hermes Agent 配合 Playwright-cli 做 Web 自动化测试。
国内服务器外网访问慢、限制多,所以选了一台国外服务器。

1. 服务器与连接工具


2. 安装 Hermes Agent

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

安装后选择 Quick setup。配置 LLM 以 DeepSeek 为例:

hermes model
# 按提示选择 deepseek 提供商,输入 API Key,选 deepseek-chat 模型

DeepSeek API Key 申请:https://platform.deepseek.com/api_keys

如果向导没成功,可以单独设置:

hermes config set deepseek_api_key 你的API_Key

启动 Hermes:

hermes

3. 安装 Open-WebUI

mkdir openwebui && cd openwebui
apt install python3.12-venv -y   
python3 -m venv .
source bin/activate
pip install open-webui

开放 8080 端口:

ufw allow 8080/tcp

启动(后台运行):

nohup open-webui serve > webui.log 2>&1 &

浏览器访问 http://你的服务器IP:8080


4. 对接 Open-WebUI 与 Hermes

Hermes 自带 OpenAI 兼容 API(127.0.0.1:8642/v1)。

4.1 安装并启动 Hermes Gateway

hermes gateway install
# 两个询问都输入 y
hermes gateway start

验证:

ss -tlnp | grep 8642
curl http://localhost:8642/health   # 返回 {"status":"ok",...}

4.2 设置 API 密钥

cd ~/.hermes
vi .env
# 添加:
API_SERVER_ENABLED=true
API_SERVER_KEY=hermes_*****
# 重启服务:hermes gateway restart

4.3 在 Open-WebUI 中配置

进入 Open-WebUI → 设置 → 连接 → OpenAI API:

  • API URLhttp://127.0.0.1:8642/v1
  • API Key:填入你设置的密钥
  • 模型名称:任意(如 hermes

保存后即可在 Web 界面中调用 Hermes 后端模型。


实战:使用新技能对 boss 直聘进行测试

image

image

实际操作时发现 Open‑WebUI 无法收到 Hermes 的 approve 按钮(疑似界面 bug),导致 execute_code 受阻,因此改用后台执行方式。
从结果来看,受反爬与验证码影响,脚本通过率较低,仍有较大优化空间。

image


总结

  • 在 Vultr 上部署 Hermes + Open-WebUI,实现命令行与 Web 双端使用。
  • 通过对接,Web 界面可以调用 Hermes 背后的模型。
  • Hermes 的自我进化能力,能够自动生成 playwright脚本,但是生产端测试效果有限。
posted @ 2026-06-13 18:01  菠萝包与冰美式  阅读(16)  评论(0)    收藏  举报