13 Best Next.js AI Chatbot Templates 2026 (Free + Premium)
Looking for a Next.js AI chatbot template that ships with multi-provider LLM support, streaming responses, and real persistence — not just a static demo? These 13 picks span the full AI chatbot ecosystem: Vercel’s 20.4k-star official AI Chatbot, the 88k-star NextChat, 77k-star LobeChat, 33k-star Chatbot UI, plus premium AI-SaaS templates like Achromatic ($180) with credits-based billing built in. Every demo and repo verified May 2026.
A 2026-grade Next.js AI chatbot template handles seven load-bearing surfaces: streaming chat UI with useChat or equivalent, multi-provider LLM access (OpenAI, Anthropic, Google Gemini, xAI, local Ollama), conversation persistence (Postgres / Supabase / Vercel KV), authentication for per-user history, tool calling and function execution, file upload + RAG (retrieval augmented generation), and platform-specific extras like MCP (Model Context Protocol) and Vercel AI Gateway integration. Building all of that from scratch is weeks of work — these templates ship most of it as the starting point.
We’ve grouped the 13 picks below into premium Next.js AI SaaS templates (Achromatic, Shipped, Magic UI Pro AI Agent) and free / open-source AI chatbot templates (Vercel AI Chatbot, NextChat, LobeChat, Chatbot UI, Morphic, LangChain Next.js Template, Supabase Chatbot, AI SDK Reasoning Starter, Vercel chat-sdk demo, Humanloop starter). Both standalone chatbot apps (NextChat, LobeChat) and developer-extensible templates (Vercel AI Chatbot, LangChain) included.
Related reading: Next.js SaaS templates & boilerplates (for full SaaS scaffolding around your chatbot), shadcn/ui AI chat templates, Next.js landing page templates, and forthcoming Next.js starter kits roundup.
Quick Picks
- Best free official: Vercel AI Chatbot — 20.4k stars, the canonical Next.js AI chatbot from the creators of Next.js
- Best premium AI SaaS: Achromatic — $180 lifetime, AI chatbot with credits-based billing and full SaaS scaffolding
- Best standalone chatbot app: NextChat — 88.1k stars, multi-platform AI assistant (Web, iOS, macOS, Android, Linux, Windows)
- Best polished design: LobeChat — 77.5k stars, multi-provider chat framework with plugin system + agent operator platform
- Best for OpenAI / Azure: Chatbot UI — 33.3k stars, by Mckay Wrigley, multi-model + local Ollama support
- Best AI-powered search: Morphic — 8.9k stars, generative UI search engine with Tavily / SearXNG / Brave / Exa
- Best for RAG / agents: LangChain Next.js Template — 2.5k stars, RAG + agents + structured output via LangChain.js
- Best AI multi-provider premium: Shipped — $157-307, OpenAI + Anthropic + Gemini integrations in a SaaS boilerplate
- Best AI Agent landing: Magic UI Pro AI Agent Template — $99+ Pro, premium animated AI SaaS landing + chat surface
- Best Supabase-backed: Supabase Vercel AI Chatbot — 808 stars, Supabase Auth + Postgres + Vercel AI SDK
- Best reasoning models: AI SDK Reasoning Starter — by Vercel Labs, Anthropic / OpenAI / xAI / Deepseek reasoning chains
- Best minimal chat-sdk demo: Vercel chat-sdk demo — official minimal example, perfect for understanding the AI SDK
- Best evaluations-ready: Humanloop Chatbot Starter — Next.js starter with Humanloop tracing / evals integrated
1. Vercel AI Chatbot

Why we like it: Vercel’s official AI Chatbot template — the canonical reference for modern Next.js AI applications. Uses the Vercel AI Gateway for unified access to OpenAI, Anthropic, Google, and xAI through one API. App Router with React Server Components, advanced routing, Auth.js for authentication, Neon Postgres for chat history, Vercel Blob for file uploads.
chatbot.ai-sdk.dev.96% TypeScript codebase, comprehensive documentation at chatbot.ai-sdk.dev/docs. Best free pick when you want the official patterns and the unified Vercel AI Gateway access (free credits on the Vercel AI Gateway free tier mean you can prototype without paying any LLM API directly).
2. Achromatic

