> ## Documentation Index
> Fetch the complete documentation index at: https://visionagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Anam Avatars

[Anam](https://anam.ai/) provides real-time interactive avatar video with automatic lip-sync. Add a video avatar to your agent that speaks with natural movements synchronized to your agent's voice output.

<Info>
  Vision Agents requires a [Stream](https://getstream.io/try-for-free/) account for real-time transport. [Anam](https://www.anam.ai/) provides API keys and avatar IDs through their dashboard.
</Info>

## Installation

```sh theme={null}
uv add "vision-agents[anam]"
```

## Quick Start

```python theme={null}
from vision_agents.core import Agent, User
from vision_agents.plugins import gemini, deepgram, getstream
from vision_agents.plugins.anam import AnamAvatarPublisher

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Assistant", id="agent"),
    instructions="You're a friendly AI assistant.",
    llm=gemini.LLM("gemini-3-flash-preview"),
    tts=deepgram.TTS(),
    stt=deepgram.STT(),
    processors=[AnamAvatarPublisher()],
)
```

<Warning>
  Set `ANAM_API_KEY` and `ANAM_AVATAR_ID` in your environment, or pass them directly to `AnamAvatarPublisher`.
</Warning>

## Parameters

| Name                    | Type            | Default | Description                                                    |
| ----------------------- | --------------- | ------- | -------------------------------------------------------------- |
| `avatar_id`             | `str`           | `None`  | Anam avatar ID (defaults to `ANAM_AVATAR_ID` env var)          |
| `api_key`               | `str`           | `None`  | API key (defaults to `ANAM_API_KEY` env var)                   |
| `client_options`        | `ClientOptions` | `None`  | Advanced Anam client configuration                             |
| `connect_timeout`       | `float`         | `None`  | Seconds to wait for connection (`None` = wait indefinitely)    |
| `session_ready_timeout` | `float`         | `None`  | Seconds to wait for session ready (`None` = wait indefinitely) |
| `width`                 | `int`           | `1920`  | Output video width in pixels                                   |
| `height`                | `int`           | `1080`  | Output video height in pixels                                  |

## How It Works

1. Agent TTS audio is resampled to 24 kHz mono and streamed to Anam
2. Anam generates lip-synced avatar video and audio from the input
3. Avatar video and audio frames are streamed back to call participants via Stream Edge
4. When a user starts speaking, the avatar is automatically interrupted

**With Realtime LLMs**

Anam also works with realtime speech-to-speech models. It subscribes to both TTS audio events and realtime audio output, so you can swap in a realtime LLM without any changes to the avatar setup.

```python theme={null}
from vision_agents.plugins import gemini
from vision_agents.plugins.anam import AnamAvatarPublisher

agent = Agent(
    llm=gemini.Realtime(),
    processors=[AnamAvatarPublisher()],
    ...
)
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Build a Voice Agent" icon="microphone" href="/introduction/voice-agents">
    Get started with voice
  </Card>

  <Card title="Build a Video Agent" icon="video" href="/introduction/video-agents">
    Add video processing
  </Card>
</CardGroup>
