able-electrician-38130
10/19/2025, 2:46 PMtall-airline-16756
10/19/2025, 2:46 PMtall-airline-16756
10/19/2025, 2:47 PMagent_name to boost availability.
• Consider implementing proper load balancing and auto-scaling to manage demand smoothly.
• Keep an eye on worker availability to make sure agents are ready and waiting to accept jobs.
• Set appropriate load thresholds to prevent any one agent from getting overwhelmed. Sources: pkg/agent/client.go | agents/src/worker.ts | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki | Operational Guidance & Best Practices | livekit/livekit_composite | DeepWik...able-electrician-38130
10/19/2025, 3:12 PMtall-airline-16756
10/19/2025, 3:13 PMstt_availability_changed), which you could extend to monitor agent capacity.
• LiveKit’s webhook system supports error handling and retry mechanisms, which can be set up for general error recovery.
To make sure I guide you in the best way possible, could you please share a bit more about what you’re aiming to do? For example:
• Would you like to be notified when all agents hit their capacity?
• Are you looking to programmatically scale up agents when capacity is maxed out?
• Do you want to set up fallback behavior for when no agents are available?
• Or are you interested in monitoring worker status changes through existing systems? Sources: examples/voice_agents/error_callback.py | pkg/service/agentservice.go | Webhook & Event System | livekit/livekit_composite | DeepWikiable-electrician-38130
10/19/2025, 3:15 PMtall-airline-16756
10/19/2025, 3:16 PMWS_AVAILABLE or WS_FULL) to know when agents are busy and then create custom queuing logic based on that.
• Also, consider adapting the FallbackAdapter pattern (commonly used with AI services) to manage agent availability by re-queuing any failed requests and trying again with backup agents or after a short delay.
To make sure I guide you in the best way possible, could you please clarify a few things?
• Are you aiming to re-queue jobs at the application level before dispatching, or do you want to implement retry logic after a job dispatch fails?
• What specific situations should trigger the re-queuing? For example, is it when no workers are available or when job dispatch times out?
• Do you need a queue that persists even if the application restarts, or would an in-memory queue work for you?
• What kind of retry strategy do you have in mind? Something like exponential backoff or fixed intervals?
Looking forward to your answers so I can assist you further!
Sources: Events and error handling | LiveKit Docs | livekit-agents/livekit/agents/_exceptions.py | Deploying to custom environments | LiveKit Docs | pkg/agent/client.go | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWikiable-electrician-38130
10/19/2025, 3:20 PMtall-airline-16756
10/19/2025, 3:21 PMResourceURLNotifier to send important events like agent_dispatch_failed or worker_capacity_exceeded directly to your system.
• Next, it's a good idea to set up retry logic with exponential backoff to make sure these webhook events are delivered reliably, even if there are temporary hiccups.
• Also, keep an eye on Prometheus metrics such as dispatch_failure and dispatch_drop. These can help you track capacity-related issues and trigger alerts when needed.
If you'd like, I can provide detailed steps on how to configure the webhook or help you integrate it with your external system. Just let me know!
Sources: Webhook & Event System | livekit/livekit_composite | DeepWiki | livekit-agents/livekit/agents/worker.py | pkg/agent/client.go | Web and mobile frontends | LiveKit Docs | webhook/notifier.go