straight-jelly-92105
11/04/2025, 6:43 AMtall-airline-16756
11/04/2025, 6:43 AMtall-airline-16756
11/04/2025, 6:44 AMroom_config.agents to auto-dispatch one or more agents on connect. 3) Clients use the token to join; agents start automatically. Docs: Authentication, Room config + agents
• Explicit dispatch endpoint (flexible, server-driven):
1) Start workers with agent_name for each agent. 2) Your server calls the Agent Dispatch API to dispatch specific agents to a room, passing job metadata (JSON string). 3) Agents read metadata via JobContext. Docs: Agent dispatch, Job lifecycle & metadata
For coordinating work across multiple agents, use:
• function_tool for agent-to-agent handoffs and chaining.
• Keep agents stateless; pass per-job context via metadata/UserData.
• Optionally preserve chat context between agents.
Docs: Multi-agent patterns, Workflows
Would you like a minimal example for the token endpoint or the explicit dispatch endpoint (Node.js or Python)?
Sources: Building Multi-Agent Architectures with LiveKit Agents | Python Agents Core Architecture | livekit/livekit_composite | DeepWiki | Node.js Agents Architecture | livekit/livekit_composite | DeepWiki | Server-Side SDKs & Authentication | livekit/livekit_composite | DeepWiki | SIP Integration & Telephony | livekit/livekit_composite | DeepWikistraight-jelly-92105
11/04/2025, 6:45 AMtall-airline-16756
11/04/2025, 6:45 AMroom_config.agents with multiple entries (each with agent_name and optional JSON metadata). 3) When the client connects with this token, all listed agents start.
• Explicit dispatch (flexible, server-driven)
1) Run each worker with a distinct agent_name. 2) Call the Agent Dispatch API for each agent you want in the room, passing JSON metadata as a string. 3) Each agent reads metadata from its JobContext on start.
For coordination between agents, use function_tool for handoffs and keep agents stateless, passing context via metadata/UserData.
Want a minimal example for either method (Node.js or Python)?straight-jelly-92105
11/04/2025, 6:46 AMtall-airline-16756
11/04/2025, 6:47 AMagent_name you want in the room, optionally passing JSON metadata. Reference: Agent dispatch.
Would you like a minimal example to spin up N worker processes and then dispatch them (Node.js or Python)?
Sources: Worker lifecycle | LiveKit Docs | Agent dispatch | LiveKit Docs | Node.js Agents Architecture | livekit/livekit_composite | DeepWiki | An open source stack for real-time multimodal AI | Deploying to custom environments | LiveKit Docsstraight-jelly-92105
11/04/2025, 6:49 AMtall-airline-16756
11/04/2025, 6:50 AM