brief-analyst-2675
09/20/2025, 5:34 PMtall-airline-16756
09/20/2025, 5:34 PMtall-airline-16756
09/20/2025, 5:34 PMagent_name field in the WorkerOptions when defining the agent. This is a great way to enable explicit dispatch, which means the agent won't be automatically assigned to rooms. Instead, you can manually assign the agent to rooms through the API, participant token configuration, or SIP dispatch rules.
Here’s a simple example in Python to get you started:
opts = WorkerOptions(
entrypoint_fnc=entrypoint,
agent_name="test-agent"
)
And if you’re working with Node.js, it looks like this:
const opts = new WorkerOptions({
entrypoint_fnc: entrypoint,
agentName: "test-agent"
});
Once you’ve set the agent_name, just keep in mind that the agent won’t be automatically dispatched to new rooms. You’ll need to explicitly dispatch them using one of the supported methods. If you have any questions or need further guidance, feel free to ask—I’m here to help!
Sources: Dispatching agents | LiveKit Docs | Agent dispatch | LiveKit Docs | Agents telephony integration | LiveKit Docs | Making calls using SIP | LiveKit Docs | Accepting incoming calls | LiveKit Docsbrief-analyst-2675
09/20/2025, 5:35 PMtall-airline-16756
09/20/2025, 5:35 PMagent_name field in the WorkerOptions. Here's a simple example to guide you:
opts = WorkerOptions(
entrypoint_fnc=entrypoint,
agent_name="test-agent"
)
Just replace "test-agent" with the name you'd like for your agent. If you have any questions or need a hand with this, feel free to reach out—I'm here to help!brief-analyst-2675
09/20/2025, 5:37 PMtall-airline-16756
09/20/2025, 5:37 PMagent_name set in WorkerOptions. It doesn’t show up directly in the LiveKit UI as the agent's visible name; instead, it’s used behind the scenes for dispatch control and routing.
If you'd like the agent’s name to be visible in the UI, you’ll want to set it explicitly when the agent joins a room. For example, when accepting a job, you can do this:
await req.accept(name="Call Agent")
The name parameter here is what determines the participant’s visible name in the room. If you have any questions or want me to walk you through it further, just let me know—I’m here to help!
Sources: Worker options | LiveKit Docs | Agents telephony integration | LiveKit Docsbrief-analyst-2675
09/20/2025, 5:38 PMtall-airline-16756
09/20/2025, 5:38 PMagent_name set in WorkerOptions. It’s mainly used for explicit dispatch and is accessible internally or through the API. That said, I’m not entirely sure if this name shows up in the LiveKit dashboard UI, so it might be a good idea to take a quick look there to confirm.
If you have any more questions or if there’s anything else you’d like help with, please don’t hesitate to reach out—I’m here for you!
Sources: Dispatching agents | LiveKit Docs | livekit-agents/livekit/agents/worker.pybrief-analyst-2675
09/20/2025, 6:06 PMtall-airline-16756
09/20/2025, 6:07 PMagent_name. Let's go through a few important points together:
1. Exact Match: Please make sure the agent_name set in WorkerOptions exactly matches the name used in your dispatch request. Remember, agent names are case-sensitive, so even small differences matter.
2. Unique Agent: It's important that only one agent worker is registered with the specified agent_name. If multiple agents share the same name, the system might dispatch any one of them, which could cause confusion.
3. Correct Dispatch Method: Double-check that you're using the right dispatch method, like API or CLI, and that the agent_name is specified properly. For example, in Python, it looks like this:
dispatch = await lkapi.agent_dispatch.create_dispatch(
api.CreateAgentDispatchRequest(
agent_name="test-agent",
room="my-room"
)
)
1. Automatic Dispatch Disabled: Please verify that automatic dispatch is turned off for the agent to avoid conflicts.
2. Room Name: Ensure the room name in your dispatch request matches exactly the room you intend to use.
3. Check for Typos: It’s always good to double-check there are no typos or case mismatches in the agent_name.
If you continue to experience this issue, it might help to check the running agent instances and logs to see which agents are registered and receiving dispatch requests. Feel free to reach out if you want me to guide you through those steps or if there’s anything else I can assist you with!
Sources: Agent dispatch | LiveKit Docs | livekit-api/livekit/api/agent_dispatch_service.pybrief-analyst-2675
09/20/2025, 6:08 PMtall-airline-16756
09/20/2025, 6:09 PMWorkerOptions configuration. When the agent_name field is set, it means automatic dispatch is disabled. Here’s a quick example in Python:
opts = WorkerOptions(
entrypoint_fnc=entrypoint,
agent_name="my-telephony-agent"
)
So, if you see the agent_name set, automatic dispatch won’t happen automatically. Instead, the agent will need to be dispatched manually through the API, SIP rules, or participant tokens.
If you have any questions or want me to walk you through it, just let me know—I’m here to help!
Sources: Agent dispatch | LiveKit Docs | Agents telephony integration | LiveKit Docs | Dispatching agents | LiveKit Docsbrief-analyst-2675
09/21/2025, 3:07 AMtall-airline-16756
09/21/2025, 3:07 AMHandshakeAgentWorker or DispatchAgentWorkerSignal. These can give clues about authentication or connection hiccups.
5. Connection Test: Try using the Connection Test utility to check your WebSocket, WebRTC, and TURN server connectivity to the LiveKit servers.
6. Worker Load: Also, ensure the worker isn’t overloaded and is operating within the configured thresholds.
If you’d like, I’m here to help you through any of these steps or answer any questions you might have. Just let me know!
Sources: livekit-protocol/src/livekit.rs | protobufs/livekit_models.proto | livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi | pkg/service/agentservice.go | livekit-agents/livekit/agents/_exceptions.pybrief-analyst-2675
09/21/2025, 3:22 AMtall-airline-16756
09/21/2025, 3:23 AMagent_name in WorkerOptions exactly matches the name used in the sandbox options for explicit dispatch?
• Is the room name entered correctly in the dispatch request?
Having these details will really help us figure out what's going on together.brief-analyst-2675
09/21/2025, 3:25 AMtall-airline-16756
09/21/2025, 3:25 AMlistDispatch method from the AgentDispatchClient. This handy method will fetch all dispatches for a particular room and help confirm if the dispatch was created with the right room name.
Here's a simple example in TypeScript to guide you:
const agentDispatchClient = new AgentDispatchClient(
process.env.LIVEKIT_URL,
process.env.LIVEKIT_API_KEY,
process.env.LIVEKIT_API_SECRET
);
const roomName = 'my-room';
const dispatches = await agentDispatchClient.listDispatch(roomName);
console.log(`There are ${dispatches.length} dispatches in ${roomName}`);
If the room name is spot on, you’ll see a list of dispatches returned. Feel free to reach out if you have any questions or need a hand with this!
Sources: Agents telephony integration | LiveKit Docs | packages/livekit-server-sdk/src/AgentDispatchClient.ts | Dispatching agents | LiveKit Docs | Agent dispatch | LiveKit Docsbrief-analyst-2675
09/21/2025, 3:30 AMBVCTelephony for best results
_noise_cancellation_=noise_cancellation.BVC(),
),
)tall-airline-16756
09/21/2025, 3:30 AMagent_name in WorkerOptions. If you'd like to use explicit dispatch, here’s what you can do:
1. Set the agent_name in WorkerOptions to disable automatic dispatch. For example:
cli.run_app(agents.WorkerOptions(
entrypoint_fnc=entrypoint,
agent_name="my-agent"
))
1. Then, use an explicit dispatch method, like the AgentDispatchService API, to assign the agent to a room. For example:
await lkapi.agent_dispatch.create_dispatch(
api.CreateAgentDispatchRequest(
agent_name="my-agent",
room="my-room"
)
)
Also, just a heads-up: the session.start method in agent.py kicks off the agent's session after dispatch—it doesn’t handle the dispatch itself. So, please make sure the room name (ctx.room) is correctly passed to session.start.
If anything’s unclear or you’d like a hand with this, feel free to reach out—I’m here to help!
Sources: Authentication | LiveKit Docs | agent.py | Agent dispatch | LiveKit Docs | Dispatching agents | LiveKit Docs | Agents telephony integration | LiveKit Docsbrief-analyst-2675
09/21/2025, 3:31 AMtall-airline-16756
09/21/2025, 3:32 AMcreate_dispatch API call for you.brief-analyst-2675
09/21/2025, 3:33 AMtall-airline-16756
09/21/2025, 3:33 AMcreate_dispatch API call right where your application handles the user joining the room. This way, the agent will be sent directly to that room, making the process smooth and clear.
Here’s a simple example of how you might do this in the event handler or function that deals with a user joining:
async def on_user_join(room_name):
await lkapi.agent_dispatch.create_dispatch(
api.CreateAgentDispatchRequest(
agent_name="my-agent",
room=room_name
)
)
print(f"Agent 'my-agent' dispatched to room {room_name}")
Just swap out on_user_join with the actual function or event handler you’re using for user room joins. If you have any questions or want to walk through this together, I’m here to help!brief-analyst-2675
09/21/2025, 3:34 AMtall-airline-16756
09/21/2025, 3:34 AMcreate_dispatch API call. Since there’s no external application involved, you can simply run this API call through a script or tool whenever you want to dispatch an agent to a room.
Here’s a friendly example in TypeScript to guide you:
const agentDispatchClient = new AgentDispatchClient(
process.env.LIVEKIT_URL,
process.env.LIVEKIT_API_KEY,
process.env.LIVEKIT_API_SECRET
);
const roomName = 'my-room';
const agentName = 'my-agent';
await agentDispatchClient.createDispatch(roomName, agentName);
console.log(`Agent ${agentName} dispatched to room ${roomName}`);
Feel free to run this script whenever you need to dispatch your agent. And of course, if you have any questions or need a hand with anything else, just let me know—I’m here to help!brief-analyst-2675
09/21/2025, 3:36 AMtall-airline-16756
09/21/2025, 3:36 AMcreate_dispatch API call is definitely available in TypeScript. However, the documentation doesn’t clearly confirm if it’s directly supported in Python just yet. If you’re working with Python, a good approach might be to look at the TypeScript example and see if you can adapt it to your setup—especially if the Python SDK offers similar features.
If you have any questions or need a hand with this, please don’t hesitate to ask. I’m here to help!