Vision Agents Plugin: Tencent TRTC Edge
Tencent TRTC (Real-Time Communication) edge transport for Vision Agents. Lets an agent join a Tencent TRTC room and exchange audio/video with participants using the Tencent LiteAV SDK Python bindings.
Quickstart
Talk to an agent in 5 minutes. You'll need Docker, an .env with TENCENT_SDK_APP_ID, TENCENT_SDK_SECRET_KEY, OPENAI_API_KEY, and ELEVEN_API_KEY at the repo root, and a working microphone in a Chromium-based browser. The example pairs Tencent TRTC with OpenAI (LLM) and ElevenLabs (STT + TTS) — chosen because Gemini and Cartesia aren't reachable from mainland China, which is the natural deployment target for this edge.
-
Open Tencent's hosted TRTC Web SDK quick demo: https://web.sdk.qcloud.com/trtc/webrtc/v5/demo/quick-demo-js/index.html
- 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 → demo log should print
🟩 [user_***] enterRoom. - Click Start Local Video — this also publishes the mic.
- Paste your
-
Copy the
RoomID(String)from the demo form and launch the agent with it:cd plugins/tencent TENCENT_TEST_ROOM_ID=<paste-room-id-here> docker compose run --rm tencent-agent
On first run this builds the image and resolves the workspace; subsequent runs are fast. When the agent joins you'll see
Tencent TRTC OnRemoteUserEnterRoom: <userId>matching the UserID shown in the demo. -
Talk. 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
from vision_agents.core import Agent, User
from vision_agents.plugins import tencent
agent_user = User(id="agent-1", name="Agent")
edge = tencent.Edge(
sdk_app_id=YOUR_SDK_APP_ID,
user_sig=USER_SIG, # or key=KEY to generate per join
)
agent = Agent(
edge=edge,
agent_user=agent_user,
llm=...,
# stt, tts, etc.
)
call = await edge.create_call(call_id=str(ROOM_ID), room_id=ROOM_ID)
await agent.join(call)
await agent.finish()
Install
uv add vision-agents-plugins-tencent
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 from the Quickstart.
Configuration
tencent.Edge(...) parameters:
- sdk_app_id (int): Tencent TRTC SDK App ID. Falls back to
TENCENT_SDK_APP_IDenv var. - user_sig (str): User signature for the agent user.
- key (str): Optional. If set and
user_sigis not, the plugin generatesuser_sigvia TLSSigAPIv2. Falls back toTENCENT_SDK_SECRET_KEYenv var. - video_fps (int): Outgoing video frame rate.
Environment variables:
TENCENT_SDK_APP_ID,TENCENT_SDK_SECRET_KEY— credentials.TENCENT_TRTC_SCENE— one ofauto(default),videocall,call,record.TENCENT_TEST_ROOM_ID— interpolated bydocker-compose.ymlinto the example runner's--call-idflag.
Platform support
The underlying liteav package ships only manylinux wheels — Linux x86_64 / aarch64 only. macOS and Windows must run the agent inside a Linux container (see Quickstart). User sigs are needed for room entry; either generate them with TLSSigAPIv2 or pass key= and let the plugin sign per join.
Metadata
Release files for vision-agents-plugins-tencent 0.6.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vision_agents_plugins_tencent-0.6.9.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vision_agents_plugins_tencent-0.6.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.7 kB
Release files / vision_agents_plugins_tencent-0.6.9.tar.gz
| Download URL | vision_agents_plugins_tencent-0.6.9.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4712ec792d4c5e4994b158cfa5e04fa259d183d77b90ebc84a08e4d319eed68d
|
|
BLAKE2b-256 checksum How to use checksums |
91c6873bc2d79b75141b7343909f04b3e2fd212e1bbbc432723c5eceee1dd5bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vision_agents_plugins_tencent-0.6.9-py3-none-any.whl
| Download URL | vision_agents_plugins_tencent-0.6.9-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b08bc1b2d37486408aa48c29711262855c3e798d161cb86a25aa6f8d0e9924e5
|
|
BLAKE2b-256 checksum How to use checksums |
d61156774474853ee3e1a64f8dc504b84debcbc749926d7ed546cf6570cc9a21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|