LiveKit Agent
Integrate a Tavus Replica into LiveKit as the conversational video avatar.
We recommend using Tavus’s Full Pipeline in its entirety for the lowest latency and most optimized multimodal experience. Integrations like LiveKit Agent or Pipecat only provide rendering, while our Full Pipeline includes perception, turn-taking, and rendering for complete conversational intelligence. The Livekit integration also does not support interactions (“app messages”) like echo messages.
Tavus enables AI developers to create realistic video avatars powered by state-of-the-art speech synthesis, perception, and rendering pipelines. Through its integration with the LiveKit Agents application, you can seamlessly add conversational avatars to real-time voice AI systems.
Prerequisites
Make sure you have the following before starting:
-
Tavus
replica_id
- You can use Tavus’s stock Replicas or your own custom replica.
- LiveKit Voice Assistant Python App
- Your own existing application.
- Or follow LiveKit quickstart to create one.
Integration Guide
Step 1: Setup and Authentication
- Install the plugin from PyPI:
- Set
TAVUS_API_KEY
in your.env
file.
Step 2: Configure Replica and Persona
- Create a persona with LiveKit support using the Tavus API:
- Replace
<api_key>
with your actual Tavus API key. - Set
pipeline_mode
toecho
. - Set
transport_type
tolivekit
.
- Save your the
persona_id
. - Choose a replica from the Stock Library or browse available options on the Tavus Platform.
We recommend using Phoenix-3 PRO Replicas, which are optimized for low-latency, real-time applications.
Step 3: Add AvatarSession to AgentSession
In your LiveKit Python app, create a tavus.AvatarSession
alongside your AgentSession
:
Parameter | Description |
---|---|
replica_id (string) | ID of the Tavus replica to render and speak through |
persona_id (string) | ID of the persona with the correct pipeline and transport configuration |
avatar_participant_name (string, optional) | Display name for the avatar participant in the room. Defaults to Tavus-avatar-agent |
Try out the integration using this sample app.