Skip to content

Live pool / pod stats per agent role (SSE)

GET
/agent-roles/k8s-stats/stream
curl --request GET \
--url https://your-org.evershell.ai/v1/agent-roles/k8s-stats/stream \
--header 'Authorization: Bearer <token>'

Permissions: any signed-in caller.

Per-org pool counts (claimed-workspace active, pre-warmed ready, dynamic-scaler target) for the console’s role detail view — real-time, no polling, filtered by the caller’s org. A full snapshot on connect, then a per-role delta whenever a workspace lifecycle event or operator pool change flips a counter.

api_key
string

Event stream

Media type text/event-stream

Two frame types. On connect, a full snapshot — event: stats\ndata: <JSON array> — of per-role objects {role_id, ready, active, target}; the client replaces its state wholesale, so a role absent from the snapshot is removed. Thereafter, per-role deltas — event: stats-delta\ndata: <JSON array> — each object upserted by role_id, or dropped when it carries removed: true (the role’s pool is gone). Treat unknown keys as forward-compatible additions.

string