Skip to content

Dashboard API

Real-time dashboard endpoints power the Limon operations console. Provide SSE streaming, WebSocket chat, and agent session management.

Overview

The dashboard API serves the Limon Vue.js 3 frontend. It provides real-time streaming via SSE for operational views (events, goals, workers), WebSocket for chat, and REST for CRUD operations on all resources.

Authentication

Requires Authorization: Bearer <token> or zerg_session cookie. Dashboard views require admin role for operational panels.

Endpoints

SSE Event Stream

GET /api/v1/events/stream

SSE stream for real-time event display. Events include goal lifecycle, worker status changes, and system events.

event: goal.step_completed
data: {"goal_id": "goal-abc123", "step": 3, "result": "..."}

event: worker.status
data: {"worker_id": "w-001", "status": "idle"}

Worker Status

GET /api/v1/workers/bg

Returns background worker status for the dashboard:

json
{
  "ok": true,
  "tasks": [
    {
      "id": "bg-001",
      "status": "running",
      "agent_id": "agent-xyz",
      "task_type": "research",
      "progress": "Step 2/5",
      "started_at": 1745600000
    }
  ]
}

Provider Dashboard

GET /api/v1/providers/health

Aggregated provider health for the dashboard panel:

json
{
  "ok": true,
  "providers": [
    {
      "name": "anthropic",
      "status": "healthy",
      "latency_p50": 1200,
      "latency_p99": 4500,
      "requests_1h": 342,
      "circuit_breaker": "closed"
    }
  ]
}

Memory Dashboard

GET /api/v1/memory/stats

Memory usage statistics across agents:

json
{
  "ok": true,
  "total_entries": 15234,
  "agents": 8,
  "storage": { "ets": "1.2 MB", "pgvector": "4.5 MB" }
}

Goals Dashboard

GET /api/v1/goals

Aggregated goal metrics for the dashboard:

json
{
  "ok": true,
  "active": 5,
  "completed_today": 12,
  "failed_today": 1,
  "avg_steps": 4.2,
  "avg_duration_seconds": 180
}

Dashboard Auto-Refresh:

Limon views use polling-based refresh (usePolling) that calls refresh() immediately on mount. SSE supplements polling for real-time updates.

Error Codes:

CodeDescription
401Authentication required
403Admin role required for operational views

Examples:

bash
curl -N http://127.0.0.1:11434/api/v1/events/stream \
  -H "Authorization: Bearer $TOKEN"

curl http://127.0.0.1:11434/api/v1/goals \
  -H "Authorization: Bearer $TOKEN"

curl http://127.0.0.1:11434/api/v1/providers/health \
  -H "Authorization: Bearer $TOKEN"

Released under the MIT License.