victorious-umbrella-48801
10/21/2025, 7:51 PMtall-airline-16756
10/21/2025, 7:51 PMtall-airline-16756
10/21/2025, 7:52 PMlk agent create command doesn’t let you specify an agent name directly—it automatically generates an agent ID for you. If you’d like to assign a name for dispatch purposes, you’ll do that within your agent application code when you define WorkerOptions, rather than during the creation step.
Now, if your goal is to start a new agent project with a specific name, the lk agent init command is the way to go, as it accepts an [AGENT-NAME] argument.
Please feel free to reach out if you want me to walk you through this or if you have any other questions—I’m here to help!
Sources: CLI Tools & Token Management | livekit/livekit_composite | DeepWiki | Agent deployment CLI reference | LiveKit Docs | autocomplete/fish_autocomplete | examples/agent_dispatch.pyvictorious-umbrella-48801
10/21/2025, 7:54 PMtall-airline-16756
10/21/2025, 7:55 PMlivekit-server-sdk gem in Ruby on Rails, you have the option to specify an agent_name to make sure the right agent is sent to the room. This is done by setting the room_config property on the access token. Here’s a simple example to guide you:
require 'livekit'
token = LiveKit::AccessToken.new(api_key: 'yourkey', api_secret: 'yoursecret')
token.identity = 'participant-identity'
token.name = 'participant-name'
token.video_grant = LiveKit::VideoGrant.new(roomJoin: true, room: 'room-name')
# Configure agent dispatch
token.room_config = LiveKit::Proto::RoomConfiguration.new(
agents: [LiveKit::Proto::RoomAgentDispatch.new(
agent_name: "test-agent",
metadata: "test-metadata",
)]
)
jwt = token.to_jwt
puts jwt
To clarify:
• agent_name is where you specify the agent you want to dispatch.
• metadata lets you include any extra details you want the agent to have.
If anything feels unclear or you’d like a hand implementing this in your Rails app, just let me know—I’m here to help!
Sources: README.md | packages/livekit-server-sdk/README.md | Voice Assistant Applications | livekit/livekit_composite | DeepWikivictorious-umbrella-48801
10/21/2025, 7:57 PMtall-airline-16756
10/21/2025, 7:58 PMagent_name on the LiveKit side, you’ll want to include it in the WorkerOptions when you create your agent worker. Here’s a quick example to guide you:
Python:
# When creating your agent worker
worker_options = WorkerOptions(agent_name="test-agent")
Node.js:
// When creating your agent worker
const workerOptions = {
agentName: "test-agent"
}
Once you’ve set this agent_name, make sure it matches the name used in:
• API dispatch requests
• Room configurations in access tokens
• SIP dispatch rules (if you’re using them)
If you have any questions or need a hand with this setup, just let me know—I’m here to help!
Sources: Agent dispatch | LiveKit Docs | Agents telephony integration | LiveKit Docs | livekit-api/livekit/api/agent_dispatch_service.py | SIP troubleshooting guide | LiveKit Docsvictorious-umbrella-48801
10/21/2025, 8:01 PMBVCTelephony for best results
noise_cancellation=noise_cancellation.BVC(),
),
)
# Join the room and connect to the user
await ctx.connect()
if name == “__main__“:
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint, agent_name=“kora_agent”, prewarm_fnc=prewarm))tall-airline-16756
10/21/2025, 8:02 PMagent_name in WorkerOptions. This setup allows you to have explicit control over agent dispatch, which means you decide exactly when and how the agent joins rooms. Let me walk you through it:
• By setting agent_name, automatic dispatch is turned off, so the agent will join rooms only when you explicitly dispatch it using the AgentDispatchService API.
• This method works wonderfully for situations like telephony integrations or when you want to manage agent behavior very precisely.
Looking at your code:
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint, agent_name="kora_agent", prewarm_fnc=prewarm))
Everything looks spot on for explicit dispatch! If you have any questions or want to explore this further, please feel free to ask—I'm here to help!
Sources: Agent dispatch | LiveKit Docs | metrics/metrics_stt.py | Agents telephony integration | LiveKit Docs | Worker options | LiveKit Docsvictorious-umbrella-48801
10/21/2025, 8:07 PMtall-airline-16756
10/21/2025, 8:09 PMagent_name in WorkerOptions exactly matches the name used in your dispatch rule or token configuration. This little detail can make a big difference!
• Check Worker Availability: Make sure you have enough agent workers running to handle dispatch requests. The workers need to be available and ready to accept jobs for things to run smoothly.
• Monitor Connection Events: Try using event callbacks like OnParticipantConnected to see if the agent is actually joining the room. It’s a helpful way to keep track.
• Diagnostic Commands: Running lk agent status --id <agent-id> and lk agent logs --id <agent-id> --log-type=deploy can give you valuable insights into the agent’s status and logs.
• Explicit Dispatch: If you’re using explicit dispatch, please check that the dispatch request is properly configured and sent to the agent. This ensures everything reaches the right place.
If you’d like, I’m more than happy to walk you through any of these steps in detail or offer further assistance. Just let me know!
Sources: Community & Support | livekit/livekit_composite | DeepWiki | Worker lifecycle | LiveKit Docs | README.md | pkg/loadtester/agentloadtester.go | Agent dispatch | LiveKit Docsvictorious-umbrella-48801
10/21/2025, 8:11 PMtall-airline-16756
10/21/2025, 8:12 PM