busy-lunch-15701
03/13/2026, 6:55 PMtall-airline-16756
03/13/2026, 6:55 PMtall-airline-16756
03/13/2026, 6:55 PMlist_dispatch()) to list active agent dispatches for rooms. Seeing which agents are assigned and how many dispatches exist helps infer current capacity and assignment status.
◦ The LiveKit Cloud console also shows real‑time agent/session metrics (agent session count, status, uptime, CPU/memory) which can be used to assess available capacity.
• Self‑hosted Agent Server
◦ The agent server exposes a built‑in health check endpoint (default `http://0.0.0.0:8081/`) that returns 200 when healthy and 503 when there’s a problem. Use this in orchestration/monitoring to know which worker instances are up.
◦ You can configure load_fnc and load_threshold on each agent to report current load (0 to 1). The server stops accepting new jobs when load > load_threshold. Aggregating these reported loads across instances lets you compute available capacity.
How teams commonly implement “available worker” metrics
• Aggregate health checks across agents to count healthy instances.
• Use dispatch listings to count agents currently assigned to jobs and subtract from total healthy instances.
• Expose/collect each agent’s load (via load_fnc) into your metrics system (Prometheus/Grafana) and compute available capacity from load values and thresholds.
• Use Cloud console metrics when on LiveKit Cloud for a quick view of sessions and resource usage.
If you’d like, I can help with next steps — for example:
• Which deployment are you using (LiveKit Cloud or self‑hosted)?
• If self‑hosted, do you already have metrics collection (Prometheus)? I can outline a step‑by‑step approach to compute available worker count from health, dispatch, and load data. Sources: Self-hosted deployments | LiveKit Documentation | Agent deployment overview | LiveKit Documentation | Server options | LiveKit Documentation | Deploy and scale agents on LiveKit Cloud | LiveKitbusy-lunch-15701
03/13/2026, 7:00 PMtall-airline-16756
03/13/2026, 7:00 PMlist_dispatch()): returns active agent dispatches (which agents are currently assigned to rooms). By inspecting dispatches you can see how many agents are currently handling jobs and which rooms they’re attached to.
• LiveKit Cloud console (Agents section): shows real‑time metrics such as agent session count, agent status/uptime, and resource usage (CPU/memory). This gives an operational view of capacity without needing to aggregate API calls yourself.
How teams typically derive “available workers”
• Count healthy agent instances using the Cloud console metrics (or agent registration state) as your total capacity.
• Use list_dispatch() to count currently assigned/occupied agents.
• Compute available = total healthy instances − currently assigned agents.
• Optionally, combine with agent CPU/memory metrics from the console to factor in partial capacity (e.g., mark an agent as “available” only if load < threshold).
If you want, I can:
• Show an example flow to compute available workers using the Dispatch API plus console metrics.
• Help design a small polling or metrics pipeline (e.g., how often to call list_dispatch() and which fields to inspect).
Which would you prefer—an example implementation using the Dispatch API, or a high‑level monitoring design for the Cloud console metrics?busy-lunch-15701
03/14/2026, 3:34 AMtall-airline-16756
03/14/2026, 3:35 AMlistRooms() (SDK names vary: roomService.listRooms() in Node/Java/Kotlin, room_service.list_rooms() in Python, ListRooms in Go, etc.). This returns metadata about currently active rooms.
• List participants (sessions) in a specific room:
◦ Use the appropriate room/participant listing method (for example, listParticipants(roomName) in server SDKs) to get active participant connections for that room.
How teams commonly use this
• Admin dashboard: call listRooms() to show active rooms, then call participant listing per room when you need session-level details.
• Monitoring: poll listRooms() periodically and query participant lists only for rooms of interest to avoid high API load.
If you want, I can:
• Provide a code example in the SDK you’re using (Node, Python, Go, etc.).
• Suggest a polling cadence and efficient pattern for dashboards (e.g., list rooms every 30s, fetch participants for top N rooms).
Which SDK or language are you using?
Sources: Server-side | livekit/livekit_composite | DeepWiki | server-sdk-ruby | livekit/livekit_composite | DeepWiki | server-sdk-js | livekit/livekit_composite | DeepWiki