adamant-airport-69140
08/12/2025, 2:16 PMtall-airline-16756
08/12/2025, 2:16 PMtall-airline-16756
08/12/2025, 2:17 PMTAVUS_API_KEY
to your .env
file.
2. Next, install the plugin by running: pip install "livekit-agents[tavus]~=1.0"
3. Then, create and start an avatar session with this snippet: from livekit.plugins import tavus
avatar = tavus.AvatarSession(
replica_id="...", # ID of the Tavus replica to use
persona_id="..." # ID of the Tavus persona to use
)
await avatar.start(session, room=ctx.room)
4. Finally, start the agent session like this: await session.start(
agent=Agent(instructions="Talk to me!"),
room=ctx.room,
)
Just a heads-up—I couldn’t find specific info on how to disconnect the Tavus avatar. If you want, I’m here to help you figure that out or answer any other questions!
Sources: examples/avatar_agents/tavus/README.md | Tavus virtual avatar integration guide | LiveKit Docsadamant-airport-69140
08/12/2025, 2:19 PMtall-airline-16756
08/12/2025, 2:19 PM