An AI chatbot for WhatsApp, a website, or Telegram is a small orchestrated stack: one channel adapter, one LLM (cloud or local), one knowledge layer (RAG over your docs), and a handoff path to a human. Skip any one of the four and the bot either hallucinates, ghosts users, or drowns your team in escalations.
This is a build guide, not a marketing pitch. By the end you should know exactly what to build, in what order, with which tools, and what it will cost to keep running. If you want us to build it for you instead, book a call. If you want the case for why chatbots are taking over support in the first place, read the 2026 trend writeup first.
What is an AI chatbot in 2026?
A modern AI chatbot is not a decision-tree script with a few canned replies. It is a small application with four moving parts: a channel adapter (WhatsApp Cloud API, a website widget, the Telegram Bot API), an LLM that produces the actual reply, a knowledge layer that grounds the LLM in your real product data (RAG, function-calling, or a vector store), and a handoff path to a human or a ticket system when the bot cannot or should not respond.
For context on where these numbers come from: RioCloud Solutions has been building automation and AI systems since 2020, supports 100+ brands across 12 countries, and runs two products of its own — Loadout and Minuto — currently launching. Client automation work is described on our AI automation agency page.
If you ship just the LLM with no knowledge layer, you get a confident hallucinator. If you ship just the knowledge layer with no LLM, you get a glorified FAQ. If you ship both with no handoff, you trap angry users in a loop. All four parts matter; this guide walks through each.
Which channel should you launch first?
Almost always pick one channel for v1 and add the others later. The pattern that works in India, the Middle East, and most of Asia is WhatsApp first, because that is where customers already are. In Western markets the website widget often wins. Telegram is a strong third for B2B and crypto-adjacent audiences.
| Channel | Best for | Setup complexity | Recurring cost |
|---|---|---|---|
| WhatsApp Business (Cloud API) | D2C, retail, services, India/UAE/SEA | Medium — BSP onboarding + template approvals | Per-conversation fee + LLM tokens |
| Website widget | SaaS, lead gen, B2B | Low — drop in a script tag | LLM tokens only |
| Telegram | B2B, communities, crypto, niche audiences | Low — Bot API is free and instant | LLM tokens only |
What is the right architecture for a production chatbot?
Five components, all of them swappable. Build it in this order and you will not paint yourself into a corner.
- Channel adapter. WhatsApp Cloud API (via a BSP like Meta direct, AiSensy, or Gallabox), a widget for the website (Botpress, Chatwoot, or a custom React component), and Telegram's Bot API. Each adapter normalises an inbound message into a common JSON shape your backend can handle.
- Conversation store. A small Postgres table with one row per conversation and one row per message. Keep the last 10–20 turns in memory for context; archive the rest. This is also where you store handoff state.
- Intent router. A cheap LLM call (or a small classifier on a small local classifier model) that decides: is this a knowledge question, a transactional request, a complaint, or an escalation? The router stops you spending frontier tokens on a "thanks!" reply.
- Knowledge layer (RAG). Vectorise your product docs, FAQs, policies, and recent ticket resolutions into a vector store (pgvector, Qdrant, or Pinecone). At reply time, retrieve the top 3–5 chunks and pass them into the LLM prompt. This is what stops hallucination.
- Reply generator + guardrails. A frontier LLM (GPT, Claude) or a local model (trio-medium-instruct) generates the reply, constrained by a system prompt that includes brand voice, escalation rules, and the retrieved context. A guardrail layer scans output for things you must never say.
- Human handoff. If confidence is low, if a customer asks for a human, or if the intent is sensitive (refund, complaint, legal), park the conversation in a queue inside Chatwoot, Freshdesk, or your CRM with full context attached.
How do you build this in seven steps?
This is the rollout checklist we run with clients. Total elapsed time is two to four weeks depending on integrations.
- Pick the channel and get credentials. WhatsApp via a BSP needs a Meta Business verification and template approvals — start this on day one, it is the longest pole. Website and Telegram credentials are same-day.
- Collect the knowledge. Export your FAQ, product catalogue, shipping/returns policy, and 200 recent resolved tickets. The tickets are gold — they show the exact language customers use. Clean, chunk, and embed into a vector store.
- Write the system prompt. One page maximum. Cover: who the bot is, brand voice rules, what it can/cannot answer, escalation triggers, and the "always end uncertain answers with handoff" rule. Version-control this file.
- Build the intent router. Three to seven intent classes is enough. Test it on 100 historical messages before wiring it to the reply path.
- Wire reply generation with RAG. Retrieve top 3–5 chunks, pass into the LLM with the system prompt, return the reply. Log every prompt and reply for the first month.
- Add the handoff path. Plug Chatwoot or your CRM in. Test the escalation flow end to end — a real human must see the full transcript inside the same tool they already use.
- Soft launch and measure. Run on 10–20% of traffic for the first two weeks. Watch resolution rate, average reply time, escalation rate, and customer satisfaction. Tune the prompt and the retrieval before going to 100%.
How much does an AI chatbot cost to run?
Two cost lines: build and recurring. Numbers below are realistic for a small/mid business handling a few thousand conversations per month.
| Cost item | One-time | Monthly |
|---|---|---|
| Build (single channel, single LLM, RAG over ~500 docs) | $2,500–$8,000 | — |
| WhatsApp conversation fees (5,000 convos) | — | $30–$150 |
| Frontier LLM tokens (intent + reply) | — | $20–$120 |
| Local LLM server (if self-hosting models) | — | $20–$80 |
| Vector store (pgvector / Qdrant) | — | $10–$70 |
| Helpdesk for handoff (Chatwoot) | — | $0–$50 |
Most small businesses we work with land between $80 and $250 per month after build, handling 3,000–8,000 conversations. That is a fraction of one part-time support hire and covers far more conversations than that hire could.
What are the biggest mistakes to avoid?
Five we see repeatedly:
- Skipping RAG. Without grounding in your real product data, the bot will confidently invent shipping times, return policies, and prices. Day-one failure mode.
- No human handoff. If a frustrated customer cannot reach a human in two messages, the bot becomes a brand liability.
- One giant prompt. Trying to cram every edge case into a single system prompt makes the bot brittle and slow. Use the intent router to fan out to focused sub-prompts.
- Launching on 100% of traffic. Soft-launch on a slice. Always.
- Treating it as "set and forget". Log every conversation for the first month, sample 20 a week, and adjust prompts/retrieval. After month one, sample 5 a week forever.
How does this connect to the rest of your AI stack?
Chatbots are rarely the whole story. Most teams that ship a bot also end up wiring it into an AI marketing stack for outbound, an an orchestration layer like ours for multi-LLM routing, and a local model like local open-source models for cheap classification. If you are doing all three, design the conversation store and the intent router to be shared services — do not let the chatbot become a silo.
Frequently asked questions about AI chatbots
- How long does it take to build a production AI chatbot?
- Two to four weeks for a single channel with RAG and handoff, assuming your knowledge base is in reasonable shape. WhatsApp adds a few days for BSP onboarding and template approvals — start that on day one.
- Do I need WhatsApp Business API or is WhatsApp Business app enough?
- For any real automation, you need the WhatsApp Cloud API (a.k.a. Business Platform), not the consumer Business app. The API is what lets a bot send and receive messages programmatically; it requires a Business Solution Provider (BSP) or direct Meta onboarding.
- Should I use a cloud LLM or a local model?
- Most teams should start with a cloud LLM for reply generation and move high-volume cheap steps (intent detection, classification) to a local model later. local open-source models handles those cheap steps for the cost of a small VPS.
- How do I stop the bot from hallucinating?
- Three things: a tight system prompt with explicit "say I don't know and hand off" rules, RAG retrieval so the model is grounded in real data, and a guardrail layer that blocks anything outside the allowed topics. Together these eliminate the vast majority of bad answers.
- Can the bot handle multiple languages?
- Yes. Modern LLMs handle 20+ languages well out of the box; you only need to localise the system prompt and the FAQ chunks. For South Asian markets we routinely ship Hindi, Punjabi, and English in the same bot.
- What happens when the bot gets it wrong?
- The handoff path triggers, the conversation lands in your helpdesk with full context, and a human takes over inside the same tool they already use. The bot's error rate becomes a metric you watch weekly and improve.
- Can RioCloud build this for me?
- Yes. We have shipped chatbots on WhatsApp, websites, and Telegram for brands across India, the UK, and the UAE. Book a call and we will scope a 30-day build for your stack.
- What does the WhatsApp Business API cost per message in India?
- Meta moved from per-conversation to per-message billing, and rates are set per country and per category — marketing, utility, authentication and service messages all price differently, with India among the cheaper markets. Read Meta's published rate card rather than a reseller summary, because business solution providers add their own margin on top. The monthly band in the table above assumes a few thousand mostly service and utility messages.
- Can you build a WhatsApp AI chatbot with a no-code builder instead?
- For FAQ deflection and simple lead capture, yes, and it will be live in days. The ceiling appears when you need retrieval over your own documents, a custom escalation rule, or a write action into your CRM or ERP — that is where per-seat pricing and platform limits start to bite. We often start clients on a no-code builder, then port the flows once volume justifies owning the stack.
- Is there a genuinely free way to run a WhatsApp AI chatbot?
- Free of licence, not free of cost. Self-hosted n8n, Chatwoot, Postgres with pgvector and an open-weight model carry no licence fee, but you still pay for a server and Meta still charges for messages. Realistically you trade a small hosting bill and your own maintenance time for the SaaS fee. That swap pays off above a few thousand conversations a month and rarely below it.
Next steps
If you want to build it yourself, the seven-step checklist above is the path; start with the channel that matches your customers and resist the urge to launch on all three at once. If you want help, book a 30-minute call and we will scope the build, including BSP onboarding, RAG setup, and the helpdesk integration. For the wider context — when chatbots are worth deploying and the ROI math — see our 2026 chatbot trend writeup and the AI marketing use cases.