tambo

tambo-aiMIT活跃维护

面向 React 的生成式 UI SDK,让 AI Agent 根据对话内容动态渲染界面组件,适合构建智能助手和聊天式交互应用。

Generative UI SDK for React

web-v0.136.0发布于 2026-10-09 16:08 UTC11,223star574fork同步于 2026-11-10 17:29 UTC

怎么上手

由 README 提炼,执行前请确认
npm create tambo-app my-tambo-app
cd my-tambo-app
npm run dev
硬件要求按 README 说明

README 未说明;后端以 Docker 自托管方式运行,未提及 GPU 或显存要求

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

面向 React 的开源生成式 UI 工具包,让 AI 智能体按 Zod schema 选择并渲染你的组件

面向 React 的生成式 UI SDK,让 AI Agent 根据对话内容动态渲染界面组件,适合构建智能助手和聊天式交互应用。

核心能力

  • 用 Zod schema 注册组件,schema 自动转成 LLM 工具定义
  • 组件 props 随 LLM 生成流式下发,内置取消、错误恢复与重连
  • 支持生成式组件与可持久更新的 interactable 组件
  • 内置完整 MCP 协议支持,可接 Linear、Slack 或自建 MCP 服务
  • 可声明浏览器端本地工具,让 AI 直接调用前端函数

容易踩的坑

