My agent worker is connected to the livekit cloud ...
# ask-ai
s
My agent worker is connected to the livekit cloud but it's not automatically joining newly created rooms. However, i can manually dispatch them to the rooms
t
Thanks for reaching out, John. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Just a quick heads-up about agent workers in LiveKit Cloud—they’re set up to automatically join any new rooms by default. This happens when you don’t set the
agent_name
field in the
WorkerOptions
during worker registration. To make sure automatic dispatch works smoothly for you: • Simply leave out the
agent_name
in
WorkerOptions
. For example, a simple setup would look like this:
Copy code
agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=entrypoint))
When
agent_name
isn’t set, your worker is ready to be automatically dispatched to every new room created in your LiveKit Cloud project. If you’ve set the
agent_name
, automatic dispatch won’t happen, so you’ll need to assign the agent to rooms manually. If you want, I’m here to help—just let me know! Sources: Dispatching agents | LiveKit Docs | LiveKit Docs | Agent dispatch | LiveKit Docs | An open source stack for real-time multimodal AI | agent/main.py
✅ 1