From a040d017d36590a567c4b9ac235e4d6c1708c8a6 Mon Sep 17 00:00:00 2001 From: arch3rPro Date: Sun, 10 May 2026 10:22:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(hermes-web-ui):=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E6=9E=B6=E6=9E=84=E5=B9=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 Hermes Web UI 改为包含 Hermes Agent 服务的完整应用架构 移除独立配置 Agent 网关的需求并更新相关文档 --- apps/hermes-web-ui/README.md | 34 ++++++------------- apps/hermes-web-ui/README_en.md | 34 ++++++------------- apps/hermes-web-ui/latest/data.yml | 21 +----------- apps/hermes-web-ui/latest/docker-compose.yml | 25 ++++++++++++-- apps/hermes-web-ui/v0.5.15/data.yml | 21 +----------- apps/hermes-web-ui/v0.5.15/docker-compose.yml | 25 ++++++++++++-- 6 files changed, 68 insertions(+), 92 deletions(-) diff --git a/apps/hermes-web-ui/README.md b/apps/hermes-web-ui/README.md index 5d9cfc6..20720be 100644 --- a/apps/hermes-web-ui/README.md +++ b/apps/hermes-web-ui/README.md @@ -2,21 +2,6 @@ Hermes Agent 的全功能 Web 管理面板。管理 AI 聊天会话、监控使用量与成本、配置平台渠道、调度定时任务、浏览技能等,全部通过简洁响应式 Web 界面完成。 -## 部署说明 - -本应用为独立的 Web UI 面板,**不包含** Hermes Agent 服务。使用前请先在 1Panel 中安装官方 [Hermes Agent](https://github.com/1Panel-dev/appstore/tree/dev/apps/hermes-agent) 应用,然后安装本应用连接到已有的 Agent。 - -### 安装步骤 - -1. 在 1Panel 应用商店安装 **Hermes Agent**(官方应用) -2. 安装本应用 **Hermes Web UI** -3. 安装时配置「Hermes Agent 网关地址」,默认为 `http://hermes-agent:8642` -4. 如果安装 Agent 时修改了容器名称,请相应调整网关地址中的主机名 - -### 网络要求 - -两个应用均使用 `1panel-network` 网络,通过 Docker 内部网络通信,无需暴露额外端口。 - ## 功能特点 - **AI 聊天** — 实时流式 SSE 传输,多会话管理,Markdown 渲染与代码高亮 @@ -34,17 +19,16 @@ Hermes Agent 的全功能 Web 管理面板。管理 AI 聊天会话、监控使 ## 使用说明 +### 架构说明 + +本应用包含两个服务: +- **hermes-agent**:使用 1Panel 官方维护的 Hermes Agent 镜像([1panel/hermes-agent](https://hub.docker.com/r/1panel/hermes-agent)) +- **hermes-webui**:社区维护的全功能 Web 管理面板 + ### 默认端口 - Web 界面: `6060`(可在安装时修改) -### 配置参数 - -| 参数 | 默认值 | 说明 | -|------|--------|------| -| Web UI 端口 | `6060` | Web 管理面板的访问端口 | -| Agent 网关地址 | `http://hermes-agent:8642` | Hermes Agent 的网关地址 | - ### 默认认证 - 首次运行时自动生成 Auth Token,可通过容器日志查看: @@ -52,14 +36,16 @@ Hermes Agent 的全功能 Web 管理面板。管理 AI 聊天会话、监控使 docker logs <容器名> | grep token ``` - 也可通过环境变量 `AUTH_TOKEN` 设置自定义 Token +- 如需禁用认证,可将 `AUTH_DISABLED` 设置为 `true` ### 数据目录 +- `./data` — Hermes Agent 运行时数据(会话、配置、配置文件) - `./webui-data` — Web UI 数据(Auth Token 等) -### 模型配置 +### 前置条件 -使用前请确保已在 Hermes Agent 的 Web 界面或本应用的模型管理页面配置好 AI 模型的 API 密钥。 +使用前请确保已在 Web 界面的模型管理页面配置好 AI 模型的 API 密钥。 ## 相关链接 diff --git a/apps/hermes-web-ui/README_en.md b/apps/hermes-web-ui/README_en.md index fbe5e6c..e8fcb4c 100644 --- a/apps/hermes-web-ui/README_en.md +++ b/apps/hermes-web-ui/README_en.md @@ -2,21 +2,6 @@ A full-featured web dashboard for Hermes Agent. Manage AI chat sessions, monitor usage & costs, configure platform channels, schedule cron jobs, browse skills — all from a clean, responsive web interface. -## Deployment - -This is a standalone Web UI app that does **not include** the Hermes Agent service. Install the official [Hermes Agent](https://github.com/1Panel-dev/appstore/tree/dev/apps/hermes-agent) from 1Panel app store first, then install this app to connect to your existing Agent. - -### Setup Steps - -1. Install **Hermes Agent** from 1Panel app store (official app) -2. Install **Hermes Web UI** (this app) -3. Configure the "Hermes Agent Gateway" URL during installation (default: `http://hermes-agent:8642`) -4. If you changed the Agent container name, adjust the hostname in the gateway URL accordingly - -### Networking - -Both apps use the `1panel-network` and communicate via Docker internal networking — no additional ports need to be exposed. - ## Features - **AI Chat** — Real-time streaming via SSE, multi-session management, Markdown rendering with syntax highlighting @@ -34,17 +19,16 @@ Both apps use the `1panel-network` and communicate via Docker internal networkin ## Usage +### Architecture + +This app includes two services: +- **hermes-agent**: Uses the official 1Panel-maintained Hermes Agent image ([1panel/hermes-agent](https://hub.docker.com/r/1panel/hermes-agent)) +- **hermes-webui**: Community-maintained full-featured web dashboard + ### Default Port - Web UI: `6060` (configurable during installation) -### Configuration Parameters - -| Parameter | Default | Description | -|-----------|---------|-------------| -| Web UI Port | `6060` | Web dashboard access port | -| Agent Gateway | `http://hermes-agent:8642` | Hermes Agent gateway URL | - ### Default Credentials - Auth Token is auto-generated on first run. View it via container logs: @@ -52,14 +36,16 @@ Both apps use the `1panel-network` and communicate via Docker internal networkin docker logs | grep token ``` - You can also set a custom token via `AUTH_TOKEN` environment variable +- Set `AUTH_DISABLED=true` to disable authentication ### Data Directories +- `./data` — Hermes Agent runtime data (sessions, configs, profiles) - `./webui-data` — Web UI data (auth token, etc.) -### Model Configuration +### Prerequisites -Make sure to configure your AI model API keys via the Hermes Agent web interface or this app's Model Management page before use. +Make sure to configure your AI model API keys via the Web UI's Model Management page before use. ## Links diff --git a/apps/hermes-web-ui/latest/data.yml b/apps/hermes-web-ui/latest/data.yml index 5818702..4d0b3cc 100644 --- a/apps/hermes-web-ui/latest/data.yml +++ b/apps/hermes-web-ui/latest/data.yml @@ -18,23 +18,4 @@ additionalProperties: ko: 웹 UI 포트 zh-Hant: Web UI 埠 zh: Web UI 端口 - tr: Web UI Bağlantı Noktası - - default: http://hermes-agent:8642 - edit: true - envKey: PANEL_APP_HERMES_GATEWAY - labelEn: Hermes Agent Gateway - labelZh: Hermes Agent 网关地址 - required: true - rule: paramExtUrl - type: text - label: - en: Hermes Agent Gateway - es-es: Puerta de enlace del Hermes Agent - ja: Hermes Agent ゲートウェイ - ms: Gerbang Hermes Agent - pt-br: Gateway do Hermes Agent - ru: Шлюз Hermes Agent - ko: Hermes Agent 게이트웨이 - zh-Hant: Hermes Agent 閘道位址 - zh: Hermes Agent 网关地址 - tr: Hermes Agent Ağ Geçidi \ No newline at end of file + tr: Web UI Bağlantı Noktası \ No newline at end of file diff --git a/apps/hermes-web-ui/latest/docker-compose.yml b/apps/hermes-web-ui/latest/docker-compose.yml index 26b9dac..4d2cf50 100644 --- a/apps/hermes-web-ui/latest/docker-compose.yml +++ b/apps/hermes-web-ui/latest/docker-compose.yml @@ -1,22 +1,43 @@ services: + hermes-agent: + container_name: ${CONTAINER_NAME}-agent + image: 1panel/hermes-agent:latest + restart: always + networks: + - 1panel-network + environment: + HOME: /opt/data/home + HERMES_HOME: /opt/data + HERMES_DASHBOARD: "1" + HERMES_DASHBOARD_HOST: 0.0.0.0 + HERMES_DASHBOARD_PORT: 9119 + TERM: xterm-256color + volumes: + - ./data:/opt/data + - /etc/localtime:/etc/localtime + init: true + labels: + createdBy: "Apps" hermes-webui: container_name: ${CONTAINER_NAME} image: ekkoye8888/hermes-web-ui:latest entrypoint: ["node", "dist/server/index.js"] - restart: unless-stopped + restart: always networks: - 1panel-network ports: - "${PANEL_APP_PORT_HTTP}:6060" volumes: + - ./data:/opt/data - ./webui-data:/home/agent/.hermes-web-ui environment: - PORT=6060 - - UPSTREAM=${PANEL_APP_HERMES_GATEWAY} - HERMES_HOME=/opt/data - HERMES_BIN=/opt/hermes/.venv/bin/hermes - AUTH_DISABLED=false - PATH=/opt/hermes/.venv/bin:/opt/data/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + depends_on: + - hermes-agent labels: createdBy: "Apps" networks: diff --git a/apps/hermes-web-ui/v0.5.15/data.yml b/apps/hermes-web-ui/v0.5.15/data.yml index 5818702..4d0b3cc 100644 --- a/apps/hermes-web-ui/v0.5.15/data.yml +++ b/apps/hermes-web-ui/v0.5.15/data.yml @@ -18,23 +18,4 @@ additionalProperties: ko: 웹 UI 포트 zh-Hant: Web UI 埠 zh: Web UI 端口 - tr: Web UI Bağlantı Noktası - - default: http://hermes-agent:8642 - edit: true - envKey: PANEL_APP_HERMES_GATEWAY - labelEn: Hermes Agent Gateway - labelZh: Hermes Agent 网关地址 - required: true - rule: paramExtUrl - type: text - label: - en: Hermes Agent Gateway - es-es: Puerta de enlace del Hermes Agent - ja: Hermes Agent ゲートウェイ - ms: Gerbang Hermes Agent - pt-br: Gateway do Hermes Agent - ru: Шлюз Hermes Agent - ko: Hermes Agent 게이트웨이 - zh-Hant: Hermes Agent 閘道位址 - zh: Hermes Agent 网关地址 - tr: Hermes Agent Ağ Geçidi \ No newline at end of file + tr: Web UI Bağlantı Noktası \ No newline at end of file diff --git a/apps/hermes-web-ui/v0.5.15/docker-compose.yml b/apps/hermes-web-ui/v0.5.15/docker-compose.yml index a1ddb63..619ef8e 100644 --- a/apps/hermes-web-ui/v0.5.15/docker-compose.yml +++ b/apps/hermes-web-ui/v0.5.15/docker-compose.yml @@ -1,22 +1,43 @@ services: + hermes-agent: + container_name: ${CONTAINER_NAME}-agent + image: 1panel/hermes-agent:2026.5.7 + restart: always + networks: + - 1panel-network + environment: + HOME: /opt/data/home + HERMES_HOME: /opt/data + HERMES_DASHBOARD: "1" + HERMES_DASHBOARD_HOST: 0.0.0.0 + HERMES_DASHBOARD_PORT: 9119 + TERM: xterm-256color + volumes: + - ./data:/opt/data + - /etc/localtime:/etc/localtime + init: true + labels: + createdBy: "Apps" hermes-webui: container_name: ${CONTAINER_NAME} image: ekkoye8888/hermes-web-ui:v0.5.15 entrypoint: ["node", "dist/server/index.js"] - restart: unless-stopped + restart: always networks: - 1panel-network ports: - "${PANEL_APP_PORT_HTTP}:6060" volumes: + - ./data:/opt/data - ./webui-data:/home/agent/.hermes-web-ui environment: - PORT=6060 - - UPSTREAM=${PANEL_APP_HERMES_GATEWAY} - HERMES_HOME=/opt/data - HERMES_BIN=/opt/hermes/.venv/bin/hermes - AUTH_DISABLED=false - PATH=/opt/hermes/.venv/bin:/opt/data/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + depends_on: + - hermes-agent labels: createdBy: "Apps" networks: