Overview
LiveKit Agents provides a realtime framework for voice, video, and physical AI agents. Through our open source integration you can seamlessly add a LemonSlice avatar to real-time voice AI systems.Quick Start
This section includes a basic usage example and some reference material. For links to more detailed documentation, see Additional resources.Prerequisites
-
LemonSlice agent information
Either a base image URL or a LemonSlice Agent ID.
- Agent base image — a publicly accessible image URL of your avatar, focused on the face. The image should be 368 × 560 pixels. LemonSlice will automatically center-crop your image to the target aspect ratio if the dimensions do not match the expected values.
- LemonSlice Agent ID Note: LiveKit LLM/TTS settings will supersede selected voices and personalities configured for the LemonSlice agent.
-
LiveKit Agents Python App
- Your own existing application, or
- Follow the LiveKit VoiceAI quickstart to create one.
Integration Guide
1
Install the plugin
- Within your LiveKit Agents app, install the plugin from PyPi:
2
Authenticate
- Create a LemonSlice API key
- In your LiveKit Agents app, set
LEMONSLICE_API_KEYin your .env file
3
Add AvatarSession to AgentSession
In your LiveKit Agents app, create a Parameters for
lemonslice.AvatarSession alongside your AgentSession:lemonslice.AvatarSession. Either agent_image_url or agent_id is required.| Parameter | Description |
|---|---|
agent_image_url | A URL to an agent image to use. |
agent_id | The ID of the LemonSlice agent. |
agent_prompt | (Optional) A high-level system prompt that subtly influences the avatar’s movements, expressions, and emotional demeanor. This prompt is best used to suggest general affect or demeanor (for example, “feel excited” or “look sad”) rather than precise or deterministic actions. |
idle_timeout | (Optional) Idle timeout in seconds. Defaults to 60. If a negative number is provided, the session will have no idle timeout. |
4
Preview
Preview the avatar in the Agents Playground or a frontend starter app that you build.
