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.

Pushes a per-org snapshot of pool counts (active workspaces, pre-warmed pool size, dynamic-scaler state) every time a workspace lifecycle event flips one of the counters — used by the console’s role detail view to render real-time active-workspace counts without polling. Filtered by caller’s org.

api_key
string

Event stream

Media type text/event-stream

Each event has shape event: stats\ndata: <JSON snapshot>\n\n. Snapshot is a per-role map keyed by role id with active, pool_warm, pool_target counts. Shape may evolve as the pool scheduler gains dimensions — treat unknown keys as forward-compatible additions.

string