Skip to content

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 API

Quick start

  1. Install backend dependencies.

    Terminal window
    cd dashboard
    pip install -r requirements.txt
  2. Install frontend dependencies.

    Terminal window
    cd dashboard/frontend
    npm install
  3. Configure environment. Create or edit ~/.ostwin/.env:

    Terminal window
    ANTHROPIC_API_KEY="sk-ant-..."
    OSTWIN_API_KEY="your-dashboard-api-key"
  4. Start the backend. python dashboard/api.py — serves on http://localhost:9000.

  5. Start the frontend. cd dashboard/frontend && npm run dev — serves on http://localhost:3000.

Custom ports

Terminal window
PORT=8080 python dashboard/api.py

API routes

Route groupPrefixPurpose
Plans/api/plansCreate, list, run, inspect plans
Rooms/api/roomsWar-room status, progress, artifacts
Channels/api/channelsRead/post channel messages
Memory/api/memoryQuery and search memory ledger
Skills/api/skillsList, search, toggle skills
Roles/api/rolesList and inspect role definitions
MCP/api/mcpMCP server config and status
Settings/api/settingsDashboard and engine configuration
System/api/systemHealth checks, version info

SSE real-time updates

The dashboard uses Server-Sent Events for live updates:

EventDescription
room:statusWar-room state changed
room:progressProgress updated
channel:messageNew channel message
plan:completePlan finished execution

Dashboard features

  • DAG visualization with dependency edges
  • Wave grouping showing parallel execution
  • Per-epic status badges and progress bars

Authentication

Terminal window
# Set in ~/.ostwin/.env
OSTWIN_API_KEY="your-secret-key"

All API requests require this key in the X-API-Key header.

Production deployment

  1. Build the frontend. cd dashboard/frontend && npm run build

  2. Serve static files. The backend auto-detects dashboard/frontend/out/ and serves it.

  3. Set environment variables. OSTWIN_API_KEY="strong-random-key" and PORT=9000.

  4. Run behind a reverse proxy (nginx/Caddy) for TLS and domain routing.

Troubleshooting

SymptomCauseFix
Backend 404sWrong working directoryRun from project root
Frontend can’t reach APIPort mismatchCheck DASHBOARD_URL
SSE not updatingProxy bufferingDisable response buffering
Empty room listNo war-roomsRun a plan first
Import errorsMissing depspip install -r dashboard/requirements.txt

Environment loading

The backend loads env vars from (first match wins):

  1. ~/.ostwin/.env — global install config
  2. ./.env — current working directory
  3. OS environment — already set in shell

Set ANTHROPIC_API_KEY once in ~/.ostwin/.env and it works for both the engine and dashboard.