From af127a45f1919385daa3bfd69b5a105fb035a9eb Mon Sep 17 00:00:00 2001 From: William Valentin Date: Sat, 14 Mar 2026 11:30:39 -0700 Subject: [PATCH] docs: update README with dashboard and stats endpoints --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8708c4a..a7ee428 100644 --- a/README.md +++ b/README.md @@ -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/{id} Session detail with runs 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 ``` @@ -213,12 +215,13 @@ emitter.Emit(ctx, sdk.NewRunEnd(sessionID, runID, sdk.WithPayload(map[string]any ## Web UI -The dashboard has four views: +The web UI has five views: -- **Sessions** — browse all agent sessions with date range and framework filters -- **Session Detail** — view runs within a session, drill into individual runs -- **OpenClaw** — real-time grid of VM health cards (state, CPU, memory, disk, issues) -- **Agents** — live timeline of agent events with statistics (message counts, tool usage, errors) +- **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. +- **Sessions** (`/sessions`) — browse all agent sessions with date range, framework, and host filters +- **Session Detail** (`/sessions/{id}`) — view runs within a session, drill into individual runs and spans +- **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 @@ -243,7 +246,7 @@ internal/ ├── event/ Envelope types and validation ├── httpx/ HTTP response helpers ├── 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 └── monitor/openclaw/ VM metrics collection (libvirt, SSH) hooks/