返回 Skill 列表
extension
分类: 内容与媒体无需 API Key

cloudbase-agent-ts

使用Cloudbase Agent (TypeScript)构建和部署AI代理,这是一个实现AG-UI协议的TypeScript SDK。在以下情况下使用:(1) 使用@cloudbase/agent-server部署代理服务器,(2) 使用带有ClientStateAnnotation的LangGraph适配器,(3) 使用带有clientTools()的LangChain适配器,(4) 构建实现AbstractAgent接口的自定义适配器,(5) 了解AG-UI协议事件,(6) 使用@ag-ui/client构建Web UI客户端,(7) 使用@cloudbase/agent-ui-miniprogram构建微信小程序UI。

person作者: jakexiaohubgithub

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.

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)

How to use this skill (for a coding 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

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 |

Quick Start

import { run } from "@cloudbase/agent-server";
import { LanggraphAgent } from "@cloudbase/agent-adapter-langgraph";

run({
  createAgent: () => ({ agent: new LanggraphAgent({ workflow }) }),
  port: 9000,
});