Next.js Gemini Chatbot is an open chat UI template using Vercel AI SDK and Google Gemini by default. It supports streaming chat, auth, and swappable model providers.
Overview
Next.js Gemini Chatbot is a starter for building a generative UI chatbot with Next.js and the Vercel AI SDK. The client uses the useChat hook while the server streams model output with streamText, producing a browser chat experience.
The template uses React Server Components and Server Actions for routing and server rendering. The AI SDK provides a unified API for text, structured objects, and tool calls. Google Gemini models ship as the default provider, but the same codebase can target OpenAI, Anthropic, Cohere, and others with small configuration changes.
Data persistence and simple authentication are included. You can deploy a copy to Vercel with one click or run it locally after setting environment variables from the example file, typically on localhost port 3000.
It is aimed at developers who want a working chat front end and backend pattern rather than a hosted-only product, with deployment left to your own infrastructure or Vercel account.
Key features
- Streaming chat with useChat
- Vercel AI SDK integration
- Default Google Gemini models
- Swappable LLM providers
- React Server Components routing
- Server Actions support
- Authentication and persistence
- One-click Vercel deploy option
Use cases
- Prototype Gemini chat applications
- Learn generative UI patterns
- Self-hosted team chatbot
- Compare multiple LLM providers
- Extend with custom tools and UI