Live pool / pod stats per agent role (SSE)
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.
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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Responses
Section titled “ Responses ”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.