Files
hermes-agent/web
Austin Pickett 9d118b2994 feat: web UI dashboard for managing Hermes Agent
Adds an embedded web UI dashboard accessible via `hermes web`. Provides a
browser-based interface for:
- Monitoring agent status, gateway, and active/recent sessions
- Editing config.yaml with a schema-driven form editor
- Managing API keys in .env (set, clear, view redacted)

Backend: FastAPI server (hermes_cli/web_server.py) with REST endpoints.
Frontend: Vite + React + TypeScript + Tailwind v4 SPA (web/ directory).

Also adds:
- `/reload` slash command for hot-reloading .env variables
- `delete_env_value()` and `reload_env()` utilities in config.py
- `[web]` optional dependency extra (fastapi + uvicorn)
- Web build step in `hermes update` (both git and zip paths)
- hermes_cli/web_dist/ to .gitignore and package-data

Salvaged from PR #1813 by austinpickett onto current main.
Fixes applied during salvage:
- Replaced hardcoded CONFIG_SCHEMA with dynamic generation from DEFAULT_CONFIG
- Restricted CORS to localhost origins (was allow_origins=[*])
- Dropped _maybe_reload_env from model_tools.py (stale reverts to core dispatch)
- Dropped .python-version file
- Skipped all stale-branch reverts (pyproject.toml, model_tools.py, etc.)
2026-04-11 01:05:13 -07:00
..

Hermes Agent — Web UI

Browser-based dashboard for managing Hermes Agent configuration, API keys, and monitoring active sessions.

Stack

  • Vite + React 19 + TypeScript
  • Tailwind CSS v4 with custom dark theme
  • shadcn/ui-style components (hand-rolled, no CLI dependency)

Development

# Start the backend API server
cd ../
python -m hermes_cli.main web --no-open

# In another terminal, start the Vite dev server (with HMR + API proxy)
cd web/
npm run dev

The Vite dev server proxies /api requests to http://127.0.0.1:9119 (the FastAPI backend).

Build

npm run build

This outputs to ../hermes_cli/web_dist/, which the FastAPI server serves as a static SPA. The built assets are included in the Python package via pyproject.toml package-data.

Structure

src/
├── components/ui/   # Reusable UI primitives (Card, Badge, Button, Input, etc.)
├── lib/
│   ├── api.ts       # API client — typed fetch wrappers for all backend endpoints
│   └── utils.ts     # cn() helper for Tailwind class merging
├── pages/
│   ├── StatusPage   # Agent status, active/recent sessions
│   ├── ConfigPage   # Dynamic config editor (reads schema from backend)
│   └── EnvPage      # API key management with save/clear
├── App.tsx          # Main layout and navigation
├── main.tsx         # React entry point
└── index.css        # Tailwind imports and theme variables