@tencent-rtc/trtc-agent-skills 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +1 -1
  3. package/CODEBUDDY.md +1 -1
  4. package/README.md +6 -73
  5. package/README.zh.md +6 -69
  6. package/bin/cli.js +9 -7
  7. package/package.json +1 -1
  8. package/skills/trtc/SKILL.md +55 -4
  9. package/skills/trtc-ai-oral-coach/README.ja.md +131 -0
  10. package/skills/trtc-ai-oral-coach/README.md +132 -0
  11. package/skills/trtc-ai-oral-coach/README.zh-CN.md +131 -0
  12. package/skills/trtc-ai-oral-coach/SKILL.md +395 -0
  13. package/skills/trtc-ai-oral-coach/auto_adapters/integration_templates/custom-learning-kb-sample.md +88 -0
  14. package/skills/trtc-ai-oral-coach/auto_adapters/integration_templates/generic-integration.md +104 -0
  15. package/skills/trtc-ai-oral-coach/auto_adapters/manifest.yaml +27 -0
  16. package/skills/trtc-ai-oral-coach/auto_adapters/python/README.md +49 -0
  17. package/skills/trtc-ai-oral-coach/auto_adapters/python/coach_client.py.tpl +185 -0
  18. package/skills/trtc-ai-oral-coach/auto_adapters/web/README.md +46 -0
  19. package/skills/trtc-ai-oral-coach/auto_adapters/web/oral-coach-client.js.tpl +210 -0
  20. package/skills/trtc-ai-oral-coach/capabilities/ability-report/manifest.yaml +52 -0
  21. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/__init__.py +2 -0
  22. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/adapters/__init__.py +2 -0
  23. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/adapters/default.py +177 -0
  24. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/handler.py +29 -0
  25. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/router.py +23 -0
  26. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/.env.example +59 -0
  27. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/manifest.yaml +46 -0
  28. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/requirements.txt +6 -0
  29. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/TLSSigAPIv2.py +275 -0
  30. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/__init__.py +2 -0
  31. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/_capability_loader.py +227 -0
  32. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/agent.py +197 -0
  33. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/config.py +149 -0
  34. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/core/__init__.py +2 -0
  35. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/core/report_llm.py +129 -0
  36. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/health.py +36 -0
  37. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/server.py +205 -0
  38. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/trtc_client.py +86 -0
  39. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/usersig.py +33 -0
  40. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/manifest.yaml +65 -0
  41. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/__init__.py +2 -0
  42. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/adapters/__init__.py +2 -0
  43. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/adapters/clients.py +126 -0
  44. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/ports.py +46 -0
  45. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/router.py +27 -0
  46. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/manifest.yaml +48 -0
  47. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/__init__.py +2 -0
  48. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/adapters/__init__.py +2 -0
  49. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/adapters/default.py +106 -0
  50. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/handler.py +33 -0
  51. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/router.py +23 -0
  52. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/manifest.yaml +49 -0
  53. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/__init__.py +2 -0
  54. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/adapters/__init__.py +2 -0
  55. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/adapters/default.py +86 -0
  56. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/handler.py +29 -0
  57. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/router.py +23 -0
  58. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/data/practice-scenarios.json +500 -0
  59. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/manifest.yaml +54 -0
  60. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/__init__.py +2 -0
  61. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/adapters/__init__.py +2 -0
  62. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/adapters/default.py +113 -0
  63. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/compose.py +143 -0
  64. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/defaults.py +140 -0
  65. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/handler.py +29 -0
  66. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/router.py +22 -0
  67. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/scenario_source.py +179 -0
  68. package/skills/trtc-ai-oral-coach/references/design-specs.md +36 -0
  69. package/skills/trtc-ai-oral-coach/references/evaluator-port.md +75 -0
  70. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/recipe.yaml +86 -0
  71. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/avatars/friend.png +0 -0
  72. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/avatars/listener.png +0 -0
  73. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/avatars/local.png +0 -0
  74. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/coach.html +1986 -0
  75. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/i18n.js +323 -0
  76. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/practice-scenarios.json +500 -0
  77. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/tokens.css +100 -0
  78. package/skills/trtc-ai-oral-coach/scripts/add-capability.py +256 -0
  79. package/skills/trtc-ai-oral-coach/scripts/verify-credentials.py +96 -0
  80. package/skills/trtc-ai-oral-coach/start.sh +59 -0
  81. package/skills/trtc-ai-oral-coach/triggers.yaml +32 -0
  82. package/skills/trtc-ai-service/README.ja.md +15 -32
  83. package/skills/trtc-ai-service/README.md +15 -32
  84. package/skills/trtc-ai-service/README.zh-CN.md +15 -32
  85. package/skills/trtc-ai-service/SKILL.md +188 -120
