i am building a swift voice agent for my iphone ap...
# ask-ai
m
i am building a swift voice agent for my iphone app. we'll have thousands of users spinning up "rooms" - how do i set it up so an agent auto joins each room instantly? do i need a dispatcher or no? The solution is to configure dispatch rules in the LiveKit Cloud dashboard. The user needs to: 1. Go to the LiveKit Cloud dashboard 2. Navigate to the Agents section 3. Create a dispatch rule that matches rooms starting with "mother-moon-" 4. Configure it to dispatch the Python agent to those rooms
t
Thanks for reaching out, Jesse. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit Cloud supports automatic agent dispatch in certain scenarios, but the solution depends on how your rooms are created and your specific requirements: • SIP Dispatch Rules: If rooms are created via SIP and follow a name pattern (e.g., starting with
mother-moon-
), you can configure SIP dispatch rules in the LiveKit Cloud dashboard. This method supports pattern-based automatic agent assignment and does not require an external dispatcher. • General Room Name Patterns: For non-SIP scenarios (e.g., app-generated room names), LiveKit Cloud does not offer built-in dispatch rules to auto-join agents based on generic name prefixes. In these cases, you will need to implement an external dispatcher. This service monitors room creation events, matches room names against your pattern, and triggers agent dispatch via the API. • Token-Based Dispatch: If you issue participant tokens server-side, you can include agent dispatch instructions directly in the token. This allows automatic agent joining on participant connect, but does not use pattern-based matching—only what you explicitly supply at token creation. Summary: For SIP room prefixes, configure dispatch rules in your Cloud dashboard. For general room pattern matching (as in your described use case), you will need to build and operate a dispatcher that programmatically matches room names and dispatches the agent accordingly. Cite relevant implementation examples or details upon request. Sources: Agent dispatch | LiveKit Docs | SIP dispatch rule | LiveKit Docs