cloudbase-agent-ts

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cloudbase 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
    ai-model-*
    skills)
  • CloudBase cloud functions (use
    cloud-functions
    skill)
  • CloudRun backend services without agent features (use
    cloudrun-development
    skill)
当你需要进行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)

  1. 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
  2. Deploy the agent server
    • Use
      @cloudbase/agent-server
      to expose HTTP endpoints
    • Configure CORS, logging, and observability as needed
    • Deploy to CloudRun or any Node.js hosting environment
  3. Build the UI client
    • Use
      @ag-ui/client
      for web applications
    • Use
      @cloudbase/agent-ui-miniprogram
      for WeChat Mini Programs
    • Connect to the agent server's
      /send-message
      or
      /agui
      endpoints
  4. Follow the routing table below to find detailed documentation for each task
  1. 选择合适的适配器
    • 对于有状态的基于图的工作流,使用LangGraph适配器
    • 对于基于链的Agent模式,使用LangChain适配器
    • 针对特殊Agent逻辑,构建自定义适配器
  2. 部署Agent服务器
    • 使用
      @cloudbase/agent-server
      暴露HTTP端点
    • 根据需要配置CORS、日志和可观测性
    • 部署至CloudRun或任何Node.js托管环境
  3. 构建UI客户端
    • 对于Web应用,使用
      @ag-ui/client
    • 对于微信小程序,使用
      @cloudbase/agent-ui-miniprogram
    • 连接至Agent服务器的
      /send-message
      /agui
      端点
  4. 参考下方的路由表,获取各任务的详细文档

Routing

路由表

TaskRead
Deploy agent server (@cloudbase/agent-server)server-quickstart
Use LangGraph adapteradapter-langgraph
Use LangChain adapteradapter-langchain
Build custom adapteradapter-development
Understand AG-UI protocolagui-protocol
Build UI client (Web or Mini Program)ui-clients
Deep-dive @cloudbase/agent-ui-miniprogramui-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-miniprogramui-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,
});