EKKOLearnAI/hermes-web-ui
Hermes Web UI 是面向 Hermes Agent 的 Web dashboard,支持 AI Chat、8 类平台 channel 配置、使用分析、cron jobs、Model 管理、多 Profile/Gateway、文件浏览器、Group Chat、Skills/Memory、Logs、Authentication、Settings 与 Web Terminal,可通过 npm、脚本或 Docker Compose 安装。
功能
AI Chat
- 通过 SSE 实现实时 streaming,支持 async run
- 多 session 管理 —— 创建、重命名、删除、切换 session
- 自建 session database —— 本地 SQLite 存储,并在首次启动时从 Hermes state.db 自动同步
- 按来源(Telegram、Discord、Slack 等)对 session 分组,支持可折叠 accordion
- 活跃 session 指示器 —— live session 置顶并显示 spinner icon
- session 按最新消息时间排序
- Markdown 渲染,支持 syntax highlighting 和代码复制
- Tool call 详情展开(arguments / result)
- 支持文件上传
- 支持文件下载 —— 可在 local、Docker、SSH、Singularity backend 中下载用户上传文件和 agent 生成文件
- Session 搜索 —— Ctrl+K 全局搜索所有 conversation
- 全局 model selector —— 从
~/.hermes/auth.jsoncredential pool 发现 models - 按 session 显示 model badge 和 context token 使用量
平台 Channel
在一个页面中统一配置 8 个平台:
| 平台 | 功能 |
|---|---|
| Telegram | Bot token、mention 控制、reactions、free-response chats |
| Discord | Bot token、mention、auto-thread、reactions、channel allow/ignore lists |
| Slack | Bot token、mention 控制、bot message 处理 |
| 启用/禁用、mention 控制、mention patterns | |
| Matrix | Access token、homeserver、auto-thread、DM mention threads |
| Feishu (Lark) | App ID / Secret、mention 控制 |
| QR code 登录(在浏览器中扫码,自动保存 credentials) | |
| WeCom | Bot ID / Secret |
- Credential 管理写入
~/.hermes/.env - Channel 行为设置写入
~/.hermes/config.yaml - 配置变更时自动重启 gateway
- 按平台检测已配置/未配置状态
使用分析
- 总 token 使用量拆分(input / output)
- Session 数量及日均值
- 预估成本跟踪与 cache hit rate
- Model 使用分布图
- 30 天每日趋势(bar chart + data table)
定时任务
- 创建、编辑、暂停、恢复、删除 cron jobs
- 触发立即执行
- Cron expression 快捷预设
Model 管理
- 从 credential pool(
~/.hermes/auth.json)自动发现 models - 从各 provider endpoint(
/v1/models)获取可用 models - 添加、更新和删除 providers(预设及自定义 OpenAI-compatible)
- OpenAI Codex 与 Nous Portal OAuth 登录
- 针对非 v1 API 版本(例如
/v4)自动检测 provider URL - 按 provider 分组 model,并支持切换 default model
多 Profile 与 Gateway
- 创建、重命名、删除和切换 Hermes profiles
- Clone 现有 profile 或从 archive(
.tar.gz)导入 - 导出 profile 用于备份或共享
- 多 gateway 管理 —— 按 profile 启动、停止和监控 gateway
- 自动处理端口冲突
- 按 profile 隔离配置和 cache
文件浏览器
- 浏览 remote backends(local、Docker、SSH、Singularity)上的文件
- 上传、下载、重命名、复制、移动和删除文件
- 创建目录
- 使用 syntax highlighting 查看文件内容
Group Chat
- 通过 Socket.IO 实现实时消息的 multi-agent chat rooms
- @mention 路由 —— mention 某个 agent 以触发上下文回复
- Context compression —— 当 history 超过 token threshold 时自动总结 conversation
- Typing 状态和回复进度指示器
- Room 创建、删除和 invite code 管理
- Agent 管理 —— 将 agents 添加到 room 或从中移除,并支持按 agent 配置 profile
- SQLite 消息持久化
- 移动端响应式设计,支持可折叠 sidebar
Skills 与 Memory
- 浏览和搜索已安装 skills
- 查看 skill 详情和附加文件
- 用户 notes 与 profile 管理
Logs
- 查看 agent / gateway / error logs
- 按 log level、log file 和 keyword 过滤
- Structured log 解析,突出显示 HTTP access log
Authentication
- 基于 token 的 auth(首次运行自动生成,或通过
AUTH_TOKENenv var 设置) - 可选 username/password 登录 —— 初始 token auth 后可通过设置页面配置
- 可通过
AUTH_DISABLED=1禁用 auth
Settings
- Display(streaming、compact mode、reasoning、cost display)
- Agent(max turns、timeout、tool enforcement)
- Memory(启用/禁用、字符限制)
- Session reset(idle timeout、scheduled reset)
- Privacy(PII redaction)
- Model settings(default model 与 provider)
- API server 配置
Web Terminal
- 集成 terminal,由 node-pty 和 @xterm/xterm 驱动
- 支持多 session —— 创建、切换和关闭 terminal sessions
- 通过 WebSocket 实时传输键盘输入和 PTY 输出
- 支持窗口 resize
快速开始
npm(推荐)
npm install -g hermes-web-ui
hermes-web-ui start
一行安装(自动检测 OS)
在 Debian/Ubuntu/macOS 上自动安装 Node.js(如缺失)和 hermes-web-ui:
bash <(curl -fsSL https://raw.githubusercontent.com/EKKOLearnAI/hermes-web-ui/main/scripts/setup.sh)
WSL
bash <(curl -fsSL https://raw.githubusercontent.com/EKKOLearnAI/hermes-web-ui/main/scripts/setup.sh)
hermes-web-ui start
WSL 会自动检测并使用
hermes gateway run进行后台启动(不使用 launchd/systemd)。
Docker Compose
同时运行 Web UI 与 Hermes Agent:
# Use pre-built image (Recommended)
WEBUI_IMAGE=ekkoye8888/hermes-web-ui:latest docker compose up -d hermes-agent hermes-webui
# Or build from source
docker compose up -d --build hermes-agent hermes-webui
docker compose logs -f hermes-webui
- 持久化的 Hermes 数据存储在
./hermes_data - Web UI auth token 存储在
./hermes_data/hermes-web-ui/.token - 首次运行且启用 auth 时,token 会打印到 container logs
- 所有 runtime settings 都在
docker-compose.yml中通过环境变量驱动
详细说明和故障排查请参见 docs/docker.md。
CLI 命令
| 命令 | 说明 |
|---|---|
hermes-web-ui start |
在后台启动(daemon mode) |
hermes-web-ui start --port 9000 |
使用自定义端口启动 |
hermes-web-ui stop |
停止后台进程 |
hermes-web-ui restart |
重启后台进程 |
hermes-web-ui status |
检查是否正在运行 |
hermes-web-ui update |
更新到最新版本并重启 |
hermes-web-ui -v |
显示版本号 |
hermes-web-ui -h |
显示帮助信息 |
自动配置
启动时,BFF server 会自动:
- 校验
~/.hermes/config.yaml,并补齐缺失的api_server字段 - 如有修改,将原始配置备份到
config.yaml.bak - 按需检测并启动 gateway
- 处理端口冲突(终止 stale processes)
- 启动成功后打开浏览器
开发
git clone https://github.com/EKKOLearnAI/hermes-web-ui.git
cd hermes-web-ui
npm install
npm run dev
- Frontend: http://localhost:5173
- BFF Server: http://localhost:8648(代理到 8642 上的 Hermes)
npm run build # outputs to dist/
架构
Browser → BFF (Koa, :8648) → Hermes Gateway (:8642)
↓
Hermes CLI (sessions, logs, version)
↓
~/.hermes/config.yaml (channel behavior)
~/.hermes/auth.json (credential pool)
Tencent iLink API (WeChat QR login)
Frontend 以 multi-agent extensibility 为设计目标 —— 所有 Hermes-specific 代码都按命名空间放在 hermes/ 目录下(API、components、views、stores),因此可以直接在旁边添加新的 agent integrations。
BFF layer 负责 API proxy(带 path rewriting)、SSE streaming、文件上传和下载(multi-backend:local/Docker/SSH/Singularity)、通过 CLI 进行 session CRUD、config/credential 管理、WeChat QR 登录、model discovery、skills/memory 管理、log 读取,以及 static file serving。
Tech Stack
Frontend: Vue 3 + TypeScript + Vite + Naive UI + Pinia + Vue Router + vue-i18n + SCSS + markdown-it + highlight.js
Backend: Koa 2 (BFF server) + node-pty (web terminal)
Star History
赞助
如果你觉得这个项目对你有帮助,欢迎支持我:
License
MIT