> ## 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.
</Tip>

**Agora** runs your conversational stack (ASR, LLM, TTS, and the RTC channel) through its <a href="https://docs.agora.io/en/conversational-ai/overview/product-overview" target="_blank">Conversational AI Engine</a>. **Tavus** supplies the **face's** synchronized video and audio as the officially supported **TavusAvatar** vendor (`vendor: "tavus"`), joining the RTC channel alongside your agent.

For Agora's side of the setup, see Agora's official <a href="https://docs.agora.io/en/ai/models/avatar/tavus" target="_blank">Tavus avatar documentation</a>.

## Prerequisites

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

* <a href="https://maker.tavus.io/dev/api-keys" target="_blank">**Tavus API Key**</a>

* <a href="https://maker.tavus.io/dev/faces" target="_blank">**Tavus `face_id`**</a> (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 <a href="https://maker.tavus.io/dev/faces" target="_blank">Tavus's stock faces</a> or your own custom face.
  * We recommend using **Phoenix-4.5 [Pro faces](/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 <a href="https://docs.agora.io/en/ai/get-started/quickstart" target="_blank">Conversational AI Engine quickstart</a> if you don't have one yet.

## Integration Guide

Agora already knows Tavus's `api_base_url`, so it isn't a parameter here.

| TavusAvatar parameter | Required | Description |
| - | - | - |
| `api_key` / `apiKey` | Yes | Your Tavus API key |
| `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 |
| `agora_token` / `agoraToken` | No | The RTC token that authorizes the avatar to join the video channel. Generate this token using your Agora project credentials |

<Steps>
  <Step title="Step 1: Setup and Authentication">
    Generate a Tavus API key from the <a href="https://maker.tavus.io/dev/api-keys" target="_blank">PAL Maker</a>. See [Authentication](/api-reference/authentication) for how Tavus APIs use `x-api-key`.
  </Step>

  <Step title="Step 2: Configure Tavus Avatar">
    <Tabs>
      <Tab title="Python SDK">
        ```py {10-13} 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>",
                avatar_id="<TAVUS_FACE_ID_OR_PAL_ID>",
                agora_uid="<AGORA_UID>"
            ))
        )
        ```
      </Tab>

      <Tab title="TypeScript">
        ```typescript {8-11} 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>',
            avatarId: '<TAVUS_FACE_ID_OR_PAL_ID>',
            agoraUid: '<AGORA_UID>',
          }));
        ```
      </Tab>

      <Tab title="Go">
        ```golang {9-13} 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>",
                    AvatarID: "<TAVUS_FACE_ID_OR_PAL_ID>",
                    AgoraUID: "<AGORA_UID>",
                }),
            )
        ```
      </Tab>

      <Tab title="REST API">
        ```json {2-8} 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_uid": "<AGORA_UID>"
            }
          }
        }
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="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.
  </Step>
</Steps>


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