Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@ It contains:
- Knowledge base structure and lookup rules
- Session state management (`.trtc-session.yaml`)

## Conversational AI routing (AI customer service)

When the user describes a Conversational AI scenario — building or integrating
an AI-powered customer service agent, intelligent Q&A system, or TRTC
Conversational AI capabilities — route directly to the `trtc-ai-service` skill:

**Conversational AI triggers** (match any):
- "AI客服" / "智能客服" / "AI customer service"
- "build AI agent" / "搭建AI客服" / "搭建智能客服"
- "conversational AI" / "conversational AI demo" / "TRTC Conversational AI"
- "integrate AI service" / "集成AI客服" / "AI customer service agent"
- "voice agent" + "customer service" / "语音助手" + "客服"

When triggered, read `skills/trtc-ai-service/SKILL.md` and follow its guided
workflow. Conversational AI has its own capability model and adapter layer —
it does NOT go through the standard product/platform/scenario routing below.

Below are additional rendering-specific rules that apply to all agents:

# ui-mode
Expand Down
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@

当用户提出 TRTC 相关问题时:

1. **识别产品**:Chat / Call / RTC Engine / Live / Conference
1. **识别产品**:Chat / Call / RTC Engine / Live / Conference / Conversational AI
2. **识别平台**:Web / Android / iOS / Flutter / Electron / Unity
3. **读取知识库**:先读 `knowledge-base/slices/{product}/` 下的产品级概览,再读 `{product}/{platform}/` 下的平台实现细节
4. **引用来源**:标明参考的 slice ID 和官方文档链接

**新用户检测**:当用户首次使用或描述从零开始的集成需求时,优先进入 `skills/trtc-onboarding/SKILL.md` 引导流程。

**AI 客服场景识别**:当用户描述搭建 AI 客服、智能客服、对话式 AI 等场景时,直接路由到 `skills/trtc-ai-service/SKILL.md`。该路径使用 TRTC Conversational AI,拥有独立的原子能力模型和适配器层,不经过标准的 onboarding/topic 流程。

## 关键路径

| 用途 | 路径 |
Expand Down
2 changes: 2 additions & 0 deletions CODEBUDDY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Before identifying product / platform, check if an onboarding session is already
| **RTC Engine** | 进房、退房、推流、拉流、混流、音视频、采集、编码、码率、低延时、SEI、TRTC 引擎 | enter room, leave room, publish stream, play stream, mix stream, audio/video, capture, encoding, bitrate, low latency, SEI, RTC engine | `TRTC`, `TRTCCloud` |
| **Live** | 直播、推流、连麦、观众、主播、弹幕、礼物、打赏、美颜、变声、开播、下播、PK、房管 | live streaming, publish, co-guest, co-host, audience, host, anchor, barrage, danmu, gift, beauty filter, voice changer, start broadcast, end broadcast, PK, moderator | `AtomicXCore`, `LiveCoreView`, `LiveListStore` |
| **Conference** | 会议、多人视频、视频会议、入会、离会、创建会议、预约会议、参会人、会控、屏幕共享、举手、录制、等候室、虚拟背景、静音全员 | meeting, multi-person video, video conferencing, join meeting, leave meeting, create meeting, schedule meeting, participant, moderation, screen share, raise hand, record, waiting room, virtual background, mute all | `TUIRoomKit` |
| **Conversational AI** | AI客服、智能客服、对话式AI、语音客服、语音助手 | AI customer service, conversational AI demo, voice agent, intelligent Q&A, build AI agent, integrate AI service | TRTC Conversational AI |

If ambiguous, ask — keep it easy: "Your question sounds like it could be about Chat (messaging) or RTC Engine (audio/video). Which one?"

Expand All @@ -68,6 +69,7 @@ If the user doesn't specify and it matters for the answer, ask. Conceptual quest

