acoustic-book-64157
10/14/2025, 3:14 PMtall-airline-16756
10/14/2025, 3:15 PMtall-airline-16756
10/14/2025, 3:15 PMagent_name in your WorkerOptions, you can make sure agents won’t be automatically assigned to rooms unless you specifically ask for it.
• Use Explicit Dispatch: You can take control over which agent version joins a room by using the AgentDispatchService API or by including the agent configuration in participant access tokens.
Following these steps will help ensure that only the latest agent version is assigned to new rooms. If you’d like, I’m here to provide more details or even some code examples to make this easier for you. Just let me know!
Sources: examples/agent_dispatch.py | pkg/loadtester/agentloadtester.go | Agent dispatch | LiveKit Docs | Deploying to production | LiveKit Docs | examples/agent-dispatch/index.tsacoustic-book-64157
10/14/2025, 3:16 PMtall-airline-16756
10/14/2025, 3:17 PMagent_name in your WorkerOptions, you can turn off automatic dispatch. This way, agents will only be assigned to rooms when you specifically request it.
2. Configure SIP Dispatch Rules: You can set up SIP dispatch rules to decide how agents get assigned to rooms for inbound calls. For instance, you might create separate rooms for each caller or send all calls to a particular room.
3. Use Runtime Dispatch: With the AgentDispatchService API, you can dispatch agents to rooms programmatically, giving you flexible control depending on the call situation.
If you’d like, I’m happy to provide detailed examples or help you further with setting these up. Just let me know!
Sources: Agents telephony integration | LiveKit Docs | Agent dispatch | LiveKit Docs | SIP dispatch rule | LiveKit Docs | livekit-api/livekit/api/agent_dispatch_service.py | packages/livekit-server-sdk/src/AgentDispatchClient.tsacoustic-book-64157
10/14/2025, 3:18 PMtall-airline-16756
10/14/2025, 3:19 PMagent_name in your WorkerOptions. This will stop the old versions from being automatically assigned to new calls.
• Explicitly Dispatch the New Version: You can use the AgentDispatchService API to directly assign the new version to rooms or calls.
If you don’t disable automatic dispatch, you might need to wait until the old version spins down before only the new one is used. Please feel free to reach out if you want me to walk you through these steps or if you have any other questions—I’m here to help!acoustic-book-64157
10/14/2025, 3:19 PMtall-airline-16756
10/14/2025, 3:19 PMagent_name is used across versions, both the old and new instances might still be dispatched during the rolling deployment period. To help you through this, the key is to make sure only the new version is explicitly dispatched for handling new calls.
Here’s a friendly guide on how to tackle this:
• Use Unique Agent Names for Each Version: Try assigning a unique agent_name to the new version (for example, agent-v2). This way, only the new version will be dispatched when you specifically request it.
• Explicitly Dispatch the New Version: You can use the AgentDispatchService API or SIP dispatch rules to target the new version by its unique agent_name.
• Wait for Old Instances to Spin Down: If unique names aren’t an option right now, just keep in mind that the old instances will take about an hour to shut down, after which only the new version will be active.
Please feel free to reach out if you’d like any more help or guidance with implementing these changes—I’m here to support you!