Skip to main content

Ultravox plugin guide

How to use the Ultravox Realtime model with LiveKit Agents.

Available inPython

Overview

The Ultravox Realtime API combines STT, LLM, and TTS into a single connection. Use LiveKit's Ultravox plugin with this plugin to create an agent quickly without needing to wire up multiple providers.

Installation

Install the Ultravox plugin:

uv add "livekit-agents[ultravox]"

Authentication

The Ultravox plugin requires an API key which can be accessed on the Ultravox console's Settings  page. Set ULTRAVOX_API_KEY as a variable in your .env file.

Usage

Use Ultravox in an AgentSession. For example, you can use it in the Voice AI quickstart.

from livekit.plugins import ultravox
session = AgentSession(
llm=ultravox.realtime.RealtimeModel(),
)

Logging

You can optionally enable debug logs (disabled by default):

LK_ULTRAVOX_DEBUG=true uv run src/agent.py dev

Parameters

This section describes some of the available parameters. For a complete reference of all available parameters, see the plugin reference.

voice
Required
strDefault: Mark

Ultravox voice to use from the available voices .

time_exceeded_messagestr

Message to play when max duration is reached.

Additional resources

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