Web dashboard for Agent Relay - real-time agent monitoring, communication, and fleet management.
Works out-of-the-box - sensible defaults, no configuration required. Can also run standalone with mock data for testing and demos.
# Install
npm install
# Run in standalone mode (no dependencies required)
npm run dev:mock
# Or run connected to relay daemon
npm run devThe dashboard supports three operation modes:
Used by agent-relay up --dashboard. Direct @agent-relay package integration.
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Dashboard (Full Mode) β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β Next.js Frontend β β
β β React Components β’ Hooks β’ API Client β β
β ββββββββββββββββββ¬ββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββΌββββββββββββββββββββββββββ β
β β Full Server (startDashboard) β β
β β @agent-relay/storage β’ sdk β’ bridge β β
β β Direct DB access β’ Agent spawning β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β Port 3888 β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Forwards requests to a running relay daemon.
βββββββββββββββββββββββ βββββββββββββββββββββββ
β Dashboard β β Relay Daemon β
β ββββββββββββββββ β β β
β β Next.js UI β β β βββββββββββββββ β
β βββββββββ¬βββββββ β β β Agents β β
β β β β β Storage β β
β βββββββββΌβββββββ β β β Bridge β β
β β Proxy Server βββββΌββββββΌββΆ βββββββββββββββ β
β ββββββββββββββββ β β β
β Port 3888 β β Port 3889 β
βββββββββββββββββββββββ βββββββββββββββββββββββ
Returns fixture data. No external dependencies required.
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Dashboard (Mock Mode) β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β Next.js Frontend β β
β β React Components β’ Hooks β’ API Client β β
β ββββββββββββββββββ¬ββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββΌββββββββββββββββββββββββββ β
β β Express Server (Mock Mode) β β
β β Returns fixture data β’ No deps needed β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β Port 3888 β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
# Install globally
npm install -g @agent-relay/dashboard
# Or use npx
npx @agent-relay/dashboardPerfect for development, testing, and demos:
# Using npm scripts
npm run dev:mock # Development with hot reload
npm run start:mock # Production build
# Using CLI
relay-dashboard --mock
relay-dashboard -m -v # Mock mode with verbose logging# Start relay daemon first
agent-relay up
# Then start dashboard
relay-dashboard
npm run devrelay-dashboard [options]
Options:
-p, --port <port> Port to listen on (default: 3888)
-r, --relay-url <url> Relay daemon URL (default: http://localhost:3889)
-s, --static-dir <path> Static files directory (default: ./out)
-m, --mock Run in mock mode - no relay daemon required
-v, --verbose Enable verbose logging
-h, --help Show help
Examples:
relay-dashboard # Proxy mode
relay-dashboard --mock # Standalone with mock data
relay-dashboard -m -v # Mock mode, verbose
relay-dashboard -p 4000 -m # Custom port
All environment variables are optional - sensible defaults work out-of-the-box.
| Variable | Default | Description |
|---|---|---|
PORT |
3888 | Dashboard server port |
RELAY_URL |
http://localhost:3889 | Relay daemon URL |
STATIC_DIR |
./out | Static files directory |
MOCK |
false | Enable mock mode |
VERBOSE |
false | Enable verbose logging |
CORS_ORIGINS |
(none) | Allowed CORS origins (comma-separated, or *) |
REQUEST_TIMEOUT |
30000 | Request timeout in milliseconds |
# Install dependencies
npm install
# Development (proxy mode - needs relay daemon)
npm run dev
# Development (mock mode - standalone)
npm run dev:mock
# Build
npm run build
# Run tests
npm test
# Type checking
npm run typecheck
# Test coverage
npm run test:coverageThis is a monorepo with two packages:
relay-dashboard/
βββ packages/
β βββ dashboard/ # @agent-relay/dashboard
β β βββ src/
β β β βββ app/ # Next.js App Router pages
β β β βββ components/ # React components
β β β β βββ hooks/ # Custom React hooks
β β β βββ lib/ # API clients & utilities
β β β βββ types/ # TypeScript definitions
β β βββ public/ # Static assets
β β βββ out/ # Built static site
β β βββ index.ts # Re-exports from dashboard-server
β β
β βββ dashboard-server/ # @agent-relay/dashboard-server
β βββ src/
β βββ server.ts # Main server with @agent-relay integrations (5,900+ lines)
β βββ proxy-server.ts # Lightweight proxy/mock server for development
β βββ index.ts # Package exports
β βββ start.ts # CLI entry point
β βββ services/ # Business logic modules
β β βββ metrics.ts
β β βββ needs-attention.ts
β β βββ user-bridge.ts
β β βββ health-worker-manager.ts
β βββ types/ # TypeScript type definitions
β βββ mocks/ # Mock data for standalone mode
β βββ fixtures.ts
β βββ routes.ts
β
βββ package.json # Root workspace config
βββ README.md
The dashboard includes comprehensive tests:
# Run all tests
npm test
# Watch mode
npm run test:watch
# Coverage report
npm run test:coverage- Server Tests - Mock mode, proxy mode, health checks
- Fixture Tests - Validates mock data structure
- Component Tests - React component tests
Mock mode includes realistic fixture data for:
- Agents - Multiple agents with different statuses
- Messages - Sample message threads
- Sessions - Active and historical sessions
- Channels - Team communication channels
- Decisions - Pending approval/choice decisions
- Tasks - Task assignments with various states
- Fleet - Multi-server fleet statistics
- Metrics - System and agent metrics
All fixtures are in packages/dashboard-server/mocks/fixtures.ts and can be customized.
Returns fixture data for all endpoints:
| Endpoint | Description |
|---|---|
GET /api/data |
Dashboard data (agents, messages, sessions) |
GET /api/agents/:name/online |
Agent online status |
POST /api/spawn |
Spawn agent (mock) |
POST /api/send |
Send message (mock) |
GET /api/channels |
List channels |
GET /api/decisions |
List pending decisions |
GET /api/tasks |
List tasks |
GET /api/metrics |
System metrics |
GET /api/fleet/stats |
Fleet statistics |
WS /ws |
WebSocket (sends periodic mock updates) |
Forwards to relay daemon at configured URL.
fly apps create relay-dashboard
fly secrets set RELAY_URL=https://your-relay.fly.dev
fly deploydocker build -t relay-dashboard .
# Mock mode
docker run -p 3888:3888 -e MOCK=true relay-dashboard
# Proxy mode
docker run -p 3888:3888 -e RELAY_URL=http://relay:3889 relay-dashboardExport to out/ and deploy to any static host. Configure reverse proxy for /api/* and /ws.
- Real-time monitoring - Live agent status, messages, and activity via WebSocket
- Fleet management - Multi-project/workspace support with Bridge view
- Communication - Channels, direct messages, broadcasts, @mentions
- Terminal logs - Stream live PTY output from agents
- Decision queue - Approve/reject agent decisions requiring human input
- Metrics - System health, throughput, session lifecycle
- Theming - Light/dark mode, compact display options
Apache-2.0 - Copyright 2025 Agent Workforce Incorporated
