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
EdgeTransportinterface. Swapedge=tencent.Edge(...)into yourAgentand 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
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_IDinto SDKAppID andTENCENT_SDK_SECRET_KEYinto SDKSecretKey — the page generatesUserSigclient-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.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.