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

# Tencent RTC (Early Access)

[Tencent RTC](https://sc-rp.tencentcloud.com:8106/r/7B) (Real-Time Communication) is an edge transport plugin that replaces the default communication layer in Vision Agents. It connects your agent to Tencent's global real-time network, optimized for ultra-low latency in mainland China and across Asia.

<Info>
  This plugin is currently in **early access** and available by invitation. General availability is coming soon. [Apply below](#get-access) to get started today.
</Info>

## Why Tencent RTC

* **Low-latency in China** -- Tencent's edge network delivers strong performance in China, where other transport providers may face higher latency or connectivity issues.
* **Frontend SDKs** -- Tencent provides client SDKs for [Web](https://sc-rp.tencentcloud.com:8106/r/7B), iOS, and Android, so you can build end-user applications that connect to the same RTC room as your agent.
* **Drop-in replacement** -- The plugin implements the same `EdgeTransport` interface. Swap `edge=tencent.Edge(...)` into your `Agent` and keep your existing LLM, STT, TTS, vision, and avatar plugins unchanged.
* **Audio and video** -- Supports both audio and video tracks for voice agents, video agents, and multimodal applications.

## Get Access

<Steps>
  <Step title="Apply for early access" icon="envelope">
    Click below to open a pre-filled email in your mail app:

    <Card title="Apply for Early Access" icon="envelope" href="mailto:joyochen@global.tencent.com?cc=nash%40getstream.io&subject=Vision%20Agents%20%E2%80%93%20Tencent%20RTC%20Early%20Access%20Request&body=Hi%20there%2C%0A%0AI%27m%20building%20an%20app%20with%20Vision%20Agents%20and%20would%20love%20to%20apply%20for%20early%20access%20to%20the%20Tencent%20RTC%20plugin.%20My%20details%20are%20below%3A%0A%0AName%3A%20%0ACompany%3A%20%0ARegion%3A%20%0AGitHub%20profile%3A%20https%3A%2F%2Fgithub.com%2F%0A%0AWhat%20I%27m%20building%3A%0A(Optionally%2C%20let%20us%20know%20the%20expected%20maximum%20number%20of%20concurrent%20users%20and%20agents)%0A%0ALet%20us%20know%20if%20there%20are%20any%20questions%20on%20your%20side%2C%20thanks!%0A">
      Opens your mail app with a pre-filled template
    </Card>

    The email includes these fields for you to fill in:

    * Your name and company (or "Independent Developer")
    * Region
    * GitHub profile URL
    * A brief description of what you're building (optionally, the expected maximum number of concurrent users and agents)

    The Tencent team will review your application and respond.
  </Step>

  <Step title="Receive the SDK" icon="box">
    Approved developers receive:

    * The **Tencent RTC SDK** (a Linux shared library) required by the plugin
    * **Deployment instructions** for setting up the SDK in a Docker environment
    * An invite to the **early access support group** for direct technical assistance

    If your application is waitlisted, you'll be contacted when the plugin reaches general availability.
  </Step>

  <Step title="Set up credentials" icon="key">
    Create an RTC application in the [Tencent RTC Console](https://sc-rp.tencentcloud.com:8106/r/vB) to obtain your credentials:

    | Variable               | Description                               |
    | ---------------------- | ----------------------------------------- |
    | `TENCENT_SDKAppID`     | Your RTC application's integer App ID     |
    | `TENCENT_SDKSecretKey` | Secret key for generating user signatures |
  </Step>

  <Step title="Build your agent" icon="code">
    All Vision Agents features work out of the box with the Tencent transport. Swap in any LLM, STT, TTS, vision, or avatar plugin, use function calling, tools, and knowledge -- everything works the same way as with the default transport.

    ```python theme={null}
    import os

    from vision_agents.core import Agent, Runner, User
    from vision_agents.core.agents import AgentLauncher
    from vision_agents.plugins import elevenlabs, openai, tencent, cartesia


    async def create_agent(**kwargs) -> Agent:
        agent = Agent(
            edge=tencent.Edge(
                sdk_app_id=int(os.environ["TENCENT_SDKAppID"]),
                key=os.environ["TENCENT_SDKSecretKey"],
            ),
            agent_user=User(name="Tencent Voice Agent", id="tencent-voice-agent"),
            instructions="You are a helpful voice assistant. Respond concisely.",
            llm=openai.LLM(),
            tts=cartesia.TTS(),
            stt=elevenlabs.STT(),
        )
        return agent


    async def join_call(agent: Agent, call_type: str, call_id: str, **kwargs) -> None:
        await agent.authenticate()
        call = await agent.create_call(call_type, call_id)

        async with agent.join(call):
            await agent.finish()


    if __name__ == "__main__":
        Runner(AgentLauncher(create_agent=create_agent, join_call=join_call)).cli()
    ```
  </Step>
</Steps>

## Parameters

| Name         | Type  | Default                          | Description                                                                                                                                                                                                                        |
| ------------ | ----- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sdk_app_id` | `int` | `None`                           | RTC application ID. Falls back to the `TENCENT_SDKAppID` environment variable if not provided.                                                                                                                                     |
| `key`        | `str` | `None`                           | Secret key for generating user signatures. Falls back to `TENCENT_SDKSecretKey` if not provided.                                                                                                                                   |
| `user_sig`   | `str` | `None`                           | Pre-computed user signature. If omitted, a signature is generated automatically from `key` at join time. See the [UserSig generation guide](https://trtc.io/document/35166?product=rtcengine\&menulabel=core%20sdk\&platform=web). |
| `video_fps`  | `int` | `15` (supported range: `5`–`60`) | Frames per second for outgoing video encoding.                                                                                                                                                                                     |

## Environment Variables

| Variable               | Default | Description                                                                                                                   |
| ---------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `TENCENT_SDKAppID`     | --      | Fallback for `sdk_app_id` when not passed to the constructor.                                                                 |
| `TENCENT_SDKSecretKey` | --      | Fallback for `key` when not passed to the constructor.                                                                        |
| `TENCENT_TRTC_SCENE`   | `auto`  | Room scene type. One of `auto`, `videocall`, `call`, or `record`. `auto` selects the first available from videocall and call. |

## Frontend SDKs

Tencent provides client SDKs for joining the same RTC room from end-user applications. Your users connect with a Tencent frontend SDK while your Vision Agent runs server-side with this plugin -- both in the same room.

See the [Tencent RTC documentation](https://sc-rp.tencentcloud.com:8106/r/wB) for Web, iOS, and Android client SDK guides.

## Next Steps

<CardGroup cols={2}>
  <Card title="Deploying Agents" icon="rocket" href="/guides/deploying-overview">
    Run your agent locally, containerize it, and scale to production.
  </Card>

  <Card title="Create Your Own Plugin" icon="plug" href="/integrations/create-your-own-plugin">
    Build a custom plugin to connect additional services.
  </Card>
</CardGroup>
