hermes-agent/web
kshitijk4poor 247929b0dd feat: dashboard OAuth provider management
Add OAuth provider management to the Hermes dashboard with full
lifecycle support for Anthropic (PKCE), Nous and OpenAI Codex
(device-code) flows.

## Backend (hermes_cli/web_server.py)

- 6 new API endpoints:
  GET /api/providers/oauth — list providers with connection status
  POST /api/providers/oauth/{id}/start — initiate PKCE or device-code
  POST /api/providers/oauth/{id}/submit — exchange PKCE auth code
  GET /api/providers/oauth/{id}/poll/{session} — poll device-code
  DELETE /api/providers/oauth/{id} — disconnect provider
  DELETE /api/providers/oauth/sessions/{id} — cancel pending session
- OAuth constants imported from anthropic_adapter (no duplication)
- Blocking I/O wrapped in run_in_executor for async safety
- In-memory session store with 15-minute TTL and automatic GC
- Auth token required on all mutating endpoints

## Frontend

- OAuthLoginModal — PKCE (paste auth code) and device-code (poll) flows
- OAuthProvidersCard — status, token preview, connect/disconnect actions
- Toast fix: createPortal to document.body for correct z-index
- App.tsx: skip animation key bump on initial mount (prevent double-mount)
- Integrated into the Env/Keys page
2026-04-13 11:18:18 -07:00
..
public feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
src feat: dashboard OAuth provider management 2026-04-13 11:18:18 -07:00
eslint.config.js feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
index.html feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
package-lock.json feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
package.json feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
README.md feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
tsconfig.app.json feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
tsconfig.json feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
tsconfig.node.json feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -07:00
vite.config.ts feat: web UI dashboard for managing Hermes Agent (#8756) 2026-04-12 22:26:28 -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