LiveKit Cloud provides a built-in job distribution system that ensures only one agent app (worker) is triggered for a given job at a time. This system uses round-robin distribution and a single-assignment principle, so when a job (such as a new room or event) becomes available, it is assigned to only one worker. If that worker does not accept the job within a set timeout, it is reassigned to another available worker. This mechanism prevents both agents from triggering simultaneously for the same job.
If you need more advanced coordination, you can also use LiveKit's real-time state and data features or RPC communication to implement custom logic between agents. However, for most scenarios, the built-in job distribution will handle mutual exclusion automatically.
• Jobs are assigned to only one agent at a time
• Automatic reassignment if an agent does not respond
• Optional: Use real-time state or RPC for custom coordination
No additional configuration is required for basic mutual exclusion between agent apps.
Sources:
Deploying to production | LiveKit Docs |
Deployment and scaling | LiveKit Docs |
Web and mobile frontends | LiveKit Docs