little-king-41579
01/02/2026, 6:17 PMtall-airline-16756
01/02/2026, 6:17 PMtall-airline-16756
01/02/2026, 6:17 PMagents list using RoomAgentDispatch. Example:
token.room_config = RoomConfiguration(
max_participants=10,
agents=[
RoomAgentDispatch(agent_name="agent-one"),
RoomAgentDispatch(agent_name="agent-two"),
]
)
1. Or dispatch each agent programmatically to the same room
◦ Call the server SDK’s dispatch/create API for agent-one with the target room name, then call it again for agent-two with the same room name.
1. Ensure agents can hear each other (optional)
◦ If you want agents to process each other’s audio, start the session with RoomInputOptions that includes PARTICIPANT_KIND_AGENT so agent audio is included for VAD/STT:
await session.start(
agent=agent,
room=room_name,
room_input_options=RoomInputOptions(
participant_kinds=[rtc.ParticipantKind.PARTICIPANT_KIND_AGENT]
)
)
1. Run each agent as its own worker (or one worker handling multiple agents)
◦ Each agent should have a unique agent_name and a running worker so LiveKit can dispatch them to the room.
If you’d like, tell me:
• which SDK/language you’re using (Python, Kotlin, JS), and
• whether you want agents to hear/process each other’s audio,
and I’ll give a concrete code example for your environment.
Sources: LiveKit Docs | server-sdk-kotlin | livekit/livekit_composite | DeepWiki | Outbound Calling Script | LiveKit docs | How to test your agent using another agent | How to Enable Agent-to-Agent Speech Detection in LiveKitlittle-king-41579
01/02/2026, 6:19 PMtall-airline-16756
01/02/2026, 6:19 PMlittle-king-41579
01/02/2026, 6:21 PMtall-airline-16756
01/02/2026, 6:22 PMfrom livekit_server_sdk import AccessToken, RoomConfiguration, RoomAgentDispatch
token = AccessToken(api_key, api_secret)
token.room_config = RoomConfiguration(
max_participants=10,
agents=[
RoomAgentDispatch(agent_name="agent_one"),
RoomAgentDispatch(agent_name="agent_two"),
],
)
room_token = token.to_jwt()
# Use room_token to create/join the room on the server side
2) Start each agent worker with its own STT/VAD config
• Each agent process/worker sets its own RoomInputOptions (or equivalent) so STT and VAD differ per agent.
• Ensure participant_kinds includes PARTICIPANT_KIND_AGENT so agents receive each other’s audio.
Example agent startup (pseudo-Python; adapt to your agent runtime API):
from livekit_agents import AgentSession, RoomInputOptions, rtc
agent_name = "agent_one" # change for agent_two
stt_config = {"provider":"sttA", "model":"modelA"} # per-agent STT
vad_config = {"threshold":0.5, "mode":"aggressive"} # per-agent VAD
session = AgentSession(
agent_name=agent_name,
room=room_name,
stt=stt_config,
vad=vad_config,
)
session.start(
room_input_options=RoomInputOptions(
participant_kinds=[rtc.ParticipantKind.PARTICIPANT_KIND_AGENT]
)
)
Run a second worker/process with agent_name="agent_two" and different `stt_config`/`vad_config`.
3) Listener (SIP or web participant) with optional mic
• For a listen-only web participant: join the room without publishing audio.
• For a web participant with optional mic: allow publish of microphone tracks based on user choice.
• For SIP: create a SIP participant or SIP gateway join; configure RTP direction to receive only (or send/receive if mic allowed).
Web (browser) listener example behavior:
• If listen-only: do not call publishTrack for mic.
• If mic enabled: capture mic and publish the audio track.
SIP example (high-level):
• Create SIP participant via API (or SIP gateway) into the same room.
• To be listen-only: configure the SIP endpoint to receive audio only.
• To allow mic: enable send audio from SIP side.
4) Important details and checks
• Agents must run as separate workers (or processes) with distinct `agent_name`s so each can have its own config.
• Use participant_kinds=[PARTICIPANT_KIND_AGENT] so agent audio is included for agent-side STT/VAD.
• Ensure your STT/VAD integration hooks receive per-agent audio streams and apply the correct config in each worker.
If you want, I can now:
• Provide a complete runnable Python example for the agent worker (choose which agent SDK/library you’re using), or
• Show the exact browser/SIP join code for the listener (WebRTC or SIP gateway) depending on which you’ll use.
Which would you like next: full agent worker code (pick agent SDK) or listener join code (web or SIP)?