Skip to main content
Tencent RTC (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.

Why Tencent RTC

  • Low-latency in Asia - Tencent’s edge network delivers strong performance in Asia, where other transport providers may face higher latency or connectivity issues.
  • Frontend SDKs - Tencent provides client SDKs for Web, 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.

Installation

On Linux this pulls liteav from PyPI. On macOS the liteav dependency is skipped via a platform marker, so the package installs but tencent.Edge() raises at runtime — use the Docker setup in Get Started below.

Get Started

Talk to an agent in about five minutes. You need Docker, an .env at the Vision Agents repo root with TENCENT_SDK_APP_ID, TENCENT_SDK_SECRET_KEY, OPENAI_API_KEY, and ELEVEN_API_KEY, and a working microphone in a Chromium-based browser. The example pairs Tencent TRTC with OpenAI (LLM) and ElevenLabs (STT + TTS).

Set up credentials and join from the browser

Create an RTC application in the Tencent RTC Console to obtain your credentials:Open Tencent’s hosted TRTC Web SDK quick demo:
  • Paste your TENCENT_SDK_APP_ID into SDKAppID and TENCENT_SDK_SECRET_KEY into SDKSecretKey — the page generates UserSig client-side.
  • Leave the auto-generated UserID and RoomID(String) as is.
  • Click Enter Room — the demo log should print 🟩 [user_***] enterRoom.
  • Click Start Local Video — this also publishes the mic.

Launch the agent in Docker

Clone the Vision Agents repo, copy the RoomID(String) from the demo form, and start the example agent:
On first run this builds the image and resolves the workspace; subsequent runs are faster. When the agent joins you’ll see Tencent TRTC OnRemoteUserEnterRoom: <userId> matching the UserID shown in the demo.

Talk to the agent

The flow is browser → Tencent → STT (ElevenLabs) → LLM (OpenAI) → TTS (ElevenLabs) → Tencent → browser. Confirm each leg in the agent log:
  • 🎤 [Transcript Complete]: … — STT got your speech.
  • 🤖 [LLM response final]: … — LLM produced a reply.
  • Reply plays back in the browser.

Usage in your own 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.
The underlying liteav package ships only manylinux wheels — Linux x86_64 / aarch64 only. On macOS and Windows, run the agent inside a Linux container (see Get Started). User signatures are required for room entry; either generate them with TLSSigAPIv2 or pass key= and let the plugin sign per join.

Parameters

Environment Variables

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 for Web, iOS, and Android client SDK guides.

Next Steps

Deploying Agents

Run your agent locally, containerize it, and scale to production.

Create Your Own Plugin

Build a custom plugin to connect additional services.