Live pool / pod stats per agent role (SSE)
GET
/agent-roles/k8s-stats/stream
const url = 'https://your-org.evershell.ai/v1/agent-roles/k8s-stats/stream';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” api_key
string
Responses
Section titled “ Responses ”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