Files
carlandCursor 08b25e8f87 移除 OpenClaw/ClawHub 遗留并更新文档
删除 allowall.sh、旧版 CLI/Web 路由,README 改为 Hermes 专用说明。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-17 14:54:14 +08:00

45 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Hermes Agent Web
在浏览器里管理本机多个 **Hermes Agent** 实例:**列表与状态、新建、bootstrap、启动、停止、重启、销毁**;**「Hermes 引导」** 页用浏览器内终端(PTY + xterm.js)完成 `setup`、启动 gateway、进入容器 shell。Flask + Jinja2,单进程即可运行。
所有 Docker / 实例操作均通过上级 [`hermes-agent-cli.sh`](../hermes-agent-cli.sh)。配置编辑页读写宿主机 `hermes-agent-instances/<序号>/data/config.yaml`(YAML 校验,备份 `.bak`)。**销毁**会删除该序号下整份实例目录。
## 前置条件
- Docker(Desktop / Colima / dockerd)
- Python 3.10+
- 可选:`hermes-agent-home/.env` 中设置 `HERMES_AGENT_WEB_ADMIN_PASSWORD`
默认使用官方镜像,**不必**设置 `HERMES_SOURCE`;仅本地 build 时才需要。
## 安装与启动
```bash
cd hermes-agent-web
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# 在 hermes-agent-home 根目录配置 Web 密码后:
export HERMES_AGENT_WEB_ADMIN_PASSWORD='你的密码'
python app.py
# 或: python app.py --admin-password '你的密码' --host 127.0.0.1 --port 8781
```
浏览器打开 http://127.0.0.1:8781 ,默认用户 `hermes`(可用 `HERMES_AGENT_WEB_ADMIN_USER` 修改)。
## 功能摘要
- **实例列表**:数据目录 `hermes-agent-instances/<N>/` 与 Docker 项目 `hermes-<N>` 的并集(含已停止容器),与 `./hermes-agent-cli.sh list-ids` 一致。
- **拉取镜像 / 启动 / 停止 / 重启 / 销毁**:调用 CLI 对应子命令。
- **Hermes 引导**:`/instance/<序号>/guide`,自动 `setup`(如需)→ `run` → 容器 shell。
- **终端**:`/instance/<序号>/docker`,进入运行中 gateway 容器。
- **编辑配置**:`/instance/<序号>/config`,编辑 `data/config.yaml`。
## Docker 核对
```bash
docker ps -a --filter name=hermes-1-gateway
```
项目名 `hermes-<序号>`,服务 `gateway`,容器名约 `hermes-<序号>-gateway-1`。