Next.js Agentic SaaS Template

A production-ready agentic SaaS template with Google OAuth, Stripe billing, auto-discovered integrations, and a single-purpose ChatBotKit agent that works for each customer continuously.

nextjs
app-router
template
1951

This template provides the fastest path from idea to a working subscription-based AI product. A single bot is configured once on ChatBotKit with its backstory, model, skills, and abilities. Each customer signs up, connects the integrations the agent needs through auto-discovered OAuth flows, and starts chatting.

The architecture auto-discovers which connections (personal secrets) the bot's abilities require by traversing the bot's skillset via GraphQL. Customers see only the integrations relevant to their agent and can authenticate each one independently. Conversation history is persisted per contact and accessible through a slide-out sidebar.

Stripe billing is optional but built-in, supporting monthly and yearly subscriptions with free trials and a self-serve billing portal. When billing is enabled, chat access is gated behind an active subscription.

Server actions keep API keys off the client, and NextAuth maps each authenticated user to a ChatBotKit contact by email. The bot's capabilities are managed entirely on the platform, so you can add new abilities or change models without touching application code.

This is the recommended starting point for SaaS products where each customer gets a personal AI agent backed by their own connected services.

A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.