Livekit Agent
Tavus offers integration with the Livekit Agents framework, an open-source framework for building conversational agents by Livekit. You can easily add Tavus Replicas to your Livekit agents and give them a video layer.
You can keep your Livekit workflow as-is and just create a new Tavus conversation with certain settings.
Step 1: Setup Tavus Replica
First, you need to find a Tavus replica to use with your Livekit Agent. This can be any replica that’s stock, or your own replica.
Step 2: Create a Tavus Persona
After finding a Tavus replica, you need to create a persona with certain settings. Specifically, you need to set the pipeline_mode
to echo
, and define a transport
layer under layers
, setting the transport_type
inside to livekit
.
Step 3: Initiate the Conversation
Once you got back a persona ID and have your replica ID ready, create a conversation. You need to add the following parameters to your conversation properties
:
Step 4: Begin the Conversation
After you POST a conversation with the above settings and the correct persona, the replica will join the Livekit room and begin listening to participants that are of kind rtc.ParticipantKind.PARTICIPANT_KIND_AGENT
to pipe the audio output received by them with the video layer attached and synced.