polite-crowd-90932
02/25/2026, 7:17 AMtall-airline-16756
02/25/2026, 7:17 AMtall-airline-16756
02/25/2026, 7:17 AMPARTICIPANT_KIND_AGENT so agents receive audio from other agents.
3. Ensure each agent has STT, an LLM, and TTS configured so they can hear, process, and speak.
4. Start both agents so they join the same LiveKit room.
5. Have the Questioner start (explicit initial prompt or generate_reply); Responder will hear, process, and reply.
6. Join the room as a regular user (Web SDK, mobile, or other client) to listen to both agents’ audio tracks.
Minimal code outline (conceptual)
• Define Agent A (questioner) with instructions to start by asking a question.
• Define Agent B (responder) with instructions to listen and answer.
• Start each agent session with RoomOptions that include agents as allowed participant kinds.
Example for enabling agent-to-agent audio (conceptual snippet)
from livekit.agents import RoomOptions
from livekit import rtc
room_options = RoomOptions(
participant_kinds=[
rtc.ParticipantKind.PARTICIPANT_KIND_STANDARD, # user
rtc.ParticipantKind.PARTICIPANT_KIND_AGENT # other agents
]
)
# start sessions for each agent using the room_options above
Orchestration tips
• Let one agent explicitly generate the first prompt (so they don’t both start at once).
• Add a short delay or use simple turn-taking logic to avoid overlapping speech.
• Monitor agent audio activity and use VAD or session events to trigger replies only after speech ends.
How you (the user) listen
• Join the same LiveKit room as a standard participant (browser or mobile). The agents publish audio tracks to the room, so you’ll hear both bots as they speak.
When you might need to adjust
• If you want more natural turn-taking, add logic to detect when an agent has finished speaking before prompting the other.
• If you want multiple rounds, implement a simple conversation state so they don’t loop or talk over each other.
If you’d like, I can:
• Show a concrete code example for Agent A and Agent B (Python) with STT/LLM/TTS placeholders.
• Suggest a simple turn-taking pattern (example code) to prevent overlaps.
• Help you map this to the SDK you plan to use (Web / mobile / Python agent runtime).
Which would you prefer next — a full Python example with agent classes and session start code, or a short turn-taking snippet to prevent overlapping speech?
Sources: How to Test Your Agent Using Another Agent | LiveKit | Introduction | LiveKit Documentation | Agent speech and audio | LiveKit Documentation | Agents (Python) | livekit/livekit_composite | DeepWiki | livekit/livekit_composite | DeepWikipolite-crowd-90932
02/25/2026, 7:22 AMtall-airline-16756
02/25/2026, 7:23 AMpolite-crowd-90932
02/25/2026, 11:36 AM