在应用中集成 AI Agent
使用 CloudBase Agent SDK(TypeScript / Python)构建和部署 AI Agent 服务,基于 AG-UI 协议打通 Agent 与 Web / 小程序前端
如何使用
查看如何使用Skill了解详细的使用方法。
测试 Skill
你可以使用以下提示词来测试:
- "帮我用 CloudBase Agent SDK 搭建一个支持流式输出的 AI Agent 服务"
- "把 LangGraph 的 Agent 通过 CloudBase Agent SDK 部署到云托管"
- "帮我实现一个 Web 前 端,接入 AG-UI 协议展示 Agent 的流式回复"
使用 AI 构建和部署 Agent 服务
安装与查看
如果需要安装全部 CloudBase Skills,可执行:
npx skills add tencentcloudbase/cloudbase-skills
如果只安装当前 Skill,可执行:
npx skills add https://github.com/tencentcloudbase/skills --skill cloudbase-agent
当前 Skill 在线查看: cloudbase-agent
Skill 规则原文
查看 SKILL.md 原文
## Sibling skills (local only)
Sibling CloudBase skills ship beside this skill. Use local relative paths such as `../auth-tool-cloudbase/SKILL.md`.
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do **not** HTTP-fetch remote skill or protocol markdown into the agent context.
# CloudBase Agent SDK — Language Router
This skill supports **TypeScript** and **Python**. Determine the language first, then read the corresponding skill file. If the user does not explicitly specify which programming language to use, TypeScript must be enforced.
## Step 1: Determine Language
| Signal | Language |
|--------|----------|
| User says "TypeScript", "Node.js", "TS" | **TypeScript** |
| User says "Python", "FastAPI", "pip" | **Python** |
| No clear signal | **TypeScript** |
## Step 2: Read the Language-Specific Skill File
- **TypeScript** → Read [ts/skill.md](https://cnb.cool/tencent/cloud/cloudbase/CloudBase-AI-Toolkit/-/git/raw/main/config/source/skills/cloudbase-agent/ts/skill.md) — then follow ALL instructions in that file
- **Python** → Read [py/skill.md](https://cnb.cool/tencent/cloud/cloudbase/CloudBase-AI-Toolkit/-/git/raw/main/config/source/skills/cloudbase-agent/py/skill.md) — then follow ALL instructions in that file
**⚠️ IMPORTANT:** After determining the language, you MUST read the corresponding skill file above. Do NOT proceed with any code generation until you have read it. Each language skill file is self-contained with its own quick start, routing table, deployment instructions, and adapter guides.
参考文件
当前 Skill 的详细规则文件(源仓库 CNB 镜像,国内可直连):
py/adapter-coze.mdpy/adapter-development.mdpy/adapter-langgraph.mdpy/agent-deployment.mdpy/authentication.mdpy/references/observability.mdpy/references/recipes.mdpy/references/server.mdpy/references/storage.mdpy/references/tools.mdpy/server-quickstart.mdpy/skill.mdts/adapter-development.mdts/adapter-langchain.mdts/adapter-langgraph.mdts/agent-deployment.mdts/agui-protocol.mdts/server-quickstart.mdts/skill.mdts/ui-clients.mdts/ui-miniprogram.md