Why we like it: The cheapest premium template that ships a complete AI SaaS — built-in chatbot with streaming via the Vercel AI SDK, credits system for usage-based billing, admin panel for user / subscription management, and multi-tenancy with organizations and invitations. File storage via S3 / R2, marketing pages, and an admin panel for managing the credits ledger. 220+ hours of development claimed saved.
Trusted by 750+ developers — younger than ShipFast (8,300+) but actively maintained and explicitly tuned for AI-product launches. Best alternative to building the credits ledger + Stripe metering + chat persistence integration yourself, which is typically 60-100 hours of bespoke engineering.
3. NextChat (ChatGPT-Next-Web)

Why we like it: The most-starred Next.js AI chatbot on GitHub (88.1k stars) and one of the top-100 most-starred Next.js projects of any kind. “Light and Fast AI Assistant” supporting Web, iOS, macOS, Android, Linux, and Windows via PWA + native wrappers. Multi-provider: Claude, DeepSeek, GPT-4, Gemini Pro. Privacy-focused with local data storage, MCP (Model Context Protocol) support, plugin system.
Markdown support including LaTeX and code highlighting, PWA and dark mode, one-click Vercel deploy. SaaS version at nextchat.club demonstrates the production-grade UX. Best when you want a polished chatbot product to self-host or fork as the base for a chatbot-first SaaS — most of the work is done.
4. LobeChat

Why we like it: The most polished open-source AI chat interface — described as having “sleek animations, beautiful typography, and a design that would make any SaaS product jealous.” Multi-provider (OpenAI, Claude 3, Gemini, Ollama, Bedrock, Azure, Mistral, Perplexity), multi-modal (Vision, TTS), plugin system, agent operator platform with 10,000+ skill integrations via MCP.
2,737 releases — extraordinarily active development. Self-hosting via Vercel, Docker, Zeabur, Sealos, or Alibaba Cloud. The “Personal Memory” system with structured, editable memory and Agent Groups for team collaboration push LobeChat beyond chatbot into “AI workflow orchestration” territory. Best when design polish matters and you want a full-featured open-source ChatGPT alternative.
5. Chatbot UI (mckaywrigley)

Why we like it: “The open-source AI chat app for everyone” by Mckay Wrigley. Multi-model support (OpenAI, Azure OpenAI, local Ollama models), cloud-based and local deployment options, user authentication via Supabase, environment variable configuration for API keys. v2 is the actively-maintained version; v1 lives on the legacy branch.
Mckay Wrigley is a well-known AI / Next.js educator on X, and Chatbot UI is his reference implementation for Next.js + Supabase + AI chat patterns. Best when you want a community-vetted, education-friendly codebase rather than the polished-product approach of NextChat or LobeChat.
6. Morphic

Why we like it: Part of the Vercel OSS Program. “AI-powered search with GenerativeUI” — combines LLM streaming with traditional search engines (Tavily, SearXNG, Brave, Exa) and presents results through dynamically-generated UI components rather than just text. Multiple search modes (Quick, Adaptive), dynamic model provider detection (OpenAI, Anthropic, Google, Ollama, Vercel AI Gateway), guest mode, file upload, shareable search URLs.
Closest open-source equivalent to Perplexity AI. 1,695+ commits across 79 releases — extraordinarily active. Best when your AI product is search-first or research-focused rather than open-ended chat. Docker support included, one-click Vercel deploy. v1.3.0 released April 2026.
7. LangChain + Next.js Template

Why we like it: The official LangChain JS + Next.js starter showing practical implementations of LangChain modules. Simple chat interface, structured output generation using schemas, multi-step agent workflows, retrieval augmented generation (RAG) with chains and agents, streaming token responses. Minimal bundle size (37.32 KB for RAG use case), edge function compatible.
Best pick when you need LangChain’s depth (conversational retrieval chains, LCEL composition, multi-step agents) rather than the lighter Vercel AI SDK. Supabase vector store for RAG knowledge bases. Best fit for AI products that need to query private documents (internal docs, customer support history, structured data).
8. Shipped

Why we like it: The broadest LLM provider coverage of any premium SaaS boilerplate — OpenAI, Anthropic, Gemini, and other providers pre-wired. The Postgres + Prisma counterpart to ShipFast’s MongoDB-first approach. Payments via Lemon Squeezy or Stripe (subscriptions + one-time), email via MailChimp or Loops, and the optional Chrome extension boilerplate for products that ship web + browser-extension surfaces.
Built by Luca after launching multiple SaaS products. 330+ indie founders, 30,000+ Twitter followers. Pick Shipped over Achromatic (above) when you need multiple LLM providers simultaneously rather than a single primary chatbot provider — useful for AI apps that route different query types to different models (cheap GPT-4o-mini for triage, Claude for code, etc.).
9. Magic UI Pro AI Agent Template

