Skip to main content
The Avaluma LiveKit Agent is a Python worker built on the livekit-agents framework. It connects to a LiveKit room and drives an Avaluma avatar by routing audio through the AvatarSession API — the bridge between your voice pipeline and the avatar server that animates the .hvia file. Two ready-to-run agent patterns are included so you can start with the approach that best fits your architecture.

Agent Patterns

Conversational Agent

Full voice AI pipeline: STT → LLM → TTS → Avaluma Avatar. Powered by LiveKit Inference with AssemblyAI, OpenAI GPT-4.1-mini, and Cartesia Sonic-3.

External Audio

Stream raw PCM audio directly to the avatar via LiveKit DataStream, bypassing the AgentSession pipeline entirely — ideal for custom TTS or audio sources.

How the AvatarSession Works

Both agents rely on AvatarSession from the avaluma-livekit-plugin package. You instantiate it with your credentials, call avatar.start(), and it handles joining the room as a separate avatar participant and forwarding audio frames to the avatar server for rendering.

Choosing a Pattern

Dependencies

All dependencies are declared in pyproject.toml and managed by uv:
pyproject.toml

Prerequisites

Before running either agent, make sure you have the following:

Docker & Docker Compose

Both agents ship with a docker-compose.yaml for zero-config local startup.

LiveKit Account

A LiveKit Cloud project or self-hosted instance. You need the URL, API key, and API secret.

Avatar Server

A running avatar-server instance, or use the hosted endpoint at https://api.avaluma.ai.

Avaluma License Key

Your AVALUMA_LICENSE_KEY from the Avaluma dashboard — passed directly to AvatarSession.

Testing Your Agent

Once your agent and avatar server are running, connect using one of these clients:
In the LiveKit Agent Playground, set the Agent Name field to the AGENT_NAME environment variable you configured (e.g. agent-1). If the agent doesn’t respond after changing the name, reload the page and reconnect.