LemonSlice Avatar Plugin for Vision Agents
Add real-time interactive avatar video to your AI agents using LemonSlice's self-managed API.
Features
- Real-time avatar video synchronized with TTS audio
- Works with any TTS provider (Cartesia, ElevenLabs, etc.)
- Supports both standard and Realtime LLMs
- Customizable avatar expressions via agent prompts
Installation
uv add "vision-agents[lemonslice]"
# or directly
uv add vision-agents-plugins-lemonslice
Quick Start
import asyncio
from uuid import uuid4
from dotenv import load_dotenv
from vision_agents.core import User, Agent
from vision_agents.plugins import cartesia, deepgram, getstream, gemini, lemonslice
load_dotenv()
async def start_avatar_agent():
agent = Agent(
edge=getstream.Edge(),
agent_user=User(name="AI Assistant with Avatar", id="agent"),
instructions="You're a friendly AI assistant.",
llm=gemini.LLM(),
tts=cartesia.TTS(),
stt=deepgram.STT(),
avatar=lemonslice.Avatar(agent_id="your-avatar-id"),
)
call = await agent.create_call("default", str(uuid4()))
async with agent.join(call):
await agent.simple_response("Hello! I'm your AI assistant with an avatar.")
await agent.finish()
if __name__ == "__main__":
asyncio.run(start_avatar_agent())
Configuration
Environment Variables
LEMONSLICE_API_KEY=your_lemonslice_api_key
LEMONSLICE_AGENT_ID=your_agent_id
# Or, instead of LEMONSLICE_AGENT_ID:
# LEMONSLICE_AGENT_IMAGE_URL=https://example.com/avatar.png
# LemonSlice uses LiveKit as a transport for audio and video
LIVEKIT_URL=wss://your-livekit-server.com
LIVEKIT_API_KEY=your_livekit_api_key
LIVEKIT_API_SECRET=your_livekit_api_secret
Avatar Options
lemonslice.Avatar(
agent_id="your-avatar-id", # LemonSlice agent ID (or set LEMONSLICE_AGENT_ID env var)
agent_image_url=None, # Custom image URL, 368x560px (or set LEMONSLICE_AGENT_IMAGE_URL env var)
agent_prompt=None, # Prompt to influence avatar expressions/movements
api_key=None, # Optional: override LEMONSLICE_API_KEY env var
idle_timeout=None, # Session timeout in seconds
livekit_url=None, # Optional: override LIVEKIT_URL env var
livekit_api_key=None, # Optional: override LIVEKIT_API_KEY env var
livekit_api_secret=None, # Optional: override LIVEKIT_API_SECRET env var
width=1920, # Output video width in pixels
height=1080, # Output video height in pixels
)
How It Works
- LemonSlice Session: Creates a session via LemonSlice API, and joins the LiveKit room as a participant
- Audio Forwarding: TTS audio is captured and sent to LemonSlice via the room
- Avatar Generation: LemonSlice generates synchronized avatar video and audio
- Video Streaming: Avatar video is streamed to call participants via GetStream Edge
Requirements
- Python 3.10+
- LemonSlice API key (get one at lemonslice.com)
- LiveKit server (cloud or self-hosted)
- GetStream account for video calls
- TTS provider (Cartesia, ElevenLabs, etc.) or Realtime LLM
License
MIT
Links
Metadata
Release files for vision-agents-plugins-lemonslice 0.6.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vision_agents_plugins_lemonslice-0.6.9.tar.gz | 8.2 kB | Without provenance | Details for vision_agents_plugins_lemonslice-0.6.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vision_agents_plugins_lemonslice-0.6.9-py3-none-any.whl | Python 3 | none | any | Details for vision_agents_plugins_lemonslice-0.6.9-py3-none-any.whl |
Total release size: 18.3 kB
Release files / vision_agents_plugins_lemonslice-0.6.9.tar.gz
| Download URL | vision_agents_plugins_lemonslice-0.6.9.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50d8dd69224024049b94a59fbe29552c3f2f202c7e74068cd9cf92c700a24856
|
|
BLAKE2b-256 checksum How to use checksums |
46a0c8d371eeed236dec2ae2d4dc82a9a7ebf2e18bc3f505b4022fb0668834fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vision_agents_plugins_lemonslice-0.6.9-py3-none-any.whl
| Download URL | vision_agents_plugins_lemonslice-0.6.9-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30e24f7a298a67863428dfe311e984cff66ae6173782252afc4bc5f98eb1e3ca
|
|
BLAKE2b-256 checksum How to use checksums |
6b000efb7e17958e0175d8bf3c6d514bfd0b8aee25f335134754700fd19f5bd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for vision-agents-plugins-lemonslice 0.6.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.