Why we like it: Magic UI Pro’s AI Agent Template is specifically tuned for AI SaaS landing pages — particle effects, animated text, interactive cards, and the “wow” animations that AI products in 2026 are expected to ship with. The Magic UI Pro library (21k+ stars on the free core) supplies 150+ animated components and 50+ premium blocks.
Best when your AI product needs visual differentiation more than backend scaffolding — Magic UI Pro shines on the marketing / landing layer, then you pair with one of the free AI chat templates above for the actual chat surface. The combo (Magic UI Pro landing + Vercel AI Chatbot for the app) is a common pattern in 2026 AI startup launches.
10. Supabase Vercel AI Chatbot

Why we like it: A “Supabaseified” port of the Vercel AI Chatbot built by Vercel Labs + Supabase team members. Same App Router + Server Components + Server Actions patterns as the upstream Vercel template, but with Supabase Postgres + Supabase Auth (GitHub OAuth) instead of Neon + Auth.js. Multi-provider LLM support (Anthropic, Hugging Face, LangChain) and streaming chat UI.
Best pick when your stack is Supabase-first — auth, database, and storage all in one platform with generous free tier. Pair with Supabase Edge Functions if you need server-side logic without spinning up additional infrastructure. Demo at chatbot.ai-sdk.dev/demo (the upstream Vercel AI Chatbot template was renamed and the demo moved in 2026).
11. AI SDK Reasoning Starter (Vercel Labs)

Why we like it: Purpose-built by Vercel Labs for the new wave of reasoning models — Anthropic Claude Opus 4.7, OpenAI o4, xAI Grok 4, Deepseek R1 — that produce visible reasoning chains before final answers. React Server Components and Server Actions for server-side rendering, unified API across providers, hooks for building dynamic chat and generative user interfaces.
Best pick when your AI product specifically needs to show the model’s reasoning process to users (research tools, debugging assistants, coding agents). The reasoning UI pattern is more complex than standard chat — Vercel Labs shipped this template so you don’t reinvent it. One-click Vercel deploy.
12. Vercel chat-sdk Demo

Why we like it: The most minimal canonical example showing how to wire up the Vercel AI SDK on Next.js — just useChat, streaming responses, and the bare minimum scaffolding. No auth, no persistence, no extra features. Perfect for learning the pattern before stepping up to the full Vercel AI Chatbot template (which adds Auth.js, Neon, file uploads, and 20k+ stars of features).
Best as a teaching reference — the codebase is small enough to read in five minutes and understand exactly what minimum viable AI chat looks like on Next.js. Bigger templates above add layers; this one strips them away.
13. Humanloop Chatbot Starter

