Pipecat
Integrate a Tavus Replica into your Pipecat application as a participant or a video feed for the bot.
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.
Tavus offers integration with Pipecat, an open-source framework for building multimodal conversational agents by Daily. You can integrate Tavus into your Pipecat application in two ways:
- Additional Tavus Participant (
TavusTransport
)- The Tavus agent joins as a third participant alongside the Pipecat bot and human user. It receives audio from the Pipecat pipeline’s TTS layer and renders synchronized video and audio.
- Video Layer for Pipecat Bot (
TavusVideoService
)- Only the Pipecat bot is present in the room.
TavusVideoService
acts as a pipeline layer, sending TTS audio to Tavus in the background. Tavus returns video and audio streams for the bot to display. No additional participant is added.
- Only the Pipecat bot is present in the room.
Prerequisites
Before integrating Tavus with Pipecat, ensure you have the following:
- Tavus API Key
-
Tavus
replica_id
- You can use one of Tavus’s stock replicas or your own custom replica.
-
Pipecat Python Application
- Either your own existing application, or use Pipecat’s examples:
TavusTransport
TavusTransport
connects your Pipecat app to a Tavus conversation, allowing the bot to join the same virtual room as the Tavus avatar and participants. To get started, you can follow the following steps or learn more from this sample code.
Integration Guide for TavusTransport
Step 1: Setup and Authentication
- Install the Tavus plugin for Pipecat.
- In the
.env
file of your pipecat application (at/path/to/pipecat/.env
) add:
Replace <api_key>
and <your_replica_id>
with your actual Tavus API key and Replica ID you want to use.
Step 2: Create the Tavus transport layer
Create an instance of TavusTransport
by providing your bot name, Tavus API key, Replica ID, session, and additional parameters.
See Pipecat API Reference for the configuration details.
Step 3: Insert the Tavus transport layer into the pipeline
Add the Tavus transport layer to your processing pipeline.
Step 4: Run the program
- Run the following command to execute the program:
- Use the Tavus Daily URL provided in the console to interact with the agent.
TavusVideoService
You can use TavusVideoService
to enable real-time AI-driven video interactions in your Pipecat app. To get started, you can follow the following steps or refer from this sample code.
Integration Guide for TavusVideoService
Step 1: Setup and Authentication
- Install the Tavus plugin for Pipecat.
- In the
.env
file of your pipecat application (at/path/to/pipecat/.env
) add:
Replace <api_key>
and <your_replica_id>
with your actual Tavus API key and Replica ID you want to use.
Step 2: Create the Tavus Video Service
Create an instance of TavusVideoService
by providing your Tavus API key and Tavus Replica ID.
See Pipecat Tavus Service for the configuration details.
Insert the Tavus Video Service into the timeline
Insert the TavusVideoService
into the pipeline by adding the tavus
service after the TTS processor in the pipeline.
Step 4: Run the program
- Run the following command to execute the program:
- Use the localhost URL provided in the console to interact with the agent.