how to check agent worker is available before disp...
# ask-ai
l
how to check agent worker is available before dispathcing the agent
t
Thanks for reaching out, Rajadurai. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I understand you want to know how to verify an agent worker is available before you dispatch work to it. I’ll explain what LiveKit does automatically and give you a few practical ways to check worker availability if you want to monitor or verify it yourself. Short answer • You do not need to pre-check availability for dispatch: LiveKit’s dispatch system only assigns jobs to registered workers that report they are available and are below their configured
load_threshold
. • If you still want to verify availability or monitor workers proactively, use the CLI status, run multiple workers for high availability, and monitor relevant metrics. What LiveKit handles for you • Workers register with the LiveKit server and report their load/health. • The server performs load-based dispatching and will only send jobs to workers that are eligible (i.e., registered, connected, and under
load_threshold
). • Explicit pre-checks are not required for correct dispatching because the server enforces availability when assigning jobs. Ways to verify or monitor worker availability • Use the CLI: run the
agent status
command to see health and current state of registered agents. This shows which workers are connected and their status. • Run multiple workers per `agent_name`: this provides redundancy and automatic failover so dispatching is resilient if one worker becomes unavailable. • Monitor metrics and telemetry: ◦ Track job queue depth and worker connectivity to detect bottlenecks or offline workers. ◦ Monitor worker load or CPU/memory for capacity planning (so workers don’t hit their
load_threshold
). • Health checks & alerts: ◦ Configure liveness/readiness probes (or equivalent) for worker processes in your deployment platform so orchestration can restart unhealthy workers. ◦ Add alerts when worker count for an agent falls below a threshold. If you want, I can: • Show the exact
agent status
command output fields to look at. • Suggest which metrics to collect (e.g., connected workers, queue length, worker load) and how to map them to alerts. • Walk through a small script or API call to poll worker status periodically. Which of these would you like next — CLI example, metrics/alert guidance, or a polling script? Sources: Agents Framework | livekit/livekit_composite | DeepWiki | Agent dispatch | LiveKit Documentation