what happens if we dispatch two instances of the s...
# ask-ai
b
what happens if we dispatch two instances of the same agent into the room, will they be able to subscribe to each others tracks. by agrnt name i mean agentName of worker options
t
Thanks for reaching out, Mohammed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking whether two dispatched agent instances with the same
agentName
can subscribe to each other's tracks. Short answer: not by default — but you can enable it. Details: •
agentName
is only used for dispatch/identification and does not by itself allow agent-to-agent subscriptions. • Agents have isolated media pipelines by default and will not subscribe to other agents' audio/video. • To allow agent A and agent B to detect and subscribe to each other's speech, configure the agent's
RoomInputOptions
to include agent participants:
Copy code
RoomInputOptions.participant_kinds = [rtc.ParticipantKind.PARTICIPANT_KIND_AGENT]
• Also ensure the agents have subscription permission (e.g.,
canSubscribe: true
in the grant) and publish their tracks normally. Once
PARTICIPANT_KIND_AGENT
is enabled and subscription permissions are present, they can subscribe to and process each other's published tracks (including STT). Would you like steps for where to set
RoomInputOptions
in your agent code or an example of the grant configuration? Sources: How to Enable Agent-to-Agent Speech Detection in LiveKit | Agent server options | LiveKit docs | Job lifecycle | LiveKit docs