The unintended agent appearing in your LiveKit room could be due to automatic agent dispatch or timing issues during room creation and participant joining. Here are some steps to address this:
•
Disable Automatic Dispatch: Ensure that agents are not automatically dispatched when a room is created. Use explicit dispatch instead to control when agents join.
•
Optimize Agent Initialization: Adjust the initialization process of the Tavus avatar agent to minimize visible load times and ensure it joins only after a real participant is present.
•
Synchronize Room Creation and Participant Joining: Ensure that the room is created and tokens are generated only when a real participant is ready to join, preventing premature agent connections.
Let me know if you need detailed guidance on implementing any of these solutions.
Sources:
Dispatching agents | LiveKit Docs |
Handling RAG Delays in Voice Agents | LiveKit Docs |
Egress & Media Processing | livekit/livekit_composite | DeepWiki |
Dispatching agents | LiveKit Docs