cloudbase-agent-ts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCloudbase Agent (TypeScript)
Cloudbase Agent (TypeScript)
TypeScript SDK for deploying AI agents as HTTP services using the AG-UI protocol.
Note: This skill is for TypeScript/JavaScript projects only.
一款基于AG-UI协议、用于将AI Agent部署为HTTP服务的TypeScript SDK。
注意: 本技能仅适用于TypeScript/JavaScript项目。
When to use this skill
适用场景
Use this skill for AI agent development when you need to:
- Deploy AI agents as HTTP services with AG-UI protocol support
- Build agent backends using LangGraph or LangChain frameworks
- Create custom agent adapters implementing the AbstractAgent interface
- Understand AG-UI protocol events and message streaming
- Build web UI clients that connect to AG-UI compatible agents
- Build WeChat Mini Program UIs for AI agent interactions
Do NOT use for:
- Simple AI model calling without agent capabilities (use skills)
ai-model-* - CloudBase cloud functions (use skill)
cloud-functions - CloudRun backend services without agent features (use skill)
cloudrun-development
当你需要进行AI Agent开发时,可使用本技能:
- 部署支持AG-UI协议的AI Agent作为HTTP服务
- 使用LangGraph或LangChain框架构建Agent后端
- 构建实现AbstractAgent接口的自定义Agent适配器
- 理解AG-UI协议事件与消息流
- 构建可连接至兼容AG-UI的Agent的Web UI客户端
- 构建用于AI Agent交互的微信小程序UI
请勿用于:
- 无Agent能力的简单AI模型调用(请使用类技能)
ai-model-* - CloudBase云函数(请使用技能)
cloud-functions - 无Agent功能的CloudRun后端服务(请使用技能)
cloudrun-development
How to use this skill (for a coding agent)
如何使用本技能(适用于代码Agent)
-
Choose the right adapter
- Use LangGraph adapter for stateful, graph-based workflows
- Use LangChain adapter for chain-based agent patterns
- Build custom adapter for specialized agent logic
-
Deploy the agent server
- Use to expose HTTP endpoints
@cloudbase/agent-server - Configure CORS, logging, and observability as needed
- Deploy to CloudRun or any Node.js hosting environment
- Use
-
Build the UI client
- Use for web applications
@ag-ui/client - Use for WeChat Mini Programs
@cloudbase/agent-ui-miniprogram - Connect to the agent server's or
/send-messageendpoints/agui
- Use
-
Follow the routing table below to find detailed documentation for each task
-
选择合适的适配器
- 对于有状态的基于图的工作流,使用LangGraph适配器
- 对于基于链的Agent模式,使用LangChain适配器
- 针对特殊Agent逻辑,构建自定义适配器
-
部署Agent服务器
- 使用暴露HTTP端点
@cloudbase/agent-server - 根据需要配置CORS、日志和可观测性
- 部署至CloudRun或任何Node.js托管环境
- 使用
-
构建UI客户端
- 对于Web应用,使用
@ag-ui/client - 对于微信小程序,使用
@cloudbase/agent-ui-miniprogram - 连接至Agent服务器的或
/send-message端点/agui
- 对于Web应用,使用
-
参考下方的路由表,获取各任务的详细文档
Routing
路由表
| Task | Read |
|---|---|
| Deploy agent server (@cloudbase/agent-server) | server-quickstart |
| Use LangGraph adapter | adapter-langgraph |
| Use LangChain adapter | adapter-langchain |
| Build custom adapter | adapter-development |
| Understand AG-UI protocol | agui-protocol |
| Build UI client (Web or Mini Program) | ui-clients |
| Deep-dive @cloudbase/agent-ui-miniprogram | ui-miniprogram |
| 任务 | 文档链接 |
|---|---|
| 部署Agent服务器(@cloudbase/agent-server) | server-quickstart |
| 使用LangGraph适配器 | adapter-langgraph |
| 使用LangChain适配器 | adapter-langchain |
| 构建自定义适配器 | adapter-development |
| 理解AG-UI协议 | agui-protocol |
| 构建UI客户端(Web或小程序) | ui-clients |
| 深入了解@cloudbase/agent-ui-miniprogram | ui-miniprogram |
Quick Start
快速开始
typescript
import { run } from "@cloudbase/agent-server";
import { LanggraphAgent } from "@cloudbase/agent-adapter-langgraph";
run({
createAgent: () => ({ agent: new LanggraphAgent({ workflow }) }),
port: 9000,
});typescript
import { run } from "@cloudbase/agent-server";
import { LanggraphAgent } from "@cloudbase/agent-adapter-langgraph";
run({
createAgent: () => ({ agent: new LanggraphAgent({ workflow }) }),
port: 9000,
});