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

# Agora

> Integrate a Tavus Face into Agora's Conversational AI Engine.

> [!TIP]
>
> We recommend using Tavus’s Full Pipeline in its entirety for the lowest latency and most optimized multimodal experience. Third party integrations only provide rendering, while our Full Pipeline includes perception, turn-taking, and rendering for complete conversational intelligence.

**Agora** runs your conversational stack (ASR, LLM, TTS, and the RTC channel) through its [Conversational AI Engine](https://docs.agora.io/en/conversational-ai/overview/product-overview). **Tavus** supplies the **face's** synchronized video and audio through Agora's `Tavus` avatar vendor (the `generic` avatar vendor in the REST API), joining the RTC channel alongside your agent.

For Agora's side of the setup, see Agora's official [Tavus avatar documentation](https://docs.agora.io/en/ai/models/avatar/tavus).

## Prerequisites

Before integrating Tavus with Agora, ensure you have the following:

* [**Tavus API Key**](https://maker.tavus.io/dev/api-keys)

* [**Tavus `face_id`**](https://maker.tavus.io/dev/faces) (or a `pal_id`)
  * `avatar_id` accepts either a `face_id` or a `pal_id` — pass whichever one identifies the face/PAL you want Agora to render.
  * You can use one of [Tavus's stock faces](https://maker.tavus.io/dev/faces) or your own custom face.
  * We recommend using **Phoenix-4.5 [Pro faces](https://docs.tavus.io/sections/faces/stock-faces#pro)**, which are optimized for low-latency, real-time applications.

* **An Agora Conversational AI Agent**
  * An Agora project with the Conversational AI Engine enabled, and an agent already configured with your ASR, LLM, and TTS vendors.
  * Follow Agora's [Conversational AI Engine quickstart](https://docs.agora.io/en/ai/get-started/quickstart) if you don't have one yet.

## Integration Guide

Every SDK and the REST API take the same parameters. The SDKs use camelCase names in TypeScript and PascalCase field names in Go.

| Parameter | Required | Description |
| - | - | - |
| `api_key` / `apiKey` | Yes | Your Tavus API key |
| `api_base_url` / `apiBaseUrl` | Yes | The Tavus endpoint for Agora. Set it to `https://tavusapi.com/v2/conversations/agora` |
| `avatar_id` / `avatarId` | Yes | Your Tavus `face_id` or `pal_id` |
| `agora_uid` / `agoraUid` | Yes | The RTC user ID the Tavus avatar joins the channel as. It must be different from every other participant in the channel, including your agent |
| `agora_token` / `agoraToken` | No | The RTC token that authorizes the avatar to join the video channel. Generate this token using your Agora project credentials. Pass it when your Agora project requires token authentication |

**1. Step 1: Setup and Authentication**

Generate a Tavus API key from the [PAL Maker](https://maker.tavus.io/dev/api-keys). See [Authentication](https://docs.tavus.io/api-reference/authentication.md) for how Tavus APIs use `x-api-key`.

**2. Step 2: Configure the Tavus avatar**

> [tab] Python SDK
>
> ```py {10-14} theme={null}
> from agora_agent import Agent
> from agora_agent.agentkit.vendors import Tavus
>
> # client is your configured Agora client
> agent = (
>     Agent(client)
>     .with_stt(...)  # configure your STT vendor
>     .with_llm(...)  # configure your LLM vendor
>     .with_tts(...)  # configure your TTS vendor
>     .with_avatar(Tavus(
>         api_key="<TAVUS_API_KEY>",
>         api_base_url="https://tavusapi.com/v2/conversations/agora",
>         avatar_id="<TAVUS_FACE_ID_OR_PAL_ID>",
>         agora_uid="<AGORA_UID>",
>     ))
> )
> ```

> [tab] TypeScript
>
> ```typescript {8-12} theme={null}
> import { Agent, Tavus } from 'agora-agents';
>
> // client is your configured Agora client
> const agent = new Agent({ client })
>   .withStt(/* configure your STT vendor */)
>   .withLlm(/* configure your LLM vendor */)
>   .withTts(/* configure your TTS vendor */)
>   .withAvatar(new Tavus({
>     apiKey: '<TAVUS_API_KEY>',
>     apiBaseUrl: 'https://tavusapi.com/v2/conversations/agora',
>     avatarId: '<TAVUS_FACE_ID_OR_PAL_ID>',
>     agoraUid: '<AGORA_UID>',
>   }));
> ```

> [tab] Go
>
> ```golang {10-15} theme={null}
> import (
>     "github.com/AgoraIO/agora-agents-go/v2/agentkit"
>     "github.com/AgoraIO/agora-agents-go/v2/agentkit/vendors"
> )
>
> // client is your configured Agora client
> agent := agentkit.NewAgent(client).WithStt(/* configure your STT vendor */).
>     WithLlm(/* configure your LLM vendor */).
>     WithTts(/* configure your TTS vendor */).
>     WithAvatar(
>         vendors.NewTavus(vendors.TavusOptions{
>             APIKey:     "<TAVUS_API_KEY>",
>             APIBaseURL: "https://tavusapi.com/v2/conversations/agora",
>             AvatarID:   "<TAVUS_FACE_ID_OR_PAL_ID>",
>             AgoraUID:   "<AGORA_UID>",
>         }),
>     )
> ```

> [tab] REST API
>
> ```json {2-10} theme={null}
> {
>   "avatar": {
>     "vendor": "generic",
>     "enable": true,
>     "params": {
>       "api_key": "<TAVUS_API_KEY>",
>       "api_base_url": "https://tavusapi.com/v2/conversations/agora",
>       "avatar_id": "<TAVUS_FACE_ID_OR_PAL_ID>",
>       "agora_token": "<AGORA_TOKEN>",
>       "agora_uid": "<AGORA_UID>"
>     }
>   }
> }
> ```

**3. Step 3: Start the agent**

Start (or join) your Agora Conversational AI agent as usual. The Tavus face joins the RTC channel as `agora_uid` and renders synchronized video and audio driven by your agent's TTS output.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.