When my AI agent joins a room, it only talks to th...
# ask-ai
f
When my AI agent joins a room, it only talks to the first participant, and seems to not be able to hear any of the others. Is this a setting somewhere I can change so everyone can talk to the agent?
t
Thanks for reaching out, Khoi. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! It looks like your AI agent is set up to chat only with certain participant types, which is why it’s only talking to the first participant. No worries though—you can easily tweak the
participant_kinds
setting in
RoomInputOptions
to have it interact with everyone in the room. Here’s a quick way to update that configuration:
Copy code
from livekit.agents import RoomInputOptions

await session.start(
    agent=MyAgent(),
    room=ctx.room,
    room_input_options=RoomInputOptions(
        participant_kinds=[
            rtc.ParticipantKind.PARTICIPANT_KIND_STANDARD,
            rtc.ParticipantKind.PARTICIPANT_KIND_SIP,
            rtc.ParticipantKind.PARTICIPANT_KIND_AGENT,  # Enable interaction with other agents
        ]
    ),
)
With this setup, your agent will listen to audio and text from all kinds of participants—not just the first one or standard users. Also, if you have multiple people speaking, you might want to try using a
MultiSpeakerAdapter
with your STT provider. It helps to keep track of who’s talking and makes the interaction smoother. If you hit any snags or want to chat more about this, just let me know—I’m here to help! Sources: How to set a fixed participant for agent audio processing | How to test your agent using another agent | livekit-agents/livekit/agents/voice/room_io/room_io.py