Back to BlogAI Features & LLMs

How to Add an AI Chatbot to Your Website: 4 Options Compared

Rupak Amin

Founder & Lead Engineer, RAITHub

11 min read

There are four ways to add an AI chatbot to a website. A widget service can be live in an afternoon. Your help desk platform's own assistant fits if you already run support there. A custom RAG build answers from your data and systems under your control. A hybrid puts a hosted front end on your own back end. Pick by what the bot must know and do.

This guide is for founders and product owners deciding how to put an AI assistant on a marketing site, a docs site or inside a product. It compares the options on what matters after launch, not just on the demo: what the bot can know, what it can do, what it costs as traffic grows, and what happens when it is wrong. If you already know you want a custom build, go straight to how to build a RAG chatbot on your own product data.

What are the four ways to add an AI chatbot to a website?

Factor1. Widget SaaS2. Platform assistant3. Custom RAG4. Hybrid
What it isA hosted chatbot trained on your pages and files, added with a script tagThe AI agent built into the help desk or CRM you already useYour own retrieval pipeline and chat endpoint in your codebaseA hosted or platform front end calling your own endpoints for data and actions
Time to first versionHoursDays, mostly content setupWeeksWeeks, less than a full custom build
Cost shapeMonthly plan with a message allowancePer seat, plus per AI resolution or outcomeBuild cost, then tokens and hostingA subscription plus your own endpoints
KnowsPublic pages and uploaded documentsYour help centre and ticket historyAnything you index, including per-customer dataWhat the vendor indexes, plus what your endpoints return
Can doAnswer; some offer lead capture and simple actionsAnswer, triage, hand off to agents inside the platformWhatever you build: look up orders, change settings, file ticketsAnswer via the vendor; act via your API
Control over prompts, models, logsLimited to the vendor's settingsLimited to the platform's settingsFullFull for your endpoints, vendor-limited for the rest
FitsMarketing and docs sites with public informationTeams whose support already lives in that platformIn-product assistants that need account data or actionsTeams that want a proven chat UI and handoff, plus private data

When is a chatbot widget service enough?

When the bot only needs to answer from public information, such as your website, docs and FAQs, and the cost of a wrong answer is low. That covers many marketing and documentation sites.

Widget services crawl your site or accept uploaded files, then give you a script tag to paste into your pages. Pricing is usually a monthly plan with a message allowance. As one published example, Chatbase's pricing page lists a free plan with 50 message credits a month, Hobby at $40 a month for 700, Standard at $150 for 4,000 and Pro at $500 for 15,000 (checked 29 September 2026). Check how any vendor counts a credit before comparing plans, because a single conversation can use several.

  • Strengths: no engineering, fast to try, predictable monthly cost at low volume.
  • Limits: the bot knows what you upload, not what is in your database, so it cannot answer "where is my order?" without an integration the vendor supports.
  • Watch: how often the index refreshes, since stale pages are a common cause of wrong answers; and what happens to visitor messages under the vendor's data terms.

Should you use the AI assistant in your help desk platform?

If your support team already works in a help desk platform that offers one, it is usually the shortest path to an assistant that hands off cleanly to people. The bot reads your help centre, and a conversation it cannot resolve lands in the same inbox your team uses.

Pricing for these assistants is typically per seat plus a charge per AI outcome. As an example, Intercom's pricing page lists its Fin AI agent from $0.99 per Fin outcome, with seats from $29 per seat a month on the Essential plan (checked 29 September 2026). That model rewards you only for conversations the assistant closes, but it scales directly with volume: 2,000 counted outcomes a month would be about $1,980 before seats. Read the vendor's own definition of an outcome before modelling it.

  • Strengths: built-in human handoff, reporting and ticket history in one place.
  • Limits: it knows what the platform knows. Product data, such as plan limits or usage, needs the platform's integration options or custom actions.
  • Watch: the per-outcome line at your real volume, and whether moving platforms later means rebuilding the bot.

When do you need a custom RAG chatbot?

When the answer depends on who is asking, or the bot must do something. RAG (retrieval-augmented generation) means the model answers from passages retrieved from your own data, so a custom build can search per-customer content, call your APIs and follow your permission rules.

  • In-product help that needs the user's plan, settings or history.
  • Actions: resetting a setting, creating a ticket with context, checking an order.
  • Multi-tenant data, where one customer's documents must never appear in another's answer.
  • Control: your own prompts, model choice, evaluation set and logs.

Running costs are tokens plus hosting, and at moderate volume the tokens are small. An illustrative month of 5,000 conversations at 4 turns each, with 3,000 input and 300 output tokens per turn on gpt-5-mini at $0.25 and $2.00 per million tokens on the OpenAI pricing page, is 20,000 turns at about $0.00135 each: roughly $27 in tokens. Using OpenAI's hosted file search tool for retrieval adds $2.50 per 1,000 calls, so about $50 for 20,000 searches, plus file storage at $0.10 per GB per day after the first free GB. The real cost of a custom build is the engineering and upkeep, not the tokens.

A minimal server endpoint using OpenAI's hosted file search tool, which retrieves from a vector store with semantic and keyword search. The API key stays on the server.

// app/api/chat/route.ts (Next.js App Router)
import OpenAI from 'openai'

const openai = new OpenAI() // reads OPENAI_API_KEY on the server only

declare function allowRequest(ip: string): Promise<boolean> // your rate limiter

