Skip to main content

Simli virtual avatar integration guide

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

Available in
Python

Overview

Simli provides realtime low-latency video avatars. You can use the open source Simli 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:

pip install "livekit-agents[simli]~=1.2"

Authentication

The Simli plugin requires a Simli API key.

Set SIMLI_API_KEY in your .env file.

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 AgentSession, RoomOutputOptions
from livekit.plugins import simli
async def entrypoint(ctx: agents.JobContext):
session = AgentSession(
# ... stt, llm, tts, etc.
)
avatar = simli.AvatarSession(
simli_config=simli.SimliConfig(
api_key=os.getenv("SIMLI_API_KEY"),
face_id="...", # ID of the Simli face to use for your avatar. See "Face setup" for details.
),
)
# 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.

Face setup

The Simli plugin requires a face from which to generate the avatar. You can choose a face from the default library or upload your own.

Include the face ID in the SimliConfig when you create the AvatarSession.

Emotions

Simli supports configurable emotions. Pass an emotion_id to the SimliConfig when you create the AvatarSession.

Parameters

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

simli_configsimli.SimliConfigOptional

Configuration for the Simli face to use.

  • face_idstringRequired
    ID of the Simli face to use. See Face setup for details.
  • emotion_idstringRequired
    ID of the Simli emotion to use. See Emotions for details.
avatar_participant_namestringOptionalDefault: simli-avatar-agent

The name of the participant to use for the avatar.

Additional resources

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