acceptable-dream-85180
08/11/2025, 2:18 PMtall-airline-16756
08/11/2025, 2:18 PMtall-airline-16756
08/11/2025, 2:19 PMagent.start(room)
without picking a specific participant. This way, the agent connects to the very first participant who joins.
• Then, use agent.generate_reply()
to have the agent chime in right after that participant connects.
2. Using Event Handling:
• Keep an ear out for the ParticipantConnected
event in the room.
• When a new participant joins, just call agent.generate_reply()
to get the agent talking.
For real-time models, generate_reply()
is usually the best way to go. If you want me to walk you through it or have any questions, just give me a shout!
Sources: agent.py | Agent speech and audio | LiveKit Docs