docs: update README with dashboard and stats endpoints

This commit is contained in:
William Valentin
2026-03-14 11:30:39 -07:00
parent 063e41616a
commit af127a45f1
+9 -6
View File
@@ -114,6 +114,8 @@ GET /v1/events List events (?event_type=&framework=&limit=)
GET /v1/sessions List sessions (?from=&to=&framework=&host=&cursor=&limit=) GET /v1/sessions List sessions (?from=&to=&framework=&host=&cursor=&limit=)
GET /v1/sessions/{id} Session detail with runs GET /v1/sessions/{id} Session detail with runs
GET /v1/runs/{id} Run detail with spans GET /v1/runs/{id} Run detail with spans
GET /v1/stats/summary Today's aggregate stats (active sessions, runs, tools, errors by framework)
GET /v1/stats/timeseries Bucketed event counts (?window=1h|6h|24h|7d)
GET /v1/ws WebSocket live event broadcast GET /v1/ws WebSocket live event broadcast
``` ```
@@ -213,12 +215,13 @@ emitter.Emit(ctx, sdk.NewRunEnd(sessionID, runID, sdk.WithPayload(map[string]any
## Web UI ## Web UI
The dashboard has four views: The web UI has five views:
- **Sessions** — browse all agent sessions with date range and framework filters - **Dashboard** (`/`) — real-time overview with summary stats (active sessions, runs, tools, errors), uPlot time-series charts with selectable windows (1h/6h/24h/7d), framework breakdown bars, live activity feed, and top tools ranking. All sections update live via WebSocket.
- **Session Detail** — view runs within a session, drill into individual runs - **Sessions** (`/sessions`) — browse all agent sessions with date range, framework, and host filters
- **OpenClaw** — real-time grid of VM health cards (state, CPU, memory, disk, issues) - **Session Detail** (`/sessions/{id}`) — view runs within a session, drill into individual runs and spans
- **Agents** — live timeline of agent events with statistics (message counts, tool usage, errors) - **Agents** (`/agents`) — live timeline of OpenClaw agent events with VM status pills and statistics
- **OpenClaw** (`/openclaw`) — real-time grid of VM health cards (state, CPU, memory, disk, gateway status, issues)
## Development ## Development
@@ -243,7 +246,7 @@ internal/
├── event/ Envelope types and validation ├── event/ Envelope types and validation
├── httpx/ HTTP response helpers ├── httpx/ HTTP response helpers
├── queue/nats/ NATS publisher and subscriber ├── queue/nats/ NATS publisher and subscriber
├── store/postgres/ Database queries (sessions, runs, spans) ├── store/postgres/ Database queries (sessions, runs, spans, stats)
├── sdk/ Go client library for emitting events ├── sdk/ Go client library for emitting events
└── monitor/openclaw/ VM metrics collection (libvirt, SSH) └── monitor/openclaw/ VM metrics collection (libvirt, SSH)
hooks/ hooks/