export async function POST(req: Request) {
  const ip = req.headers.get('x-forwarded-for')?.split(',')[0]?.trim() ?? 'unknown'
  if (!(await allowRequest(ip))) return Response.json({ error: 'Too many requests' }, { status: 429 })

  const { message } = await req.json()
  if (typeof message !== 'string' || message.length > 2000) {
    return Response.json({ error: 'Invalid message' }, { status: 400 })
  }

  const res = await openai.responses.create({
    model: 'gpt-5-mini',
    instructions:
      'You are the support assistant for Example Co. Answer only from the retrieved documents. ' +
      'If they do not contain the answer, say so and offer to connect the visitor with the team.',
    input: message,
    tools: [{ type: 'file_search', vector_store_ids: [process.env.SUPPORT_VECTOR_STORE_ID!], max_num_results: 5 }],
    max_output_tokens: 600,
  })

  return Response.json({ reply: res.output_text })
}

This is the smallest useful shape, not a finished product: add conversation history, citations, per-tenant stores if customers have private documents, logging and an evaluation set before launch. A self-hosted alternative for retrieval is pgvector in your own Postgres, covered in the RAG chatbot guide linked above.

What is a hybrid chatbot, and when does it fit?

A hybrid keeps a vendor's chat interface, inbox and human handoff, and points it at your own endpoints for anything private or any action. The vendor handles the conversation; your code handles "what is this customer's plan?" and "cancel this order".

  • Fits when your support team wants a platform they already know, but the bot needs data only your system has.
  • Build: a small, authenticated API that the platform's custom-action or webhook feature calls, returning only the fields the bot needs.
  • Watch: authentication between the platform and your API, and that the endpoint returns only the signed-in customer's data. Treat every call as untrusted input.

Hybrids are often the pragmatic middle: less to build than a full custom assistant, more reach than a widget alone.

How do you choose between the four options?

  1. Does the bot need private, per-user data or actions? No: a widget or platform assistant. Yes: custom or hybrid.
  2. Does your support team already live in a help desk platform? Yes: start with its assistant, and add custom actions (a hybrid) when you hit its limits.
  3. What does a wrong answer cost? If it can mislead a customer about money, contracts or health, you need an evaluation set and logs you control, which points to custom or hybrid.
  4. What is your volume? Model each option's price at your expected monthly conversations, using the vendor's own definitions of a credit or outcome.
  5. Who maintains it? A custom build needs someone to own the index, prompts and evaluations after launch.

Whichever you choose, the biggest risk after launch is the bot confidently stating wrong facts about your product; the fixes are in what to do when your AI chatbot hallucinates about your product. If you are adding AI to an existing SaaS product more broadly, see how to add AI features to SaaS.

What should any website chatbot have before launch?

  • A clear route to a person, visible in every conversation.
  • An "I don't know" answer instead of a guess when the sources do not cover a question.
  • Rate limits on the chat endpoint, so a script cannot run up your bill.
  • A test set of 30 to 50 real questions, including awkward ones, rerun after every content or prompt change.
  • A privacy notice that says what happens to what visitors type. This is general information, not legal advice; confirm your obligations with your adviser.

Why RAITHub for a website or in-product chatbot

  • Built RAG into a live product. PadhAI, the AI tutoring platform RAITHub built, grounds its Socratic tutor with RAG and routes queries through a 70/20/10 model router, across PWA, WhatsApp and Telegram from one service.
  • Multi-tenant data done carefully. Sundor Skin runs on 146 PostgreSQL tables with row-level security, the same discipline a per-customer chatbot index needs.
  • Hybrid-friendly. The work is often a small authenticated API for a platform you already use, quoted as fixed scope.
  • Fixed scope, your IP. A free 15-minute technical audit, then a fixed written quote. You own the code and IP; an NDA is standard.

When to use a tool instead

  • Your bot answers only from public pages. A widget service will be live today; you do not need a build.
  • Your support team already uses a help desk with an AI assistant. Turn it on and measure it before commissioning anything custom.
  • You have no one to maintain a custom index. A hosted option that refreshes itself is safer than a custom bot that goes stale.

Custom and hybrid assistants are built under the SaaS development service. To pick an option for your site, book the free 15-minute technical audit and bring 20 questions your visitors or customers actually ask.

Last reviewed: 29 September 2026. Prices checked on 29 September 2026.

Frequently asked questions

What is the easiest way to add an AI chatbot to my website?

A chatbot widget service: it indexes your pages or files and gives you a script tag to paste into your site. It suits public information and can be live in hours.

How much does a website AI chatbot cost?

It depends on the option. Widget plans are monthly with a message allowance, platform assistants charge per seat plus per AI outcome, and a custom build costs engineering time up front, then tokens and hosting, which are often tens of dollars a month at moderate volume.

Can an AI chatbot answer questions about a customer's own account?

Only if it can reach your data securely. That needs a custom build or a hybrid, where the chatbot calls an authenticated API that returns only the signed-in customer's information.

What is a RAG chatbot?

A chatbot that retrieves relevant passages from your own documents or data and answers from them, rather than from the model's general knowledge. It can cite its sources and say when they do not cover a question.

Should I build a custom chatbot or buy one?

Buy when the bot answers from public content and your team already has a support platform. Build, or build a hybrid, when it needs private data, actions, multi-tenant separation or full control over quality testing.

How do I stop a website chatbot from giving wrong answers?

Restrict it to retrieved sources, give it an "I don't know" path and a handoff to a person, keep its content current, and rerun a test set of real questions after every change.

add AI chatbot to websiteAI chatbot optionswebsite chatbotRAG chatbotcustomer support AIchatbot cost

Ready to discuss your project?

Book a free 15-minute technical audit with our engineering team.