square-activity-46232
03/17/2026, 9:42 PMtall-airline-16756
03/17/2026, 9:42 PMtall-airline-16756
03/17/2026, 9:43 PMRoomInputOptions so agents detect and respond to each other’s speech by setting participant_kinds = [rtc.ParticipantKind.PARTICIPANT_KIND_AGENT]. Both agents must be connected to the same room and have TTS configured for two-way conversation.
• Agents can be used together for multi-agent workflows: examples include using an evaluation agent to simulate users and test another agent, and agents can share context during handoffs. State can be stored in UserData so agents remain stateless and scale more easily.
What LiveKit does not provide
• LiveKit does not provide a built‑in protocol where one agent can directly call another agent deployed elsewhere as if it were an in-process function/tool.
Recommended alternatives
• Use function_tool to invoke another agent’s capability or pass structured data between agents. This is the recommended pattern for chaining responsibilities (for example: intake → billing specialist) without trying to treat a remote agent like a local function.
• If you need real‑time, audio-level agent interactions, put both agents in the same LiveKit room and let them communicate over audio/text with the room configured for agent participants and TTS. For tool-like, structured calls, use function_tool or a messaging/HTTP-based orchestrator to route requests between agents.
If you’d like, I can:
• Walk you through configuring RoomInputOptions and TTS for agent-to-agent speech detection.
• Show an example pattern using function_tool to pass structured data between agents.
• Help design a hybrid approach (same-room audio for conversational handoffs + function_tool for structured capability calls).
Which of those would you like to try first?
Sources: How to Enable Agent-to-Agent Speech Detection in LiveKit | examples/drive-thru | livekit/livekit_composite | DeepWiki | Building Multi-Agent Architectures with LiveKit Agents | Agent session | LiveKit Documentation | Examples | livekit/livekit_composite | DeepWiki, with interactive elementssquare-activity-46232
03/17/2026, 9:52 PMtall-airline-16756
03/17/2026, 9:52 PMfunction_tool chaining instead of baking remote MCPs into the toolset
◦ Model MCP actions as function calls the agent can make via a single, stable function_tool that delegates to specific MCPs based on arguments. This keeps the agent’s visible toolset small and stable while giving it the ability to route to many MCPs at runtime.
• Stateless agent + shared UserData for state transfer
◦ Keep the agent stateless and store connection state / session references in UserData or in the orchestrator service. That avoids re-sending large state every loop and helps scale horizontally.
Tradeoffs to consider
• Lazy handshake: reduces upfront tokens but introduces latency on first call to an MCP.
• Orchestrator/proxy: adds an extra hop and operational component but centralizes complexity and significantly reduces token usage for the agent.
• Full decentralization (each agent handles their own handshakes): simpler architecture, but high token cost and scaling issues you’re already experiencing.
If outsourcing to other agents
• Outsourcing can work well if you combine it with a lightweight discovery/orchestrator pattern. Instead of each agent performing heavy handshakes, have a stable interface (or tool) that represents the remote agent’s capabilities; the real handshake/connection can be performed by the remote agent or an orchestrator when invoked.
• Keep tool descriptions minimal and use function_tool for structured calls between agents.
Next steps I can help with
• Draft a specific architecture: orchestrator + main agent + lazy handshake flow.
• Give a compact example of a function_tool signature and the minimal metadata shape your agent should see so updates are cheap.
• Show how to implement a “refresh_tools” tool that returns new capabilities without heavy tokens.
Which of those would help most right now — a concrete orchestrator pattern, a function_tool example, or a sample metadata schema and refresh flow?
, with interactive elements