Tambo Cloud 已停止新注册并于 2026 年 10 月 31 日关停,需按 SELF-HOSTING.md 自托管后端;TamboProvider 必须提供 userKey 或 userToken 之一来标识会话归属;需自备 OpenAI、Anthropic、Gemini 等提供商的 API key

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本web-v0.136.0
  1. web-v0.136.0web: v0.136.0最新正式版2026-10-09 · 2026-10-09 16:08 UTC

    0.136.0 (2026-10-08)

    Features

    • cloud: prepare Tambo Cloud shutdown (#3027) (0bd450b)
    • web: gate new signups behind DISABLE_NEW_SIGNUPS (#3031) (524d917)

    Bug Fixes

    Miscellaneous Chores

    • deps: update dependency js-yaml to v4.3.0 [security] (#2998) (bc30cd7)
  2. react-v1.4.0react: v1.4.02026-10-08 · 2026-10-08 22:19 UTC
    查看更新说明

    1.4.0 (2026-10-08)

    Features

    Bug Fixes

  3. client-v1.3.0client: v1.3.02026-10-08 · 2026-10-08 20:17 UTC
    查看更新说明

    1.3.0 (2026-10-08)

    Features

    Bug Fixes

  4. tambo-v0.56.2tambo: v0.56.22026-06-16 · 2026-06-16 22:36 UTC
    查看更新说明

    0.56.2 (2026-06-16)

    Miscellaneous Chores

    • deps: bump ora from 9.0.0 to 9.4.0 (#2909) (6716dec)
    • deps: bump the npm_and_yarn group across 1 directory with 2 updates (#2953) (49a0b35)
  5. web-v0.135.1web: v0.135.12026-06-16 · 2026-06-16 22:12 UTC
    查看更新说明

    0.135.1 (2026-06-16)

    Miscellaneous Chores

    • deps: bump dompurify from 3.4.0 to 3.4.9 in the npm_and_yarn group across 1 directory (#2956) (1bf986a)
    • deps: bump the npm_and_yarn group across 1 directory with 2 updates (#2953) (49a0b35)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Tambo Cloud is shutting down. New signups are closed. Tambo Cloud keeps running until October 31, 2026, after which the hosted API stops responding; user data is deleted November 30, 2026. Read the announcement. Tambo is open source and self-hostable: see SELF-HOSTING.md to keep running it yourself. The team is now building Charming, a collaborative cloud for apps built with any AI agent.


    Table of Contents

    What is Tambo?

    Tambo is a React toolkit for building agents that render UI (also known as generative UI).

    Register your components with Zod schemas. The agent picks the right one and streams the props so users can interact with them. "Show me sales by region" renders your <Chart>. "Add a task" updates your <TaskBoard>.

    Get started in 5 minutes →

    https://github.com/user-attachments/assets/8381d607-b878-4823-8b24-ecb8053bef23

    What's Included

    Tambo is a fullstack solution for adding generative UI to your app. You get a React SDK plus a backend that handles conversation state and agent execution.

    1. Agent included — Tambo runs the LLM conversation loop for you. Bring your own API key (OpenAI, Anthropic, Gemini, Mistral, or any OpenAI-compatible provider). Works with agent frameworks like LangChain and Mastra, but they're not required.

    2. Streaming infrastructure — Props stream to your components as the LLM generates them. Cancellation, error recovery, and reconnection are handled for you.

    3. Tambo Cloud or self-host — Cloud is a hosted backend that manages conversation state and agent orchestration. Self-hosted runs the same backend on your infrastructure via Docker.

    Most software is built around a one-size-fits-all mental model. We built Tambo to help developers build software that adapts to users.

    Get Started

    npm create tambo-app my-tambo-app  # auto-initializes git + tambo setup
    cd my-tambo-app
    npm run dev
    

    Tambo Cloud is the hosted backend; new signups are closed and it shuts down October 31, 2026 (announcement). Self-hosted runs on your own infrastructure; see SELF-HOSTING.md.

    Check out the pre-built component library for agent and generative UI primitives:

    https://github.com/user-attachments/assets/6cbc103b-9cc7-40f5-9746-12e04c976dff

    Or fork a template:

    TemplateDescription
    AI Chat with Generative UIChat interface with dynamic component generation
    AI Analytics DashboardAnalytics dashboard with AI-powered visualization

    How It Works

    Tell the AI which components it can use. Zod schemas define the props. These schemas become LLM tool definitions—the agent calls them like functions and Tambo renders the result.

    Generative Components

    Render once in response to a message. Charts, summaries, data visualizations.

    https://github.com/user-attachments/assets/3bd340e7-e226-4151-ae40-aab9b3660d8b

    const components: TamboComponent[] = [
      {
        name: "Graph",
        description: "Displays data as charts using Recharts library",
        component: Graph,
        propsSchema: z.object({
          data: z.array(z.object({ name: z.string(), value: z.number() })),
          type: z.enum(["line", "bar", "pie"]),
        }),
      },
    ];
    

    Interactable Components

    Persist and update as users refine requests. Shopping carts, spreadsheets, task boards.

    https://github.com/user-attachments/assets/12d957cd-97f1-488e-911f-0ff900ef4062

    const InteractableNote = withInteractable(Note, {
      componentName: "Note",
      description: "A note supporting title, content, and color modifications",
      propsSchema: z.object({
        title: z.string(),
        content: z.string(),
        color: z.enum(["white", "yellow", "blue", "green"]).optional(),
      }),
    });
    

    Docs: generative components, interactable components

    The Provider

    Wrap your app with TamboProvider. You must provide either userKey or userToken to identify the thread owner.

    <TamboProvider
      apiKey={process.env.NEXT_PUBLIC_TAMBO_API_KEY!}
      userKey={currentUserId}
      components={components}
    >
      <Chat />
      <InteractableNote id="note-1" title="My Note" content="Start writing..." />
    </TamboProvider>
    

    Use userKey for server-side or trusted environments. Use userToken (OAuth access token) for client-side apps where the token contains the user identity. See User Authentication for details.

    Docs: provider options

    Hooks

    useTambo() is the primary hook — it gives you messages, streaming state, and thread management. useTamboThreadInput() handles user input and message submission.

    const { messages, isStreaming } = useTambo();
    const { value, setValue, submit, isPending } = useTamboThreadInput();
    

    Docs: threads and messages, streaming status, full tutorial

    Features

    MCP Integrations

    Connect to Linear, Slack, databases, or your own MCP servers. Tambo supports the full MCP protocol: tools, prompts, elicitations, and sampling.

    import { MCPTransport } from "@tambo-ai/react/mcp";
    
    const mcpServers = [
      {
        name: "filesystem",
        url: "http://localhost:8261/mcp",
        transport: MCPTransport.HTTP,
      },
    ];
    
    <TamboProvider
      apiKey={process.env.NEXT_PUBLIC_TAMBO_API_KEY!}
      userKey={currentUserId}
      components={components}
      mcpServers={mcpServers}
    >
      <App />
    </TamboProvider>;
    

    https://github.com/user-attachments/assets/c7a13915-8fed-4758-be1b-30a60fad0cda

    Docs: MCP integration

    Local Tools

    Sometimes you need functions that run in the browser. DOM manipulation, authenticated fetches, accessing React state. Define them as tools and the AI can call them.

    const tools: TamboTool[] = [
      {
        name: "getWeather",
        description: "Fetches weather for a location",
        tool: async (params: { location: string }) =>
          fetch(`/api/weather?q=${encodeURIComponent(params.location)}`).then((r) =>
            r.json(),
          ),
        inputSchema: z.object({
          location: z.string(),
        }),
        outputSchema: z.object({
          temperature: z.number(),
          condition: z.string(),
          location: z.string(),
        }),
      },
    ];
    
    <TamboProvider
      apiKey={process.env.NEXT_PUBLIC_TAMBO_API_KEY!}
      userKey={currentUserId}
      tools={tools}
      components={components}
    >
      <App />
    </TamboProvider>;
    

    Docs: local tools

    Context, Auth, and Suggestions

    Additional context lets you pass metadata to give the AI better responses. User state, app settings, current page. User authentication passes tokens from your auth provider. Suggestions generates prompts users can click based on what they're doing.

    <TamboProvider
      apiKey={process.env.NEXT_PUBLIC_TAMBO_API_KEY!}
      userToken={userToken}
      contextHelpers={{
        selectedItems: () => ({
          key: "selectedItems",
          value: selectedItems.map((i) => i.name).join(", "),
        }),
        currentPage: () => ({ key: "page", value: window.location.pathname }),
      }}
    />
    
    const { suggestions, accept } = useTamboSuggestions({ maxSuggestions: 3 });
    
    suggestions.map((s) => (
      <button key={s.id} onClick={() => accept(s)}>
        {s.title}
      </button>
    ));
    

    Docs: additional context, user authentication, suggestions

    Supported LLM Providers

    OpenAI, Anthropic, Cerebras, Google Gemini, Mistral, and any OpenAI-compatible provider. Full list. Missing one? Let us know.

    How Tambo Compares

    FeatureTamboVercel AI SDKCopilotKitAssistant UI
    Component selectionAI decides which components to renderManual tool-to-component mappingVia agent frameworks (LangGraph)Chat-focused tool UI
    MCP integrationBuilt-inExperimental (v4.2+)Recently addedRequires AI SDK v5
    Persistent stateful componentsYesNoShared state patternsNo
    Client-side tool executionDeclarative, automaticManual via onToolCallAgent-side onlyNo
    Self-hostableMIT (SDK + backend)Apache 2.0 (SDK only)MITMIT
    Hosted optionTambo CloudNoCopilotKit CloudAssistant Cloud
    Best forFull app UI controlStreaming and tool abstractionsMulti-agent workflowsChat interfaces

    Community

    Join the Discord to chat with other developers and the core team.

    Interested in contributing? Read the Contributing Guide.

    Join the conversation on Twitter and follow @tambo_ai.

    License

    MIT unless otherwise noted. Some workspaces (like apps/api) are Apache-2.0.


    For AI/LLM agents: docs.tambo.co/llms.txt