Skip to main content

Phonic plugin guide

How to use the Phonic Realtime model with LiveKit Agents.

Available in
Python
|
Node.js

Overview

The Phonic Live Conversation API is built for the voice agent experience. Use LiveKit's Phonic plugin to build a reliable speech-to-speech voice agent with intelligent tool calling.

Installation

Install the Phonic plugin:

uv add "livekit-agents[phonic]~=1.4"
pnpm add "@livekit/agents-plugin-phonic@1.x"

Authentication

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

Usage

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

from livekit.plugins import phonic
session = AgentSession(
llm=phonic.realtime.RealtimeModel(voice="sabrina"),
)
import * as phonic from '@livekit/agents-plugin-phonic';
const session = new voice.AgentSession({
llm: new phonic.realtime.RealtimeModel({ voice: "sabrina" }),
});

Parameters

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

phonic_agentstrOptional

Phonic agent name.

voicestrOptional

Phonic voice to use from the available voices.

welcome_messagestrOptional

The message the agent says when the session starts. Ignored when generate_welcome_message is True.

generate_welcome_messageboolOptional

Whether to auto-generate the welcome message (ignores welcome_message).

Additional resources

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