Dashboard Setup
The dashboard provides real-time visibility into plan execution, war-room status, memory, and agent activity. It consists of a FastAPI backend and a Next.js frontend.
Architecture
Browser ──► Next.js (:3000) ──► FastAPI Backend (:9000) │ ├── War-room file polling ├── Memory ledger queries ├── SSE event streams └── Plan management APIQuick start
-
Install backend dependencies.
Terminal window cd dashboardpip install -r requirements.txt -
Install frontend dependencies.
Terminal window cd dashboard/frontendnpm install -
Configure environment. Create or edit
~/.ostwin/.env:Terminal window ANTHROPIC_API_KEY="sk-ant-..."OSTWIN_API_KEY="your-dashboard-api-key" -
Start the backend.
python dashboard/api.py— serves onhttp://localhost:9000. -
Start the frontend.
cd dashboard/frontend && npm run dev— serves onhttp://localhost:3000.
Custom ports
PORT=8080 python dashboard/api.pyDASHBOARD_URL=http://localhost:8080 npm run devUpdate DASHBOARD_URL whenever you change the backend port.
API routes
| Route group | Prefix | Purpose |
|---|---|---|
| Plans | /api/plans | Create, list, run, inspect plans |
| Rooms | /api/rooms | War-room status, progress, artifacts |
| Channels | /api/channels | Read/post channel messages |
| Memory | /api/memory | Query and search memory ledger |
| Skills | /api/skills | List, search, toggle skills |
| Roles | /api/roles | List and inspect role definitions |
| MCP | /api/mcp | MCP server config and status |
| Settings | /api/settings | Dashboard and engine configuration |
| System | /api/system | Health checks, version info |
SSE real-time updates
The dashboard uses Server-Sent Events for live updates:
| Event | Description |
|---|---|
room:status | War-room state changed |
room:progress | Progress updated |
channel:message | New channel message |
plan:complete | Plan finished execution |
Dashboard features
- DAG visualization with dependency edges
- Wave grouping showing parallel execution
- Per-epic status badges and progress bars
- Live channel message feed with role colors
- Progress bar with percentage and status
- Artifact file browser with content preview
- Full-text search across all entries
- Filter by kind, room, tags, or role
- Superseded entry tracking
Authentication
# Set in ~/.ostwin/.envOSTWIN_API_KEY="your-secret-key"All API requests require this key in the X-API-Key header.
Production deployment
-
Build the frontend.
cd dashboard/frontend && npm run build -
Serve static files. The backend auto-detects
dashboard/frontend/out/and serves it. -
Set environment variables.
OSTWIN_API_KEY="strong-random-key"andPORT=9000. -
Run behind a reverse proxy (nginx/Caddy) for TLS and domain routing.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Backend 404s | Wrong working directory | Run from project root |
| Frontend can’t reach API | Port mismatch | Check DASHBOARD_URL |
| SSE not updating | Proxy buffering | Disable response buffering |
| Empty room list | No war-rooms | Run a plan first |
| Import errors | Missing deps | pip install -r dashboard/requirements.txt |
Environment loading
The backend loads env vars from (first match wins):
~/.ostwin/.env— global install config./.env— current working directory- OS environment — already set in shell
Set ANTHROPIC_API_KEY once in ~/.ostwin/.env and it works for both the engine and dashboard.