Why we like it: Most AI chatbot templates show the chat surface but skip the production concerns: how do you evaluate output quality, debug bad responses, A/B test prompts, and trace cost per conversation? Humanloop integrates those production concerns at the template level. The Next.js starter ships with Humanloop tracing wired into the chat handlers and prompt management so prompt iteration happens in their UI rather than scattered across your codebase.
Best when you’re building AI features for a serious business and need the operational layer from day one — eval suites, regression testing on prompt changes, cost attribution per feature. The Humanloop platform has a free tier; you pay only when your eval / tracing volume scales.
How to Choose a Next.js AI Chatbot Template
The right pick depends on what your AI product needs:
- Building a developer-extensible chatbot? Vercel AI Chatbot — the canonical reference, official patterns.
- Want a ready-to-deploy ChatGPT alternative? NextChat (88k stars, multi-platform) or LobeChat (77k stars, polished design).
- Launching an AI SaaS with credits / billing? Achromatic ($180) — only template with the credits ledger built in.
- Need RAG, agents, or structured output? LangChain Next.js Template — purpose-built for this.
- Building AI-powered search (Perplexity alternative)? Morphic — search + GenerativeUI from one codebase.
- Reasoning model UI (o4 / Claude Opus / Grok)? AI SDK Reasoning Starter (Vercel Labs).
- Multi-LLM provider routing in production? Shipped ($157-307) — broadest provider coverage.
- Learning the AI SDK from scratch? Vercel chat-sdk demo or Chatbot UI by Mckay Wrigley.
- Need production tracing / evals? Humanloop Chatbot Starter — production-concerned from day one.
- Supabase-first stack? Supabase Vercel AI Chatbot.
Next.js AI Chatbot Templates FAQ
Vercel AI SDK vs LangChain — which framework?
Vercel AI SDK wins for: lightweight chat UI primitives (useChat hook), edge-runtime streaming, official Next.js integration, the broadest provider list via Vercel AI Gateway. Best for the 80% of AI chat apps that just need streaming + provider routing. LangChain wins for: complex multi-step agent workflows, conversational retrieval chains, structured output with schemas, LCEL composition, mature RAG patterns. Best for the 20% of AI apps that need orchestration depth (research assistants, customer support agents with tool calling, multi-document RAG).
Which LLM provider should I default to?
For 2026: Vercel AI Gateway is the smartest default — one API, all providers, automatic failover, free credits on the free tier. Specific provider choices depend on use case: Claude (Anthropic) for coding, long-context, and reasoning; GPT-4o for general chat and tool calling; Gemini 2.5 Pro for multi-modal and cheap bulk operations; DeepSeek / xAI for cost-sensitive workloads; Local Ollama for privacy-first or offline use cases. Most templates on this list support all of these behind a provider config.
How do I add file upload / RAG to a chatbot?
Three paths: Vercel AI SDK ships file attachment APIs that pass files directly to providers that support them (Claude, GPT-4 Vision, Gemini). For RAG with private documents, use LangChain Next.js Template with Supabase vector store, or roll your own with pgvector on any Postgres. For document storage + URLs, Vercel Blob, Supabase Storage, or S3/R2 all work — every template above supports at least one option.
How do I monetize an AI chatbot?
Three patterns: Credits-based usage (Achromatic ships this) — users buy credits, you charge per LLM API call plus margin. Subscription tiers (most SaaS templates) — free tier with rate limits + paid tier with higher limits. Usage-based metered billing (Stripe metered billing + your own counter) — for B2B AI products. Achromatic is the only template on this list with the credits ledger pre-built; for the others, expect 40-80 hours of custom billing integration work.
What about MCP (Model Context Protocol)?
MCP is Anthropic’s open standard for connecting LLMs to external data sources, tools, and services. NextChat (88k stars) and LobeChat (77k stars) both have first-class MCP support — you can plug MCP servers in and the LLM gets access to external systems via the protocol. Achromatic and Magic UI Pro AI Agent template support MCP through the underlying Vercel AI SDK. If MCP integration matters to your product, prioritize templates that already ship MCP support — retrofitting it later is non-trivial.
How do I track costs and evaluate output quality?
Three options: Humanloop (its starter is template #13 here) — tracing, evals, and prompt management as a SaaS. LangSmith from LangChain — similar tracing + evals, tight LangChain integration. Self-hosted with Vercel KV / Postgres — write your own usage logger, no third-party dependency but you build the evals infrastructure yourself. For serious production AI products, paying for Humanloop or LangSmith from day one is almost always worth it; the engineering time you save exceeds the subscription cost.
Can I run AI chatbots on the Edge runtime?
Yes — Vercel AI SDK, Vercel AI Chatbot, AI SDK Reasoning Starter, and LangChain Next.js Template all support Edge runtime out of the box. Edge runtime means lower latency (closer to users) and better scaling for high-concurrency chat workloads, but limits you to runtime APIs that work in V8 isolates (no Node.js-specific modules). Most LLM provider SDKs support Edge — Anthropic, OpenAI, Vercel AI Gateway all ship Edge-compatible clients in 2026.
Self-hosted vs. SaaS chatbot platform?
Self-hosted (any free template above) wins on: full control over data and model selection, no per-message fees, ability to run on-premise for compliance. SaaS platforms (Achromatic for a hosted-ish template, or OpenAI’s ChatGPT directly) win on: zero infrastructure work, automatic updates, integrated billing. For products where AI is the core value proposition, self-hosting almost always wins long-term — your moat is the product UX + prompt engineering + data, not the chat interface itself. For internal tools or experiments, SaaS gets you to validation faster.
For broader Next.js template categories, see our Next.js SaaS templates & boilerplates roundup (for full SaaS scaffolding to wrap around your chatbot), shadcn/ui AI chat templates, and our forthcoming Next.js starter kits roundup.