Skip to main content
This guide covers installing Tambo AI in your project. Choose the installation method that matches your setup.

Package managers

Install the React SDK using your preferred package manager:
npm install @tambo-ai/react zod

Packages

@tambo-ai/react

The main React SDK. Provides hooks, providers, and utilities for building AI-powered applications.

@tambo-ai/client

Framework-agnostic core client. Used internally by @tambo-ai/react but can be used standalone for other frameworks (Vue, Svelte, etc.).
  • Version: 1.0.0
  • Published as: @tambo-ai/client on npm
  • License: MIT
You only need to install this directly if you’re building a custom framework integration.

Peer dependencies

Tambo requires React 18 or 19:
npm install react@^18.0.0
# or
npm install react@^19.0.0
Tambo does not require react-dom, making it compatible with React Native.

Schema validation

Zod is required for defining component prop schemas:
npm install zod@^3.25.76
# or for new projects
npm install zod@^4
Both Zod 3 (^3.25.76) and Zod 4 (^4) are supported. We recommend Zod 4 for new projects.

MCP features (optional)

If you use MCP features (Model Context Protocol) via @tambo-ai/react/mcp, install:
npm install zod-to-json-schema@^3.25.1
The @modelcontextprotocol/sdk is bundled with @tambo-ai/react and does not need to be installed separately.

CLI tool

The Tambo CLI is used for project initialization, component generation, and development utilities. You can run it directly with npx (no installation required):
npx tambo init
npx tambo add graph
npx tambo list
Or install it globally:
npm install -g tambo

CLI commands

  • tambo init - Initialize Tambo in your project
  • tambo add <component> - Add components from the registry
  • tambo list - List available components
  • tambo create-app <name> - Create a new Tambo app
  • tambo update - Update existing components
  • tambo upgrade - Upgrade Tambo dependencies

TypeScript

Tambo is written in TypeScript and includes full type definitions. TypeScript 5.9+ is recommended. Add TypeScript to your project if you haven’t already:
npm install -D typescript @types/react

Environment variables

Add your Tambo API key to .env.local:
.env.local
NEXT_PUBLIC_TAMBO_API_KEY=your_api_key_here
Get your API key by running:
npx tambo init
The NEXT_PUBLIC_ prefix exposes the key to the browser. This is safe for Tambo Cloud - the key is scoped to your project.

Verification

Verify your installation by checking the package versions:
npm list @tambo-ai/react
npm list zod
Expected output:
@tambo-ai/react@1.1.0
zod@4.x.x

Framework support

Tambo works out of the box with Next.js 13+ (App Router):
app/layout.tsx
"use client";

import { TamboProvider } from "@tambo-ai/react";

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <TamboProvider
          apiKey={process.env.NEXT_PUBLIC_TAMBO_API_KEY}
          userKey="demo-user"
        >
          {children}
        </TamboProvider>
      </body>
    </html>
  );
}

Vite

For Vite projects, wrap your app in main.tsx:
src/main.tsx
import { TamboProvider } from "@tambo-ai/react";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App";

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <TamboProvider
      apiKey={import.meta.env.VITE_TAMBO_API_KEY}
      userKey="demo-user"
    >
      <App />
    </TamboProvider>
  </StrictMode>
);

React Native

Tambo is compatible with React Native since it doesn’t depend on react-dom:
App.tsx
import { TamboProvider } from "@tambo-ai/react";
import { View } from "react-native";

export default function App() {
  return (
    <TamboProvider
      apiKey={process.env.TAMBO_API_KEY}
      userKey="demo-user"
    >
      <View>{/* Your app */}</View>
    </TamboProvider>
  );
}

Troubleshooting

Module not found: @tambo-ai/react

Make sure you installed the package:
npm install @tambo-ai/react

Type errors with Zod schemas

Ensure you’re using Zod 3.25.76 or higher, or Zod 4:
npm install zod@latest

MCP features not working

If you use @tambo-ai/react/mcp, install the optional dependency:
npm install zod-to-json-schema@^3.25.1

Peer dependency warnings

If you see peer dependency warnings, install the required peer dependencies:
npm install react@^18.0.0 zod@^3.25.76

Next steps

Quickstart

Build your first Tambo app

Provider configuration

Configure TamboProvider options

Register components

Learn about component registration

API reference

Explore hooks and APIs

Build docs developers (and LLMs) love