Live Fleet

The Live Fleet page (/fleet) is AuditTrail's real-time situational awareness view — one card per agent, ticking at every span event via WebSocket. Operators open it when they want to see the fleet as a whole rather than drill into a single trace.

What each card shows

Per agent (identified by agent_name):

  • Status dotok / warning / error, driven by the most recent 15 minutes of traces
  • Error rate — percentage of traces that ended in status error
  • p95 latency — 95th percentile span duration across the rolling 15-minute window
  • Violation rate — percentage of traces where at least one constitutional rule tripped amber or red
  • Last seen — relative timestamp ("30s ago", "5m ago")
  • Sparkline — mini line chart of traces/minute over the window

Click any card to jump to the agent's most-recent trace.

Why 15 minutes?

Short enough to surface active incidents, long enough that a burst of activity isn't erased the moment it stops. Configurable via the FLEET_WINDOW_MINUTES env var on the backend.

WebSocket updates

The Fleet page subscribes to /ws/live and updates each card on span_end events without a refetch. Dropped connections auto- reconnect with exponential backoff; the sidebar badge turns amber while disconnected.

Endpoints

MethodPathPurpose
GET/api/v1/fleetSnapshot of all agents with rolling stats
GET/api/v1/fleet/{agent_name}Agent detail with recent traces

Demo seeding

_seed_demo_fleet_burst (in routes/auth.py) inserts 12 traces across 6 agent names (research-agent, customer-support, code-reviewer, data-analyst, content-moderator, sales-assistant) spread over the previous 14 minutes, so demo-login lands on a page that looks populated. The seed runs on every /auth/demo-login hit so the fleet always shows fresh-looking activity.