Anam Avatar Plugin for Vision Agents
Add real-time interactive avatar video to your AI agents using Anam's avatar API.
Features
- Real-time avatar video and audio synchronized with TTS output
- Audio passthrough mode for high-quality voice reproduction
- Automatic interruption when the user starts speaking
- Works with any TTS provider (ElevenLabs, Cartesia, etc.) or Realtime LLMs
- Configurable video resolution (default 1920x1080)
Installation
uv add "vision-agents[anam]"
# or directly
uv add vision-agents-plugins-anam
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 anam, deepgram, elevenlabs, getstream, gemini
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=elevenlabs.TTS(),
stt=deepgram.STT(),
avatar=anam.Avatar(),
)
call = await agent.create_call("default", str(uuid4()))
async with agent.join(call):
await agent.simple_response("Say hello.")
await agent.finish()
if __name__ == "__main__":
asyncio.run(start_avatar_agent())
Configuration
Environment Variables
ANAM_API_KEY=your_anam_api_key
ANAM_AVATAR_ID=your_anam_avatar_id
Avatar Options
anam.Avatar(
avatar_id=None, # Anam avatar ID (or set ANAM_AVATAR_ID env var)
api_key=None, # Anam API key (or set ANAM_API_KEY env var)
client_options=None, # Optional Anam ClientOptions for advanced configuration
connect_timeout=None, # Seconds to wait for connection (None = wait indefinitely)
session_ready_timeout=None, # Seconds to wait for session ready (None = wait indefinitely)
width=1920, # Output video width in pixels
height=1080, # Output video height in pixels
)
How It Works
- Anam Connection: Connects to Anam's avatar service and waits for the session to become ready
- Audio Forwarding: TTS audio from the agent is resampled to 24kHz mono and streamed to Anam
- Avatar Generation: Anam generates synchronized avatar video and lip-synced audio from the input
- Video Streaming: Avatar video and audio frames are streamed back to call participants via GetStream Edge
Requirements
- Python 3.10+
- Anam API key and avatar ID (get them at anam.ai)
- GetStream account for video calls
- TTS provider (ElevenLabs, Cartesia, etc.) or Realtime LLM
License
MIT
Links
Release files for vision-agents-plugins-anam 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 | |
|---|---|---|---|
| vision_agents_plugins_anam-0.6.9.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vision_agents_plugins_anam-0.6.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / vision_agents_plugins_anam-0.6.9.tar.gz
| Download URL | vision_agents_plugins_anam-0.6.9.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cf018998b45149173cb578aed273af97bc2bc468639c270cb51748c0b581595
|
|
BLAKE2b-256 checksum How to use checksums |
8da3ec124b292418c0b8fcc9ffb337dc2b41e040348a3ffba4a6ce89c4a553b2
|
| 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_anam-0.6.9-py3-none-any.whl
| Download URL | vision_agents_plugins_anam-0.6.9-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
227360abcb50dacfb272083c8b31795493bbf072cd02c3bbc993fc0a53efc0b9
|
|
BLAKE2b-256 checksum How to use checksums |
b2bd4cbcbd653d7e9704322ef2fc4103c1aaa05153359cc5b44bfd4f60f1ed0e
|
| 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}
|