TRTC AI Customer Service
CLAWHUB · Unverified
Build an AI e-commerce customer service Web app with TRTC ConversationAI — real-time voice/text dual-mode, trilingual (Chinese/English/Cantonese), digital av...
- 62
- Rank
- 84
- Safety
- 1.2k
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · Oct 11, 2026
- Adoption signal
- 1.2K downloadsadoption · Oct 11, 2026
- Latest release
- 1.2.5release · May 26, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 1.2.5release
trtc-ai-customer-service v1.2.5 - Updated documentation (SKILL.md) for improved clarity and completeness. - Minor improvements or fixes applied to source/script files. - No breaking changes in APIs or workflows. - All instructions and reference guides are now up to date for new users.
Observed May 26, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s17asvpk3b23w8deqmbkaxf4cn86swf9:trtc-ai-customer-service- Install using `clawhub skill install s17asvpk3b23w8deqmbkaxf4cn86swf9:trtc-ai-customer-service` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/jerryang-cool/trtc-ai-customer-service before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-jerryang-cool-trtc-ai-customer-service/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
149,965 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: trtc-ai-customer-service
version: 1.2.5
description: |
Build an AI e-commerce customer service Web app with TRTC ConversationAI — real-time voice/text dual-mode, trilingual (Chinese/English/Cantonese), digital avatar optional. Covers order inquiry, returns, shipping tracking, and promotions.
基于腾讯云 TRTC Conversational AI 快速构建 AI 电商客服 Web 应用 — 实时语音/文字双模、中英粤三语、数字人可选。覆盖订单查询、退换货、物流追踪、商品咨询等场景。
homepage: https://github.com/jerryang-cool/trtc-ai-customer-service-skill
metadata:
openclaw:
emoji: "🛍️"
requires:
bins:
- python3
---
# TRTC AI 电商客服 Skill
本 Skill 指导你基于腾讯云 TRTC Conversational AI 能力,快速构建 AI 电商客服 Web 应用。
场景预置了订单查询、退换货处理、商品咨询、物流追踪、优惠活动等电商业务模块。
## 触发条件
当用户**表达构建/搭建/集成意图**时使用此 Skill:
- "做一个 AI 客服" "搭建电商客服" "帮我做个智能客服系统" "语音客服 demo"
- "build an AI customer service" "e-commerce customer service app"
- "TRTC ConversationAI" "TRTC + AI 客服" "TRTC e-commerce support"
- "StartAIConversation" "StopAIConversation" "ControlAIConversation"(TRTC API 名称)
- "数字人客服" "avatar customer service"
- "实时语音 AI 对话" "ASR + LLM + TTS 客服"
**不应触发的场景**:
- 用户仅在讨论客服概念,没有构建/开发意图
- 用户询问通用 chat bot 方案,不需要语音能力或电商场景
- 关键词如 "voice bot" "chat bot" 单独出现且无构建上下文
## 架构总览
```
浏览器 (TRTC Web SDK v5)
↕ 音频 (WebRTC) + 自定义消息 (字幕/状态/文字输入)
TRTC Room
↕ 内置 ASR → LLM → TTS → 推回房间
TRTC AI Bot (云端)
↕ OpenAPI (TC3-HMAC-SHA256)
Flask 后端 (app.py) —— 仅 UserSig 签发 + OpenAPI 中转
```
| 平面 | 通道 | 内容 |
|------|------|------|
| **媒体面** | WebRTC 音频流 | 用户麦克风 ↔ TRTC 房间 ↔ AI Bot |
| **控制面** | HTTP `/action` | 前端 → Flask → TRTC OpenAPI |
| **数据面** | TRTC 自定义消息 | 字幕(10000) / AI 状态(10001) / 文字输入(20000) / 打断(20001) |
后端**完全不调用 LLM**——LLM 由 TRTC 云端 AI Bot 内部调用,后端只负责签发 UserSig 和中转 OpenAPI 请求。
---
## 工作流程
根据用户需求选择合适的路径。
### 路径 A:从零创建新项目(推荐)
#### Step 1: 生成项目
运行脚手架脚本:
```bash
python {baseDir}/scripts/scaffold.py <项目目录> [--name <商城名称>] [--name-en <English name>]
```
- `{baseDir}`:本 Skill 所在目录的绝对路径(由 Agent 自动替换为实际路径)
- `--name`:商城名称(默认"云尚商城"),用于中文/粤语的 SystemPrompt、欢迎语、告别语、前端 UI
- `--name-en`:英文商城名称(默认自动推导:中文名时为"CloudShop Mall",英文名时与 `--name` 相同),用于英文 SystemPrompt、英文欢迎语/告别语
- 默认支持中文/英文/粤语三语,无需手动指定语言
- 脚本自动生成全部文件:后端 + 前端 + 头像 + 鉴权库 + 启动脚本,无需手动复制任何文件
**检查点**:确认用户看到 `✅ 电商客服项目已生成到: xxx` 和完整文件列表,再继续。
#### Step 2: 配置密钥
引导用户运行启动脚本(**根据操作系统自动选择**:macOS/Linux 用 `./start.sh`,Windows 用 `start.bat`),首次运行会进入交互式引导:
- [0/4] 选择部署区域(默认 `intl` 国际站,可选 `cn` 中国站)— 后续步骤会根据所选区域展示对应的控制台链接
- [1/4] 腾讯云 API 密钥 → 脚本会展示对应区域的 [CAM 控制台](https://console.intl.cloud.tencent.com/cam/capi) 链接
- [2/4] TRTC 应用凭据 → 脚本会展示对应区域的 [TRTC 控制台](https://console.trtc.io/app) 链接
- [3/4] LLM 配置 → **建议优先使用 TokenHub**(腾讯云统一 LLM 网关,开箱即用):
- `LLMConfig.LLMType`:`openai`(固定)
- `LLMConfig.Model`:`deepseek-v4-flash`(推荐)
- `LLMConfig.APIUrl`:
- 国际站:`https://tokenhub-intl.tencentcloudmaas.com/v1/chat/completions`
- 中国站:`https://tokenhub.tencentmaas.com/v1/chat/completions`
- `LLMConfig.APIKey`:在 TokenHub 控制台获取([国际站](https://console.intl.cloud.tencent.com/tokenhub) | [中国站](https://console.cloud.tenceREADME.md
# TRTC AI Customer Service Skill
English | [简体中文](README_ZH.md)
> Rapidly scaffold a production-ready AI customer service Web application powered by [Tencent RTC Conversational AI](https://trtc.io/solutions/conversational-ai) — voice & text dual-mode, trilingual, with built-in e-commerce workflows.
## Highlights
| Capability | Description |
|-----------|-------------|
| **Real-time Voice** | Bidirectional WebRTC audio between end-user and cloud-hosted AI Bot |
| **Text Fallback** | Bypass ASR — send typed messages directly to the LLM pipeline |
| **Trilingual i18n** | Chinese / Cantonese / English across UI, STT, TTS, and SystemPrompt |
| **E-commerce Workflows** | Order inquiry, returns & exchanges, shipping tracking, promotions |
| **Digital Avatar** | Optional virtual human rendering; graceful degradation to pure voice |
| **Session Lifecycle** | Keyword-triggered farewell, human agent transfer, auto-idle timeout |
| **Service Rating** | 4-dimension post-session evaluation |
## Installation
This is a **portable Agent Skill** (a `SKILL.md` + `scripts/` + `references/` + `assets/` bundle). Install it to your tool's skills directory and the agent will auto-discover it.
### OpenClaw
Choose the install location based on your needs:
| Location | Scope | Command |
|----------|-------|---------|
| `<workspace>/skills/` | Current workspace, highest priority | `git clone https://github.com/jerryang-cool/trtc-ai-customer-service-skill.git skills/trtc-ai-customer-service` |
| `~/.agents/skills/` | Personal, effective across workspaces | `git clone https://github.com/jerryang-cool/trtc-ai-customer-service-skill.git ~/.agents/skills/trtc-ai-customer-service` |
| `~/.openclaw/skills/` | Global, visible to all agents | `git clone https://github.com/jerryang-cool/trtc-ai-customer-service-skill.git ~/.openclaw/skills/trtc-ai-customer-service` |
Invoke via natural language ("help me build an AI customer service") or slash command `/trtc-ai-customer-service`.
> See [OpenClaw Skills documentation](https://docs.openclaw.ai/tools/skills) for more details.
### CodeBuddy
Settings → Skills → **Import Skill**, then point to this repository's directory. Once imported, mention keywords such as *"AI customer service"*, *"e-commerce support"*, or *"TRTC + AI"* to activate.
### Claude Code
```bash
# User-level (available across all projects)
git clone <repo-url> ~/.claude/skills/trtc-ai-customer-service
# OR project-level (commit to repo, share with team)
git clone <repo-url> .claude/skills/trtc-ai-customer-service
```
Claude Code auto-discovers skills via `description` matching. Invoke implicitly ("help me build an AI customer service") or explicitly via `/trtc-ai-customer-service`.
### OpenAI Codex CLI
```bash
# User-level
git clone <repo-url> ~/.codex/skills/trtc-ai-customer-service
# OR project-level
git clone <repo-url> .agents/skills/trtc-ai-customer-service
```
Codex auto-detects new skills on next session. Invoke implicitly via natural language, _meta.json
{
"ownerId": "kn7c55va424ew234devca4r09186sb9y",
"slug": "trtc-ai-customer-service",
"version": "1.2.5",
"publishedAt": 1779801012564
}references/architecture.md
# TRTC AI 智能客服 - 架构设计参考
## 目录
1. [系统架构](#系统架构)
2. [项目结构](#项目结构)
3. [后端实现详解](#后端实现详解)
4. [认证流程](#认证流程)
5. [核心设计模式](#核心设计模式)
6. [依赖清单](#依赖清单)
7. [启动与部署](#启动与部署)
---
## 系统架构
### 三平面模型
```
┌─────────────────────────────────────────────────┐
│ 浏览器 (TRTC Web SDK v5) │
│ │
│ 音频流 (WebRTC) 自定义消息 (字幕/状态/文字) │
└───────────┬─────────────────┬─────────────────────┘
│ │
▼ ▼
┌───────────────────────────────────────────────────┐
│ TRTC Room (云端) │
│ │
│ ASR ──► LLM ──► TTS ──► 推回房间 │
│ │
│ TRTC AI Bot (云端实例) │
└───────────┬─────────────────────────────────────────┘
│ OpenAPI (TC3-HMAC-SHA256)
▼
┌───────────────────────────────────────────────────┐
│ Flask 后端 (app.py) │
│ - UserSig 签发 │
│ - TRTC OpenAPI 中转 │
│ - 零 LLM 调用 │
└─────────────────────────────────────────────────────┘
```
关键洞察:**后端完全不调用 LLM**。LLM 推理由 TRTC 云端 AI Bot 内部完成。后端只做两件事:
1. 签发 UserSig(用于 TRTC 房间鉴权)
2. 中转 TRTC OpenAPI 请求(启动/停止/控制 AI 对话)
### 消息类型
| type | 方向 | 内容 |
|------|------|------|
| `10000` | 云→端 | 字幕(用户 ASR 结果 + AI 回复文本) |
| `10001` | 云→端 | AI 状态(聆听/思考/说话/打断/结束) |
| `20000` | 端→云 | 文字输入(跳过 ASR 直送 LLM) |
| `20001` | 端→云 | 手动打断 |
---
## 项目结构
```
project/
├── app.py # Flask 主入口(~296 行,5 个 Action 处理器)
├── config_loader.py # 配置加载器(Region/TTS/STT 映射)
├── trtc_signer.py # UserSig 三套签发封装
├── TLSSigAPIv2.py # 腾讯云官方 TRTC HMAC 鉴权库(不修改)
├── env.example.yaml # 配置模板
├── env.yaml # 实际配置(.gitignore 排除)
├── requirements.txt # 4 个 Python 依赖
├── start.sh / start.bat # 一键启动脚本
├── templates/
│ └── customer_service.html # 主页面(配置侧边栏 + 聊天区 + 评分弹窗)
├── static/
│ ├── app.js # 前端核心交互逻辑
│ ├── i18n.js # 国际化字典(zh/yue/en)
│ └── avatars/ # 客服头像
└── docs/
└── PARAMS.md # 参数配置详解
```
---
## 后端实现详解
### 初始化
```python
# 加载配置
config = AppConfig("env.yaml")
signer = TRTCSigner(config.sdkappid, config.trtc_secret)
# 初始化 TRTC OpenAPI 客户端
_cred = credential.Credential(config.secret_id, config.secret_key)
_http = HttpProfile()
_http.endpoint = config.trtc_endpoint # 按 Region 自动切换
_client_profile = ClientProfile()
_client_profile.httpProfile = _http
trtc_api = trtc_client.TrtcClient(_cred, config.trtc_region, _client_profile)
```
### 路由设计
仅 2 个路由,极简:
- `GET /` → 渲染主页面
- `POST /action` → 统一 API 调度,通过 `Action` 请求头区分
### Action 处理器详解
#### handle_join(data)
签发三套 UserSig 并下发配置:
```python
def handle_join(data):
user_id = dareferences/config-guide.md
# TRTC AI 智能客服 - 配置参数完全指南
## 目录
1. [配置文件结构](#配置文件结构)
2. [部署区域](#部署区域)
3. [腾讯云 API 密钥](#腾讯云-api-密钥)
4. [TRTC 应用凭据](#trtc-应用凭据)
5. [LLM 配置](#llm-配置)
6. [欢迎语](#欢迎语)
7. [数字人配置](#数字人配置)
8. [关键词与告别语](#关键词与告别语)
9. [转人工关键词与提示语](#转人工关键词与提示语)
10. [TTS 音色映射表](#tts-音色映射表)
11. [STT 引擎映射表](#stt-引擎映射表)
12. [固定默认参数](#固定默认参数)
13. [UI 可调参数](#ui-可调参数)
14. [Region 切换机制](#region-切换机制)
---
## 配置文件结构
配置使用 YAML 格式,通过 `envyaml` 库加载(支持环境变量替换)。
```yaml
# env.yaml 完整模板
Deployment:
Region: intl
CloudAPI:
SECRET_ID: your-secret-id
SECRET_KEY: your-secret-key
TRTC:
SDKAPPID: 0
SECRET: your-trtc-secret
LLMConfig:
LLMType: openai
Model: your-model-name
APIKey: your-api-key
APIUrl: your-llm-api-url
Timeout: 5.0
History: 20
Temperature: 0.3
SystemPrompt: |
你是一名专业的客服助手...
SystemPromptYue: |
你係一名專業嘅客服助手...
SystemPromptEn: |
You are a professional customer service assistant...
WelcomeMessage:
zh: 您好,我是AI客服小助手...
yue: 您好,我係AI客服小助手...
en: "Hello! I'm your AI assistant..."
AvatarConfig:
AvatarType: tencent
Appkey: ""
AccessToken: ""
VirtualmanProjectId: ""
EndKeywords:
zh: [拜拜, 再见, 挂了, ...]
yue: [拜拜, 再見, 收線啦, ...]
en: [bye, goodbye, see you, ...]
FarewellMessage:
zh: 感谢您的咨询,再见!
yue: 多謝您嘅諮詢,再見!
en: Thank you for your inquiry. Goodbye!
TransferKeywords:
zh: [转人工, 人工客服, 找人工, ...]
yue: [轉人工, 人工客服, 搵人工, ...]
en: [transfer, human agent, real person, ...]
TransferMessage:
zh: 好的,正在为您转接人工客服,请稍候...
yue: 好嘅,正在為您轉接人工客服,請稍候...
en: Sure, transferring you to a human agent, please wait...
```
---
## 部署区域
```yaml
Deployment:
Region: intl # intl / cn
```
| 值 | 说明 | TRTC Endpoint | TRTC Region |
|----|------|---------------|-------------|
| `intl` | 国际站账号(默认) | `trtc.intl.tencentcloudapi.com` | `ap-singapore` |
| `cn` | 中国大陆账号 | `trtc.tencentcloudapi.com` | `ap-guangzhou` |
Region 决定了 TRTC OpenAPI 的请求域名和地域参数。
---
## 腾讯云 API 密钥
```yaml
CloudAPI:
SECRET_ID: your-secret-id
SECRET_KEY: your-secret-key
```
用于 TRTC OpenAPI 的 TC3-HMAC-SHA256 签名。在腾讯云控制台获取([国际站](https://console.intl.cloud.tencent.com/cam/capi) | [中国站](https://console.cloud.tencent.com/cam/capi))。
**安全提醒**:这是主账号密钥,生产环境建议使用子账号并限制权限。
---
## TRTC 应用凭据
```yaml
TRTC:
SDKAPPID: 0
SECRET: your-trtc-secret
```
- `SDKAPPID`:TRTC 应用 ID,在 TRTC 控制台创建([国际站](https://console.trtc.io/app) | [中国站](https://console.cloud.tencent.com/trtc/app))
- `SECRET`:用于生成 UserSig 的密钥
---
## LLM 配置
```yaml
LLMConfig:
LLMType: openai # LLM 协议类型(目前仅支持 openai)
Model: your-model-name # 模型名称
APIKey: your-api-key # LLM API Key
APIUrl: your-llm-api-url # LLM API 端点(兼容 OpenAI /v1/chat/completions 协议)
Timeout: 5.0 # 超时时间(秒)
History: 20 # 上下文轮数
Temperature: 0.3 # 温度参数(越低越确定)
SystemPrompt: | # 中文系统提示词
你是一名专业的客服助手...
SystemPromptYue: | # 粤语系统提示词(可选,默认用中文)
你係一名專業嘅客服助手...
SystemPromptEn: | # 英文系统提示词(可选,默认用中文)
You are a professional customer sAionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-jerryang-cool-trtc-ai-customer-service. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about TRTC AI Customer Service. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-jerryang-cool-trtc-ai-customer-service, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/jerryang-cool/skills/trtc-ai-customer-service",
"sourceUrl": "https://clawhub.ai/jerryang-cool/skills/trtc-ai-customer-service",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T03:02:55.006Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-jerryang-cool-trtc-ai-customer-service/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-jerryang-cool-trtc-ai-customer-service/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T03:02:55.006Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.2K downloads",
"href": "https://clawhub.ai/jerryang-cool/trtc-ai-customer-service",
"sourceUrl": "https://clawhub.ai/jerryang-cool/trtc-ai-customer-service",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T03:02:55.006Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.2.5",
"href": "https://clawhub.ai/jerryang-cool/trtc-ai-customer-service",
"sourceUrl": "https://clawhub.ai/jerryang-cool/trtc-ai-customer-service",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-26T13:10:12.564Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-jerryang-cool-trtc-ai-customer-service/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-jerryang-cool-trtc-ai-customer-service/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.2.5",
"description": "trtc-ai-customer-service v1.2.5 - Updated documentation (SKILL.md) for improved clarity and completeness. - Minor improvements or fixes applied to source/script files. - No breaking changes in APIs or workflows. - All instructions and reference guides are now up to date for new users.",
"href": "https://clawhub.ai/jerryang-cool/trtc-ai-customer-service",
"sourceUrl": "https://clawhub.ai/jerryang-cool/trtc-ai-customer-service",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-26T13:10:12.564Z",
"isPublic": true
}
]
}Record generated Nov 25, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-jerryang-cool-trtc-ai-customer-service/run-check
