what is the agent name required for when you want ...
# ask-ai
l
what is the agent name required for when you want to do an agent dispatch const dispatch = await agentClient.createDispatch(roomName, agentName, { metadata: JSON.stringify(dispatchMetadata), }); is the agent name the same name as the worker names i can see in the livekit agents view?
t
Thanks for reaching out, Daniel. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — great question. You're asking whether the
agentName
passed to
createDispatch
is the same as the worker names shown in the LiveKit Agents UI. No —
agentName
is the logical dispatch name you set in the agent’s entrypoint (e.g.,
agent_name
in Python or
agentName
in Node). It identifies which type of agent to route to. The worker names you see in the UI are instance identifiers for running workers (they're auto-generated) and are not used as the
agentName
. Multiple workers can run under the same
agentName
, and dispatches target the agent name (LiveKit load-balances across its workers). If you want, tell me the
agent_name
you set in your agent code and the exact
createDispatch
call you're using and I’ll confirm it matches. Sources: Agent dispatch | LiveKit Documentation | Build a healthcare intake assistant with an Anam avatar | LiveKit | Avoiding crosstalk when multiple developers share a LiveKit project | LiveK... | Server lifecycle | LiveKit Documentation, with interactive elements
l
what are some reasons for why a bot does not get dispatched to a room
t
Thanks — I'll list common reasons a bot might not be dispatched and what to check. • Agent server not running or not registered. Verify the agent process is up and connected. •
agent_name
mismatch. Ensure the
agentName
passed to
createDispatch
exactly matches the agent’s configured `agent_name`/`agentName` in its entrypoint. • No workers for that agent name. Multiple workers can share one `agentName`; if none are registered, dispatch will fail. • Crosstalk / wrong project or shared environment. Another developer’s agents or shared project settings can cause dispatches to route unexpectedly. • Dispatch request timing or method. Token-based dispatch only works at room creation; other dispatch methods must be used correctly. • Credentials or permission issues. Check API key/secret and that the agent can authenticate. • Cold starts / scaling delays. If agents scale-to-zero or are cold-starting, they may miss rapid dispatches or time out. • Resource or infrastructure issues. High CPU, memory pressure, or network problems can prevent agents from connecting in time. • Startup or signal-handling bugs. Wrapper scripts that don’t forward signals (missing
exec
) or crash on shut down can prevent proper registration or draining. If you want, tell me: • the
agent_name
you set in your agent code, • the
createDispatch
call you’re making, • and whether you see any agent workers for that name in the Agents UI— and I’ll help narrow down the likely cause. Sources: Avoiding crosstalk when multiple developers share a LiveKit project | LiveK... | Agent dispatch | LiveKit Documentation | Deployment reliability on LiveKit Cloud | LiveKit, with interactive elements
l
how to get agentName from running livekit instance
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!