Chatbots thatknow your docs.
ChatRAG is an open-source Next.js platform for building RAG chatbots. Upload your documents, choose from 100+ models, and run the whole thing on your own infrastructure, free under the MIT license.
Built on Next.js 16, Supabase pgvector and the Vercel AI SDK
AI models through OpenRouter, OpenAI, Anthropic and Gemini
interface languages, from Spanish to Yoruba
license fees, for you or your clients
licensed, so you can fork it, rebrand it and sell what you build
From a folder of files to a chatbot people pay for.
Drop in documents, get a knowledge base
PDFs, Word, Excel, slides and images go in through the dashboard. ChatRAG parses them with LlamaCloud, chunks and embeds them, and stores them in a pgvector HNSW index, so they're searchable seconds later.
The parts you'd spend months building.
Real-time voice
Talk to the knowledge base instead of typing. LiveKit carries the audio, AssemblyAI transcribes, Resemble speaks back, and the text stays in sync word by word.
Read the docsMCP tools with approval
Connect Zapier, n8n or any MCP server. The chatbot proposes a tool call and waits for a person to approve it.
Read the docsImage RAG
Uploaded images get captioned by a vision model and embedded, so a diagram can answer a question.
Read the docsDrive, Notion, Dropbox
Cloud connectors through Nango keep documents synced into the vector store.
Read the docsWeb scraping and search
Index whole sites with Firecrawl, or let the chatbot search the web when your documents fall short.
Read the docsImages, video and 3D
Generate media mid-conversation through fal.ai and Replicate.
Read the docsEmbed anywhere
One script tag puts the chat widget on any site, styled with your colours.
Read the docsAny model
OpenAI, Anthropic, Gemini, DeepSeek and 100+ more through OpenRouter, reasoning models included.
Read the docsOne codebase, two shapes.
One knowledge base, shared by everyone
Single-tenant
Every user chats with the same documents and keeps a private chat history. The right shape for a product docs bot, a support assistant or an AI twin.
- Set up in minutes
- Shared documents, private chats
- One Supabase project
A private workspace for every team
Multi-tenant
Each user or organization gets an isolated knowledge base, enforced by Supabase row-level security. Build your own NotebookLM-style SaaS on top.
- Workspaces with roles and invites
- Isolated documents per tenant
- Subscription tiers and quotas
Built with












Running locally before your coffee cools.
You need Node.js 20.9 or newer, a free Supabase project and an OpenAI key for embeddings. Deploy to Vercel, Fly.io or any server that runs Node.