powerful-magician-63563
02/23/2026, 11:34 AMtall-airline-16756
02/23/2026, 11:34 AMtall-airline-16756
02/23/2026, 11:34 AMpowerful-magician-63563
02/23/2026, 11:35 AMtall-airline-16756
02/23/2026, 11:35 AMparticipant_kinds includes PARTICIPANT_KIND_AGENT so agents will detect and handle speech from other agents.
1. Implement the handoff in your agent logic
◦ In the LangGraph agent, implement a tool/function that triggers a handoff. When that tool is called, return/activate the OpenAI Realtime agent instance (or signal it to take over). The receiving agent should already be connected or be dispatched to join the room at that time.
1. Configure the OpenAI Realtime agent
◦ Use the Realtime model/session for the OpenAI agent (e.g., a MultimodalAgent or AgentSession configured with the Realtime model and desired voice). Ensure it can produce/consume audio in the room.
Why this approach works
• Running agents as separate deployments gives you isolated runtime and easier scaling, while joining the same LiveKit room provides low-latency audio exchange and natural handoffs.
• The PARTICIPANT_KIND_AGENT setting lets agents detect and process other agents’ audio so the handoff is audible and actionable.
If you want, I can help with next steps:
• Example code snippets for connecting an agent to a room (LangGraph and OpenAI Realtime).
• A sample tool implementation that triggers the handoff from LangGraph to OpenAI Realtime.
• Tips for handling audio overlap, detecting end-of-turn, or guaranteeing a clean handoff.
Which would you like next? If you want code, tell me which language/environment you’re using (Python, Node, etc.) and whether the OpenAI agent is already set up.
Sources: How to Enable Agent-to-Agent Speech Detection in LiveKit | How to Test Your Agent Using Another Agent | LiveKit | Tool definition and use | LiveKit Documentation | OpenAI and LiveKit partner to turn Advanced Voice into an API | OpenAI Realtime API plugin guide | LiveKit Documentationpowerful-magician-63563
02/23/2026, 11:40 AMtall-airline-16756
02/23/2026, 11:40 AMsession.shutdown() (or equivalent) when you want the agent to stop.
• Connection stability: network drops or participant disconnects will end or interrupt the session.
• Idle/timeout handling you implement: if you want automatic end-of-call behavior, implement idle timeouts (for example, end after a period of silence using a user_away_timeout or similar silence-detection logic).
Practical tips
• If you expect long conversations, ensure your agent code can gracefully handle reconnections and state restoration after transient network issues.
• Use silence detection or activity checks to free resources when a session is truly idle.
• Make the shutdown path explicit in your agent logic so you can close resources cleanly when the agent is no longer needed.
If you want, I can:
• Share example code for cleanly shutting down an OpenAI Realtime agent session.
• Show a simple silence-detection pattern to auto-end idle sessions.
• Discuss reconnection approaches for long-running agents.
Which of those would be most helpful?
Sources: Azure AI Services and LiveKit | LiveKit Documentation | How to detect and handle silence during calls | LiveKit | Deploy and scale agents on LiveKit Cloud