| User intent | Skill to follow |
|-------------|----------------|
| **"build AI customer service" / "搭建AI客服" / "智能客服"** (AI customer service scenario) | `skills/trtc-ai-service/SKILL.md` — uses TRTC Conversational AI, bypasses standard product/platform routing |
| **"get started" / "help me integrate" / "I'm new"** | `skills/trtc-onboarding/SKILL.md` |
| **"I want to ADD / BUILD / IMPLEMENT X"** (feature or demo) | `skills/trtc-onboarding/SKILL.md` Path A2 — **never dump slice content directly** |
| **"从零开始" / "帮我接入" / "try the demo"** | `skills/trtc-onboarding/SKILL.md` |
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,21 @@ The skill saves your progress in the project. If you close the tool and come bac
| Product | Description | Availability |
|---------|-------------|--------------|
| **Conference** | Video conferencing — multi-party meetings, screen sharing, in-meeting chat | Web ✅ |
| **Conversational AI** | TRTC Conversational AI — AI voice agents, intelligent Q&A, human handoff, session summaries | Web ✅ |
| **Live** | Interactive live streaming — anchor/audience roles, co-hosting, barrage, gifts, beauty filters | Coming soon |
| **Chat** | Instant messaging — messages, conversations, groups, user profiles | Coming soon |
| **Call** | Audio/video calling — 1-on-1 and group calls | Coming soon |
| **RTC Engine** | Low-level real-time audio/video engine — room management, publishing, subscribing | Coming soon |

### Conversational AI — Supported Scenarios

Conversational AI is a standalone product built on TRTC's voice and LLM capabilities. The following application scenarios are supported:

| Scenario | Description | Status |
|----------|-------------|--------|
| **AI Customer Service** | Build an AI-powered voice customer service agent that can answer customer questions, look up knowledge base articles, escalate to human agents, and summarize conversations — all through natural voice interaction. | ✅ Available |
| **AI Oral Practice** | Practice spoken language with an AI conversation partner that listens, responds, and gives feedback in real time — ideal for language learning and interview rehearsal. | Coming soon |


---

Expand Down
10 changes: 10 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,21 @@ Skill 会在项目中保存你的进度。关掉工具下次回来,可以从
| 产品 | 说明 | 可用状态 |
|------|------|---------|
| **Conference** | 视频会议——多人会议、屏幕共享、会中聊天 | Web ✅ |
| **Conversational AI** | TRTC 对话式 AI——AI 语音助手、智能问答、人工转接、会话摘要 | Web ✅ |
| **Live** | 互动直播——主播/观众、连麦、弹幕、礼物、美颜 | 即将支持 |
| **Chat** | 即时通信——消息、会话、群组、用户资料 | 即将支持 |
| **Call** | 音视频通话——1v1 和群组通话 | 即将支持 |
| **RTC Engine** | 实时音视频引擎——进房、推流、拉流 | 即将支持 |

### Conversational AI — 支持的场景

Conversational AI 是基于 TRTC 语音和 LLM 能力构建的独立产品,目前支持以下应用场景:

| 场景 | 说明 | 状态 |
|------|------|------|
| **AI 客服** | 搭建 AI 语音客服助手,通过自然语音对话回答客户问题、检索知识库、转接人工坐席、自动生成会话摘要。 | ✅ 已支持 |
| **AI 口语陪练** | 与 AI 对话伙伴进行口语练习,实时倾听、回应并给出反馈——适合语言学习和面试模拟。 | 即将支持 |


---

Expand Down
17 changes: 17 additions & 0 deletions ai-instructions/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,21 @@ It contains:
- Knowledge base structure and lookup rules
- Session state management (`.trtc-session.yaml`)

## Conversational AI routing (AI customer service)

When the user describes a Conversational AI scenario — building or integrating
an AI-powered customer service agent, intelligent Q&A system, or TRTC
Conversational AI capabilities — route directly to the `trtc-ai-service` skill:

**Conversational AI triggers** (match any):
- "AI客服" / "智能客服" / "AI customer service"
- "build AI agent" / "搭建AI客服" / "搭建智能客服"
- "conversational AI" / "conversational AI demo" / "TRTC Conversational AI"
- "integrate AI service" / "集成AI客服" / "AI customer service agent"
- "voice agent" + "customer service" / "语音助手" + "客服"

When triggered, read `skills/trtc-ai-service/SKILL.md` and follow its guided
workflow. Conversational AI has its own capability model and adapter layer —
it does NOT go through the standard product/platform/scenario routing below.