@@ -0,0 +1,132 @@
1
+ # AI Oral Coach Skill
2
+
3
+ > Build an AI English speaking coach powered by TRTC Conversational AI — zero code, voice-first. Two paths, both agent-driven: you just talk, the agent does the rest.
4
+
5
+ ## Demo
6
+
7
+ https://github.com/user-attachments/assets/9e586749-d810-4c5a-bb27-356a3b74d486
8
+
9
+ ## About Tencent RTC
10
+
11
+ [Tencent RTC](https://trtc.io) (Real-Time Communication) powers real-time audio, video, and conversational AI experiences for thousands of businesses worldwide. With a global edge network spanning 200+ countries and regions, TRTC delivers sub-300ms ultra-low latency at scale.
12
+
13
+ The **Conversational AI** capability enables developers to build voice agents that can listen, understand, and respond naturally — perfect for language learning, speaking practice, and interactive tutoring.
14
+
15
+ ## What is this?
16
+
17
+ A plug-and-play Skill that builds an AI English speaking coach — packaged into a single agent-driven workflow:
18
+
19
+ ```
20
+ You (in your IDE's AI chat window):
21
+ "Build me an AI English speaking coach"
22
+
23
+ AI (does everything automatically):
24
+ 1. Checks your runtime environment
25
+ 2. Lets you choose Quick Experience or Integrate into My System
26
+ 3. Guides you through 3 keys setup (cloud service credentials)
27
+ 4. Installs dependencies and assembles coach capabilities
28
+ 5. Starts the service and gives you a browser URL
29
+
30
+ You never open a terminal or run a script manually.
31
+ ```
32
+
33
+ ## Two ways to start
34
+
35
+ | Mode | Who it's for | What you get | What you need |
36
+ |------|-------------|-------------|---------------|
37
+ | **Quick Experience** | First-timers who want to see it in action | Full 3-screen SPA (scenario practice + sentence correction + reply suggestions + 4-dimension report) | 3 keys |
38
+ | **Integrate into My System** | Users who already have an app and want backend capabilities | Backend API endpoints + integration samples (no UI) | 3 keys + choose coach capabilities |
39
+
40
+ ## What are the 3 keys?
41
+
42
+ To get the coach running, you need 3 cloud service credentials:
43
+
44
+ | Key | Purpose | Where to find it |
45
+ |-----|---------|-----------------|
46
+ | 1: TRTC App Credentials | Voice channel for the coach | https://console.trtc.io/?quickclaim=engine_trial |
47
+ | 2: Tencent Cloud API Key | Backend permissions (login syncs with TRTC) | https://console.tencentcloud.com/cam/capi |
48
+ | 3: LLM API Key | The coach's "brain" — understand, correct, generate reports | Your AI provider (OpenAI, DeepSeek, etc.) |
49
+
50
+ ## What capabilities does the coach have?
51
+
52
+ | Capability | Description | Quick Experience | Integration |
53
+ |------------|-------------|:---:|:---:|
54
+ | Scenario Roleplay | Scene × difficulty × style → dynamic roleplay | ✅ Default | 🔘 Optional |
55
+ | Quick Correct | Per-sentence speaking-style correction | ✅ Default | 🔘 Optional |
56
+ | Reply Suggestion | Conversation continuation hints | ✅ Default | 🔘 Optional |
57
+ | Ability Report | 4-dimension analysis report (en/zh bilingual) | ✅ Default | 🔘 Optional |
58
+ | Custom Learning KB | Connect your own teaching materials (Dify/Coze) | ❌ | 🔘 Optional |
59
+
60
+ > 💡 Evaluator capabilities (roleplay/correct/suggest/report) share a single `Evaluator` Port — swap LLM or prompt = "swap the brain", no core changes needed.
61
+
62
+ ## Installation
63
+
64
+ Install via `npx` — works with any IDE, no plugin marketplace required. Run inside your project directory:
65
+
66
+ ```bash
67
+ # Default — auto-detect installed IDEs and install for each one found
68
+ npx -y @tencent-rtc/trtc-agent-skills@latest add
69
+
70
+ # Force install for every supported IDE
71
+ npx -y @tencent-rtc/trtc-agent-skills@latest add --ide all
72
+
73
+ # Install only for one specific IDE
74
+ npx -y @tencent-rtc/trtc-agent-skills@latest add --ide cursor
75
+
76
+ # Wipe a previous install before re-installing
77
+ npx -y @tencent-rtc/trtc-agent-skills@latest add --clean
78
+ ```
79
+
80
+ ## Trigger keywords
81
+
82
+ - "AI oral coach" / "AI English coach" / "speaking coach"
83
+ - "oral coach" / "english tutor bot" / "speaking practice"
84
+ - "TRTC + oral coach" / "TRTC + speaking practice"
85
+ - "帮我搭个 AI 英语口语陪练" / "AI口语陪练"
86
+
87
+ ## Directory structure
88
+
89
+ ```
90
+ ai-oral-coach/
91
+ ├── SKILL.md # Agent execution SOP (lean)
92
+ ├── README.md # English (main)
93
+ ├── README.zh-CN.md # Chinese
94
+ ├── README.ja.md # Japanese
95
+ ├── triggers.yaml # Trigger word registry
96
+ ├── start.sh # Bootstrap (venv + deps + FastAPI:8000)
97
+ ├── capabilities/ # Atomic capabilities (shipped with repo, auto-mounted)
98
+ │ ├── conversation-core/ # Skeleton: FastAPI + voice pipeline (shared with AI CS)
99
+ │ ├── scenario-roleplay/ # Scene roleplay composer
100
+ │ ├── quick-correct/ # Per-sentence correction
101
+ │ ├── reply-suggestion/ # Conversation hints
102
+ │ ├── ability-report/ # 4-dimension report
103
+ │ └── custom-learning-kb/ # External KB adapter (Dify/Coze)
104
+ ├── auto_adapters/ # Path B: API integration code templates (headless, no UI)
105
+ │ ├── manifest.yaml
106
+ │ ├── web/ # JS/TS oral-coach-client.js
107
+ │ ├── python/ # Python coach_client.py
108
+ │ └── integration_templates/ # L3 fallback + KB spec
109
+ ├── scenarios/speaking-coach/
110
+ │ ├── recipe.yaml # Path A default assembly
111
+ │ └── ui/ # 3-screen SPA (coach.html/i18n.js/tokens.css)
112
+ ├── scripts/
113
+ │ ├── verify-credentials.py
114
+ │ └── add-capability.py
115
+ └── references/
116
+ ├── evaluator-port.md
117
+ └── design-specs.md
118
+ ```
119
+
120
+ ## FAQ
121
+
122
+ | Issue | Solution |
123
+ |-------|----------|
124
+ | Key verification failed | Go back and double-check each key value |
125
+ | Port 8000 is in use | Use a different port (`--port 8080`) or free port 8000 |
126
+ | Python version too low | Install Python 3.9+ from python.org |
127
+ | Browser shows blank page | Hard refresh: `Cmd+Shift+R` (Mac) / `Ctrl+Shift+R` (Windows) |
128
+ | Want to connect your own teaching materials | Re-run and choose Path B, opt in custom-learning-kb |
129
+
130
+ ## Contact Us
131
+
132
+ Need technical support or enterprise pricing? Submit your contact information at [trtc.io/contact](https://trtc.io/contact) and our team will get back to you shortly.
@@ -0,0 +1,131 @@
1
+ # AI 口语陪练 Skill
2
+
3
+ > 基于腾讯云 TRTC Conversational AI 构建 AI 英语口语陪练 —— 零代码、voice-first。两条路径均由 Agent 全程驱动:你只管说话,其余交给 Agent。
4
+
5
+ ## Demo
6
+
7
+ https://github.com/user-attachments/assets/9e586749-d810-4c5a-bb27-356a3b74d486
8
+
9
+ ## 关于 Tencent RTC
10
+
11
+ [Tencent RTC](https://trtc.io)(实时音视频通信)为全球数千家企业提供实时音频、视频和对话式 AI 能力,全球边缘网络覆盖 200+ 国家和地区,端到端延迟低于 300ms。
12
+
13
+ **Conversational AI** 能力让开发者可以构建能听、能理解、能自然回应的语音智能体 —— 特别适合语言学习、口语练习和互动教学场景。
14
+
15
+ ## 这是什么?
16
+
17
+ 一个开箱即用的 Skill,把「用 TRTC 搭建 AI 英语口语陪练」打包成 Agent 全程驱动的工作流:
18
+
19
+ ```
20
+ 你(在 IDE 的 AI 聊天窗口里):
21
+ "帮我搭个 AI 英语口语陪练"
22
+
23
+ AI(全程自动处理):
24
+ 1. 检查运行环境
25
+ 2. 让你选快速体验还是集成到自己的系统
26
+ 3. 一步步带你配 3 把钥匙(云服务凭据)
27
+ 4. 安装依赖、装配教练能力
28
+ 5. 启动服务并给你浏览器入口地址
29
+
30
+ 你全程不用打开终端、不用手动跑脚本。
31
+ ```
32
+
33
+ ## 两种开始方式
34
+
35
+ | 模式 | 适合谁 | 你能拿到什么 | 你需要做的 |
36
+ |------|--------|-------------|-----------|
37
+ | **快速体验** | 想先看看效果的人 | 完整的三屏 SPA(场景陪练 + 单句纠正 + 接话建议 + 4维报告) | 配 3 把钥匙 |
38
+ | **集成到我的系统** | 已有 App,想接入后端能力 | 后端 API 接口 + 集成示例(不生成 UI) | 配 3 把钥匙 + 选择教练能力 |
39
+
40
+ ## 3 把钥匙是什么?
41
+
42
+ 要让教练开口说话,需要配 3 个云服务凭据:
43
+
44
+ | 钥匙 | 用途 | 在哪里获取 |
45
+ |------|------|-----------|
46
+ | 1: TRTC 应用凭据 | 教练的语音通道 | https://console.trtc.io/?quickclaim=engine_trial |
47
+ | 2: 腾讯云 API 密钥 | 后台权限(和 TRTC 同一套登录,不用重新注册) | https://console.tencentcloud.com/cam/capi |
48
+ | 3: LLM API Key | 教练的"大脑"——听懂你、纠正你、出报告 | 你的 AI 服务商(OpenAI、DeepSeek 等) |
49
+
50
+ ## 教练有哪些能力?
51
+
52
+ | 能力 | 说明 | 快速体验 | 集成模式 |
53
+ |------|------|:---:|:---:|
54
+ | 场景角色扮演 | 场景×难度×风格 → 动态角色对话 | ✅ 默认安装 | 🔘 可选 |
55
+ | 单句纠正 | 逐句口语风格纠正 | ✅ 默认安装 | 🔘 可选 |
56
+ | 接话建议 | 对话接续提示 | ✅ 默认安装 | 🔘 可选 |
57
+ | 能力报告 | 4维分析报告(中英双语) | ✅ 默认安装 | 🔘 可选 |
58
+ | 自有知识库 | 接入你自己的教研内容(Dify/Coze) | ❌ | 🔘 可选 |
59
+
60
+ > 💡 评估类能力(角色扮演/纠正/建议/报告)共用一个 `Evaluator` Port —— 换 LLM 或 prompt 即「换大脑」,不改骨架代码。
61
+
62
+ ## 安装
63
+
64
+ 通过 `npx` 安装,支持所有主流 IDE,在项目目录下运行:
65
+
66
+ ```bash
67
+ # 默认 —— 自动检测已安装的 IDE 并逐一安装
68
+ npx -y @tencent-rtc/trtc-agent-skills@latest add
69
+
70
+ # 强制安装所有支持的 IDE
71
+ npx -y @tencent-rtc/trtc-agent-skills@latest add --ide all
72
+
73
+ # 只安装某一个 IDE
74
+ npx -y @tencent-rtc/trtc-agent-skills@latest add --ide cursor
75
+
76
+ # 清除旧安装后重新安装
77
+ npx -y @tencent-rtc/trtc-agent-skills@latest add --clean
78
+ ```
79
+
80
+ ## 触发关键词
81
+
82
+ - "AI口语陪练" / "AI英语陪练" / "口语教练"
83
+ - "oral coach" / "english tutor" / "speaking practice"
84
+ - "帮我搭个英语口语陪练" / "用 TRTC 做个口语教练"
85
+
86
+ ## 目录结构
87
+
88
+ ```
89
+ ai-oral-coach/
90
+ ├── SKILL.md # Agent 执行 SOP(精炼版)
91
+ ├── README.md # 英文版(主 README)
92
+ ├── README.zh-CN.md # 本文件
93
+ ├── README.ja.md # 日文版
94
+ ├── triggers.yaml # 触发词注册文件
95
+ ├── start.sh # 启动脚本(建 venv + 装依赖 + 起 FastAPI:8000)
96
+ ├── capabilities/ # 能力原子化(随仓库发布,core 预接线自动挂载)
97
+ │ ├── conversation-core/ # 骨架:FastAPI + 语音管线(与 AI 客服共享)
98
+ │ ├── scenario-roleplay/ # 场景角色扮演
99
+ │ ├── quick-correct/ # 单句纠正
100
+ │ ├── reply-suggestion/ # 接话建议
101
+ │ ├── ability-report/ # 4维能力报告
102
+ │ └── custom-learning-kb/ # 外部知识库适配(Dify/Coze)
103
+ ├── auto_adapters/ # Path B:API 接入代码模板(无 UI,纯代码)
104
+ │ ├── manifest.yaml
105
+ │ ├── web/ # JS/TS oral-coach-client.js
106
+ │ ├── python/ # Python coach_client.py
107
+ │ └── integration_templates/ # L3 降级指南 + KB 规范
108
+ ├── scenarios/speaking-coach/
109
+ │ ├── recipe.yaml # Path A 默认装配清单
110
+ │ └── ui/ # 三屏 SPA(coach.html / i18n.js / tokens.css)
111
+ ├── scripts/
112
+ │ ├── verify-credentials.py
113
+ │ └── add-capability.py
114
+ └── references/
115
+ ├── evaluator-port.md
116
+ └── design-specs.md
117
+ ```
118
+
119
+ ## 常见问题
120
+
121
+ | 问题 | 解决方案 |
122
+ |------|---------|
123
+ | 密钥校验失败 | 回到密钥配置步骤,逐一检查每个 key 的值 |
124
+ | 8000 端口被占用 | 换个端口(`--port 8080`)或释放 8000 端口 |
125
+ | Python 版本太低 | 从 python.org 安装 Python 3.9+ |
126
+ | 启动后浏览器白屏 | 强制刷新:`Cmd+Shift+R`(Mac)/ `Ctrl+Shift+R`(Windows) |
127
+ | 想接入自己的教材内容 | 重走流程选"集成到我的系统",勾选 custom-learning-kb |
128
+
129
+ ## 联系我们
130
+
131
+ 需要技术支持或企业方案?通过 [trtc.io/contact](https://trtc.io/contact) 提交联系方式,我们的团队会尽快与您联系。