dazzling-truck-32153
09/09/2025, 4:46 AMtall-airline-16756
09/09/2025, 4:46 AMtall-airline-16756
09/09/2025, 4:46 AMagent_name, and I’m here to help! This setting can’t be done directly in a .toml file like livekit.toml. Instead, you’ll want to configure it programmatically in your agent’s code using the WorkerOptions class.
Here’s a friendly example in Python to guide you:
if __name__ == "__main__":
cli.run_app(
WorkerOptions(
entrypoint_fnc=entrypoint,
agent_name="my-agent", # Set agent name here
)
)
After setting it up, you can easily manage your agent’s dispatch behavior either through the Agent Dispatch API or by defining it in the room configuration of an access token.
If you have any questions or want me to walk you through this, just let me know—I’m happy to help!
Sources: Dispatching agents | LiveKit Docs | Agents telephony integration | LiveKit Docs | Deploying to production | LiveKit Docs | examples/agent-dispatch/index.ts | Agent dispatch | LiveKit Docsdazzling-truck-32153
09/09/2025, 4:50 AMtall-airline-16756
09/09/2025, 4:51 AMagent_name field might look blank after you deploy using lk agent deploy. This happens because the deployment process itself doesn’t set or require the agent_name. Instead, you’ll want to explicitly define it right in your agent's code using WorkerOptions.
Here’s a simple way to fix this:
1. Make sure you set the agent_name in your agent's startup code. For example:
if __name__ == "__main__":
cli.run_app(
WorkerOptions(
entrypoint_fnc=entrypoint,
agent_name="my-agent" # Set agent name here
)
)
1. Double-check that the agent_name matches any dispatch rules or API configurations if you’re using explicit dispatch.
2. Run lk agent status or lk agent list to see your agent’s current runtime state and confirm the name is showing up correctly.
If you’re still running into trouble after this, just let me know! I’m here to help and we can dig into it together.
Sources: Agent dispatch | LiveKit Docs | cmd/lk/agent.go | Agents telephony integration | LiveKit Docs | SIP troubleshooting guide | LiveKit Docs | src/components/playground/Playground.tsxdazzling-truck-32153
09/09/2025, 5:13 AMdazzling-truck-32153
09/09/2025, 5:13 AMtall-airline-16756
09/09/2025, 5:14 AMagent_name is working locally but hasn’t been properly registered or deployed in the cloud for inbound calls yet. No worries—let’s walk through some steps to get this sorted out:
1. Make Sure agent_name Matches: Double-check that the agent_name in your agent code exactly matches the one in your dispatch rule. For example:
# In agent.py\nWorkerOptions(\n entrypoint_fnc=entrypoint,\n agent_name=\"inbound-agent\" # Must match dispatch rule\n)
// In dispatch-rule.json\n{\n \"room_config\": {\n \"agents\": [\n { \"agent_name\": \"inbound-agent\" }\n ]\n }\n}
1. Apply the Dispatch Rule: Run lk sip dispatch create dispatch-rule.json to register the rule in the cloud.
2. Verify Agent Deployment: Make sure your agent is deployed to LiveKit Cloud—not just running locally—since local execution doesn’t automatically register it in the cloud.
3. Check Active Dispatches: Use the API or CLI to list current dispatch rules and confirm your agent is included.
4. Confirm SIP Trunk: Verify that your inbound SIP trunk is active and properly linked to the dispatch rule.
Could you please check if the agent has been deployed to LiveKit Cloud and if the dispatch rule is applied? I’m here to help if you need any more guidance or have questions along the way!
Sources: SIP troubleshooting guide | LiveKit Docs | Accepting incoming calls | LiveKit Docs | livekit/livekit_cloud_agent.pb.go | examples/agent_dispatch.py | Agents telephony integration | LiveKit Docsdazzling-truck-32153
09/09/2025, 5:29 AMtall-airline-16756
09/09/2025, 5:29 AM