rich-megabyte-73517
04/03/2026, 8:45 PMtall-airline-16756
04/03/2026, 8:45 PMtall-airline-16756
04/03/2026, 8:46 PMterminate=false (e.g., job_request.reject(terminate=False)), but this increases dispatch latency and isn’t recommended for production.
• The recommended approach is explicit dispatch: give agents distinct names and dispatch jobs to named agents (or set the agents field on CreateRoom / use CreateDispatch). Named agents disable automatic dispatch and let you control routing; multiple agents with the same name are load-balanced.
Would you like guidance for switching to explicit dispatch for your setup, or examples for using reject(terminate=False) safely?
Sources: Why do jobs stop after agent rejection? | LiveKit | Self-hosted deployments | LiveKit Documentation, with interactive elementsrich-megabyte-73517
04/03/2026, 9:23 PMtall-airline-16756
04/03/2026, 9:23 PMagent-AJ_pFW8byHphyRG).
Below is a concise example flow showing how to name agents and explicitly dispatch to them.
1) When you create/register the agent process, set its name (example in pseudocode):
agent = Agent.create(name="agent-AJ_pFW8byHphyRG")
agent.connect()
2) Create a room and specify which named agents may be dispatched:
{
"room": "support-call-123",
"agents": [
"agent-AJ_pFW8byHphyRG"
]
}
3) Or create an explicit dispatch to add an agent to an existing room:
dispatch = CreateDispatch(room="support-call-123", agents=["agent-AJ_pFW8byHphyRG"])
Notes:
• Named agents do not receive automatic dispatch from the default pool. Only rooms or dispatch rules that list that name will route jobs to that agent.
• If multiple instances share the same name (for blue/green or scale), LiveKit will load-balance between them.
• If you want fallback routing, list multiple agent names in the agents array in order of preference.
If you’d like, tell me:
• how you currently register agents (SDK/language), and
• whether you want automatic fallback to other agents — I can give exact code snippets for your stack., with interactive elementsrich-megabyte-73517
04/03/2026, 9:25 PMtall-airline-16756
04/03/2026, 9:25 PMagent-12345), LiveKit will load-balance incoming jobs among those instances.
• The server uses a round-robin / single-assignment approach: each job is assigned to one agent instance; if that instance doesn't accept within the timeout, the job is sent to another available instance.
• Named agents disable automatic dispatch from the default pool; only rooms/dispatch rules that explicitly list that name will route jobs to them.
Concrete example
• You have a campaign for gym sales and want any available gym-sales rep instance to handle calls for that campaign.
• Register each worker process with the same name (the app agent ID):
◦ instance A: name = agent-gym-42
◦ instance B: name = agent-gym-42
◦ instance C: name = agent-gym-42
• When you create the room/dispatch for the campaign:
{
"room": "gym-campaign-001",
"agents": [
"agent-gym-42"
]
}
• Jobs for gym-campaign-001 will be distributed across A, B, and C by LiveKit’s load balancer.
Fallbacks and preferences
• If you want a strict fallback order (try agent X, then Y), list multiple agent names in the agents array in order of preference.
• If you want any available rep from several groups, you can include multiple names (or use the same name across all instances) to enable load-balanced distribution.
Would you like an example in your SDK/language or guidance on fallback ordering vs. single shared-name load balancing?
, with interactive elementsrich-megabyte-73517
04/04/2026, 1:43 AMtall-airline-16756
04/04/2026, 1:43 AMagents on room/create dispatch) apply equally to cloud and self‑hosted deployments.
Would you like a quick checklist to verify your self‑hosted server version and agent registration settings?
, with interactive elementsrich-megabyte-73517
04/04/2026, 1:44 AMtall-airline-16756
04/04/2026, 1:45 AMagents list = ordered fallback / explicit dispatch.
Which behavior do you want for your campaign — fully automatic routing, a dedicated named group, or ordered fallbacks? I can give exact config/code for your stack.
, with interactive elementsrich-megabyte-73517
04/06/2026, 10:36 PMtall-airline-16756
04/06/2026, 10:37 PMagents array, or
• Have agents report load to a central coordinator and let that coordinator call CreateDispatch with the chosen agent name.
Would you like an example of a custom dispatcher for your language/stack?
, with interactive elements