Using an AI coding assistant? Read @AGENTS.md for agent-specific instructions.
Thanks for helping! This guide covers development setup and workflow expectations.
Looking to self-host Tambo? See OPERATORS.md for deployment instructions.
- Node.js >= 22
- npm >= 11
- Docker (for either database option below)
git clone https://github.com/tambo-ai/tambo.git
cd tambo
npm installcp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.env.local
cp packages/db/.env.example packages/db/.envChoose one of these options:
Supabase provides PostgreSQL with additional features. The .env.example files are pre-configured for this option.
# Install Supabase CLI if you haven't
npm install -g supabase
# Start Supabase (includes PostgreSQL on port 54322)
supabase startThe default DATABASE_URL in .env.example files already points to Supabase:
DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres
If you prefer plain PostgreSQL without Supabase:
# One-time setup (creates docker.env)
./scripts/cloud/tambo-setup.sh
# Start PostgreSQL container
docker compose --env-file docker.env up postgres -dThen update DATABASE_URL in all three env files:
DATABASE_URL=postgresql://postgres:postgres@localhost:5433/tamboUse the password from your docker.env file.
Note: Don't use
tambo-start.shfor local development - it starts all services in Docker, which conflicts with running apps locally vianpm run dev:cloud.
npm run db:migrate -w packages/dbFor Tambo Cloud (web dashboard + API):
npm run dev:cloud- Web App: http://localhost:8260
- API: http://localhost:8261
For the React SDK framework (showcase + docs):
npm run devFor React SDK development (SDK in watch mode + showcase):
npm run dev:sdkThis runs the React SDK in watch mode (automatically rebuilds on changes) alongside the showcase app, making it easy to develop and test SDK changes.
- Start the dev servers:
npm run dev:cloud - Visit http://localhost:8260 and sign in
- Create a project and generate an API key
- Add to
apps/web/.env.local:NEXT_PUBLIC_TAMBO_API_KEY=your_key - Verify with http://localhost:8260/internal/smoketest
# Development
npm run dev:cloud # Start web + API for Tambo Cloud
npm run dev # Start showcase + docs for React SDK
npm run dev:sdk # Start React SDK watch mode + showcase
# Quality (required before PRs)
npm run lint
npm run check-types
npm test
# Database
npm run db:generate -w packages/db # Generate migrations
npm run db:migrate -w packages/db # Apply migrations
npm run db:studio -w packages/db # Open Drizzle Studio
# React SDK
npm run build:sdk # One-time build of React SDK
npm run dev:sdk # SDK watch mode + showcase (for SDK development)| Variable | Location | Description |
|---|---|---|
DATABASE_URL |
packages/db/.env, apps/api/.env, apps/web/.env.local |
PostgreSQL connection string |
API_KEY_SECRET |
apps/api/.env, apps/web/.env.local |
API key encryption secret |
PROVIDER_KEY_SECRET |
apps/api/.env, apps/web/.env.local |
Provider key encryption |
NEXTAUTH_SECRET |
apps/web/.env.local |
NextAuth.js session secret |
NEXTAUTH_URL |
apps/web/.env.local |
http://localhost:8260 |
| Variable | Location | Description |
|---|---|---|
OPENAI_API_KEY |
apps/api/.env |
To allow Tambo Cloud to use AI features |
FALLBACK_OPENAI_API_KEY |
apps/api/.env |
Used as a fallback API key for OpenAI if others are not set |
GOOGLE_CLIENT_ID |
apps/web/.env.local |
Google App Client ID for OAuth login (https://console.cloud.google.com/) |
GOOGLE_CLIENT_SECRET |
apps/web/.env.local |
As above |
GITHUB_CLIENT_ID |
apps/web/.env.local |
GitHub App Client ID for OAuth login (https://github.com/settings/developers) |
GITHUB_CLIENT_SECRET |
apps/web/.env.local |
As above |
| Directory | Description |
|---|---|
apps/web |
Next.js web application |
apps/api |
NestJS API server |
packages/db |
Drizzle schema + migrations |
packages/core |
Shared utilities (no DB access) |
packages/backend |
LLM/agent helpers |
react-sdk/ |
React SDK (@tambo-ai/react) |
cli/ |
CLI tools |
showcase/ |
Demo application |
docs/ |
Documentation site |
For Supabase:
- Verify Supabase is running:
supabase status - Check
DATABASE_URLuses port54322 - Restart if needed:
supabase stop && supabase start
For Docker PostgreSQL:
- Verify container is running:
docker compose --env-file docker.env ps postgres - Check
DATABASE_URLuses port5433(not5432) - Ensure password in
DATABASE_URLmatchesdocker.env
Stop conflicting services or modify ports in docker.env / docker-compose.yml.
rm -rf node_modules package-lock.json
npm install- Pick or file an issue, branch from
main - Build the feature/fix with tests
- Run
npm run lint && npm run check-types && npm test - Open a PR with a Conventional Commit title
<type>(scope): description
feat(scope): ...→ Minor releasefix|perf|refactor(scope): ...→ Patch release- Breaking change → add
!:feat(scope)!: ...
Scopes: api, web, core, cli, docs, react-sdk
- Conventional Commit title
- Linked issue or context
- Tests added/updated
- Docs updated (if user-facing)
- Screen recording attached (if visual change)
- All checks pass locally
| Document | Purpose |
|---|---|
| AGENTS.md | Coding standards, architecture, naming conventions |
| OPERATORS.md | Self-hosting and deployment |
| RELEASING.md | Release workflow |
- Discord: https://discord.gg/dJNvPEHth6
- Docs: https://docs.tambo.co
Thanks for contributing!