Hermes 代码排查
- 作者仓库星标 0
- 作者仓库 skills-registry
Hermes Web UI Startup & Troubleshooting
Architecture Overview
Hermes Web UI consists of two components:
- Frontend: Vite + React (
hermes-agent/web/) - Port 5173 - Backend: Python web server (
hermes_cli/web_server.py) - Port 9119
Frontend proxies /api/* requests to the backend.
Quick Start
Start Frontend Dev Server
cd ~/.hermes/hermes-agent/web
npm run dev
# or directly: npx vite
Access at: http://localhost:5173
Start Backend Dashboard
cd ~/.hermes
hermes dashboard
# or directly: python3 -m hermes_cli.web_server --port 9119
Access at: http://localhost:9119
Common Issues & Fixes
Issue 1: TypeScript Build Errors
Symptom: npm run build fails with TS errors like:
src/components/ModelPickerDialog.tsx(285,22): error TS2552: Cannot find name 'loadProviders'
Fix: Skip TypeScript check and start dev server directly:
# TypeScript errors don't prevent dev server from running
npx vite --no-open
Issue 2: Python 3.9 Compatibility
Symptom: Backend fails with:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Cause: Code uses Python 3.10+ type union syntax (Path | None)
Fix:
# Option 1: Upgrade to Python 3.10+
brew install python@3.10
# Option 2: Use frontend only (some features may not work)
# Frontend dev server still works standalone
npx vite
Issue 3: Backend Connection Warnings
Symptom: Browser console shows warnings about dashboard unreachable:
[hermes] Dashboard at http://127.0.0.1:9119 unreachable
Fix: Start the backend separately or ignore if you only need UI preview:
# In separate terminal
cd ~/.hermes && hermes dashboard
Issue 4: Dependencies Not Installed
Symptom: npm run dev fails immediately
Fix:
cd ~/.hermes/hermes-agent/web
npm install
npm run sync-assets
Verification Steps
Check frontend running:
curl -s http://localhost:5173 | head -5 # Should return HTML doctypeCheck backend running:
curl -s http://localhost:9119/health # Should return OK or JSON statusCheck processes:
ps aux | grep -E "(vite|hermes.*dashboard)" | grep -v grep
Development vs Production
Development
- Frontend:
npm run dev(port 5173) - Backend:
hermes dashboard(port 9119) - Hot reload enabled
- CORS handled via Vite proxy
Production
- Build frontend:
npm run build(outputs tohermes_cli/web_dist/) - Backend serves static files directly
- Single port (9119) for both UI and API
Troubleshooting Checklist
- Node.js 20+ installed (
node --version) - Python 3.10+ installed (
python3 --version) - npm dependencies installed (
cd web && npm install) - Assets synced (
npm run sync-assets) - No other process using ports 5173 or 9119
- Backend running before making API calls
- Session token properly injected (handled by Vite plugin)
Background Process Management
When running in background:
# Start frontend in background
cd ~/.hermes/hermes-agent/web && npx vite --no-open &
# Verify startup (may take 2-3 seconds)
sleep 3 && curl -s http://localhost:5173 > /dev/null && echo "Frontend OK"
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: 54laowang/hermes-agent — distributed by TomeVault.
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Node.js · Python >=3.9
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Quick Start
Check frontend running: Check backend running: Check processes:
# Hermes Web UI Startup & Troubleshooting
## Architecture Overview
Hermes Web UI consists of two components:
1. **Frontend**: Vite + React (`hermes-agent/web/`) - Port 5173
2. **Backend**: Python web server (`hermes_cli/web_server.py`) - Port 9119
Frontend proxies `/api/*` requests to the backend.
## Quick Start
### Start Frontend Dev Server
```bash
cd ~/.hermes/hermes-agent/web
npm run dev
# or directly: npx vite
```
Access at: `http://localhost:5173`
### Start Backend Dashboard
```bash
cd ~/.hermes
hermes dashboard
# or directly: python3 -m hermes_cli.web_server --port 9119
```
Access at: `http://localhost:9119`
## Common Issues & Fixes
### Issue 1: TypeScript Build Errors
**Symptom**: `npm run build` fails with TS errors like:
```
src/components/ModelPickerDialog.tsx(285,22): error TS2552: Cannot find name 'loadProviders'
```
**Fix**: Skip TypeScript check and start dev server directly:
```bash
# TypeScript errors don't prevent dev server from running
npx vite --no-open
```
### Issue 2: Python 3.9 Compatibility
**Symptom**: Backend fails with:
```
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
```
**Cause**: Code uses Python 3.10+ type union syntax (`Path | None`)
**Fix**:
```bash
# Option 1: Upgrade to Python 3.10+
brew install python@3.10
# Option 2: Use frontend only (some features may not work)
# Frontend dev server still works standalone
npx vite
```
### Issue 3: Backend Connection Warnings
**Symptom**: Browser console shows warnings about dashboard unreachable:
```
[hermes] Dashboard at http://127.0.0.1:9119 unreachable
```
**Fix**: Start the backend separately or ignore if you only need UI preview:
```bash
# In separate terminal
cd ~/.hermes && hermes dashboard
```
### Issue 4: Dependencies Not Installed
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Architecture Overview → Quick Start → Start Frontend Dev Server → Start Backend Dashboard → Common Issues & Fixes → Issue 1: TypeScript Build Errors
要点 -> Frontend · Backend · Symptom · Fix · Cause · Check frontend running · Check backend running · Check processes
文件/命令 -> hermes-agent/web/ · hermescli/webserver.py · /api/ · http://localhost:5173 · http://localhost:9119 · npm run build · Path | None · npm run dev
内容 SHA-256 -> 033330bec291
方法与流程
适用与边界
原文中的明确线索
hermes-agent/web/、hermescli/webserver.py、/api/、http://localhost:5173、http://localhost:9119、npm run build、Path | None、npm run dev