Below are additional rendering-specific rules that apply to all agents:
55 changes: 34 additions & 21 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
/**
* @tencent-rtc/trtc-agent-skills installer
*
* Installs the TRTC AI Integration skill suite (6 cross-referencing skills:
* trtc + trtc-onboarding/docs/topic/search/apply) plus the shared
* knowledge-base into your IDE's skills directory, and wires up the
* Installs the TRTC AI Integration skill suite (cross-referencing skills:
* trtc + trtc-onboarding/docs/topic/search/apply + trtc-ai-service) plus the
* shared knowledge-base into your IDE's skills directory, and wires up the
* `tencent-rtc-skill-tool` MCP server (used for prompt / runtime telemetry).
*
* IMPORTANT — why skills are copied as SIBLING DIRECTORIES:
Expand Down Expand Up @@ -50,15 +50,21 @@ const SKILLS_SRC = path.join(PKG_ROOT, "skills");
const KB_SRC = path.join(PKG_ROOT, "knowledge-base");
const HOOKS_SRC = path.join(PKG_ROOT, "hooks");

// The 6 skills that make up the suite. Order is cosmetic; `trtc` is the entry.
const SKILL_NAMES = [
"trtc",
"trtc-onboarding",
"trtc-docs",
"trtc-topic",
"trtc-search",
"trtc-apply",
];
// Dynamically discover all skills under SKILLS_SRC. Each skill must be a
// directory containing a SKILL.md entry point. `trtc` is always listed first;
// the rest are sorted alphabetically. This avoids the stale-hardcoded-list
// problem — adding a new skill directory is enough to get it installed.
function getSkillNames() {
return fs.readdirSync(SKILLS_SRC, { withFileTypes: true })
.filter(entry => entry.isDirectory())
.map(entry => entry.name)
.filter(name => fs.existsSync(path.join(SKILLS_SRC, name, "SKILL.md")))
.sort((a, b) => {
if (a === "trtc") return -1;
if (b === "trtc") return 1;
return a.localeCompare(b);
});
}

// IDE skill-install targets (project-level). Each IDE reads skills from a
// different directory, but the layout inside is identical: one dir per skill.
Expand Down Expand Up @@ -290,21 +296,28 @@ function printHelp() {
}

function listSkills() {
const descriptions = {
"trtc": "Entry router — detects product/platform, routes to sub-skills",
"trtc-ai-service": "AI customer service scenarios (TRTC Conversational AI)",
"trtc-onboarding": "Get-started / integration / troubleshooting flow",
"trtc-docs": "Docs & error-code lookup",
"trtc-topic": "Step-by-step scenario walkthrough",
"trtc-search": "Internal slice lookup (AI-facing)",
"trtc-apply": "Internal compile/integration quality gate",
};
console.log(`\n ${c.bold("Skills shipped in this package:")}\n`);
console.log(` ${c.cyan("trtc/")} ${c.dim("Entry router — detects product/platform, routes to sub-skills")}`);
console.log(` ${c.cyan("trtc-onboarding/")} ${c.dim("Get-started / integration / troubleshooting flow")}`);
console.log(` ${c.cyan("trtc-docs/")} ${c.dim("Docs & error-code lookup")}`);
console.log(` ${c.cyan("trtc-topic/")} ${c.dim("Step-by-step scenario walkthrough")}`);
console.log(` ${c.cyan("trtc-search/")} ${c.dim("Internal slice lookup (AI-facing)")}`);
console.log(` ${c.cyan("trtc-apply/")} ${c.dim("Internal compile/integration quality gate")}`);
for (const name of getSkillNames()) {
const desc = descriptions[name] || "";
console.log(` ${c.cyan(name + "/")}` + (desc ? ` ${c.dim(desc)}` : ""));
}
console.log("");
}

// ── core: skill install ─────────────────────────────────────────────────────────
function cleanSkills(skillsRootAbs) {
if (!fs.existsSync(skillsRootAbs)) return 0;
let wiped = 0;
for (const name of SKILL_NAMES) {
for (const name of getSkillNames()) {
const target = path.join(skillsRootAbs, name);
if (fs.existsSync(target)) { rmrf(target); wiped++; }
}
Expand Down Expand Up @@ -385,7 +398,7 @@ function cleanHooksSettings(ideList, resolvedRoot) {

function installSkills(skillsRootAbs) {
ensureDir(skillsRootAbs);
for (const name of SKILL_NAMES) {
for (const name of getSkillNames()) {
const src = path.join(SKILLS_SRC, name);
if (fs.existsSync(src)) {
copyRecursive(src, path.join(skillsRootAbs, name));
Expand Down Expand Up @@ -812,7 +825,7 @@ function main() {
}

installSkills(skillsRootAbs);
for (const name of SKILL_NAMES) console.log(c.green(" ✓ ") + name + "/");
for (const name of getSkillNames()) console.log(c.green(" ✓ ") + name + "/");

const kbDest = copyKnowledgeBase(skillsRootAbs);
console.log(c.green(" ✓ ") + "knowledge-base/ " + c.dim("→ " + kbDest));
Expand Down
Loading