You ship the product. Users sign up. Then the same five questions arrive every day: "How do I reset my password?", "Can I export my data?", "Why is my invoice wrong?" You answer them manually until you cannot anymore.
Hiring a support person costs $40k+ per year. Intercom's AI features start at $200 per month -- and still hand off to you when they get confused. There is a third option: wire Claude directly into your SaaS and train it on your own docs.
Not every SaaS needs this. It earns its place when:
If your product is still changing weekly and your docs are out of date, fix the docs first. An AI that confidently gives wrong answers costs you more trust than no AI at all.
A chat widget inside your SaaS -- behind auth, not a public-facing bot -- that:
Users get instant answers to routine questions. You get a smaller queue.
The Next.js SaaS Boilerplate ships with the Claude streaming infrastructure already wired. The /api/ai/chat route reads your system prompt, forwards the message to the Claude API, and returns a Server-Sent Events stream. The useAiChat hook on the client reads that stream and renders each token as it arrives.
The credit system is already in place too. Every message deducts AI_CREDITS_PER_MESSAGE from the user's balance before hitting the API -- you control the cost per conversation without a redeploy. What you add is your FAQ text as the system prompt context.
The most important design decision is what you put in the system prompt. A structure that works:
You are a support assistant for [Your Product].
Answer questions using only the information below. If the answer
is not in the context, say: "I am not sure -- please contact our
support team at support@yourproduct.com."
--- DOCUMENTATION ---
[paste your FAQ and help articles here]
---
Keep answers under 150 words. Never mention features not listed above.
When your FAQ grows large, use prompt caching to cut costs by up to 90 percent. The boilerplate's cachedSystem() helper handles this in one call -- large system prompts get cached after the first request and cost a fraction on every subsequent one.
Wire the chat endpoint behind your existing rate limiting so no single user can fire off hundreds of questions in a session. The boilerplate's sliding-window rate limiting pattern drops in directly. See the authentication docs for the full setup.
Always show an escape hatch. The response component should include a visible "Contact support" link regardless of whether Claude answered. Users who get a wrong answer need a way out that does not require five clicks.
Before turning this on for all users, answer these three questions:
A chatbot that admits it does not know is more useful than one that hallucinates a feature you have not built yet.
Once the chatbot is live, you can extend it without a full rebuild:
If you want the full foundation -- streaming, auth, credits, and chat UI already wired -- the Next.js SaaS Boilerplate has everything in place. Add your docs and ship.