Skip to main content

LiveAvatar virtual avatar integration guide

How to use the LiveAvatar virtual avatar plugin for LiveKit Agents.

Available in
Python

Overview

LiveAvatar provides dynamic real-time avatars that naturally interact with users. You can use the open source LiveAvatar integration for LiveKit Agents to add virtual avatars to your voice AI app.

Quick reference

This section includes a basic usage example and some reference material. For links to more detailed documentation, see Additional resources.

Installation

Install the plugin from PyPI:

uv add "livekit-agents[liveavatar]~=1.3.6"

Authentication

The LiveAvatar plugin requires a LiveAvatar API key.

Set LIVEAVATAR_API_KEY in your .env file.

Avatar setup

The LiveAvatar plugin requires an avatar ID, which can either be set as the LIVEAVATAR_AVATAR_ID environment variable or passed in the avatar session. You can choose either a public avatar or create your own on the LiveAvatar dashboard.

Select an avatar ID for the following steps.

Usage

Use the plugin in an AgentSession. For example, you can use this avatar in the Voice AI quickstart.

from livekit import agents
from livekit.agents import AgentServer, AgentSession, RoomOutputOptions
from livekit.plugins import liveavatar
server = AgentServer()
@server.rtc_session()
async def my_agent(ctx: agents.JobContext):
session = AgentSession(
# ... stt, llm, tts, etc.
)
avatar = liveavatar.AvatarSession(
avatar_id="...", # ID of the LiveAvatar avatar to use
)
# Start the avatar and wait for it to join
await avatar.start(session, room=ctx.room)
# Start your agent session with the user
await session.start(
# ... room, agent, room_input_options, etc....
)

Preview the avatar in the Agents Playground or a frontend starter app that you build.

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

avatar_idstringRequired

ID of the LiveAvatar avatar to use. See Avatar setup for details.

Additional resources

The following resources provide more information about using LiveAvatar with LiveKit Agents.