Home › Guides › Build a WhatsApp AI agent for a small business: the architec

Build a WhatsApp AI agent for a small business: the architecture that works

By Qilin Software Lab Private Limited · Published 2026-10-14 · 3 min read

An AI assistant on a business number is now a weekend project rather than a product. The hard parts are no longer the model; they are the plumbing and the rules. This is the shape that has worked for the SMEs we have built it for.

1. Keep the number on the phone

The owner will not give up the handset, and should not. Use coexistence so the number stays on the WhatsApp Business app and the assistant joins it through the API. The owner sees every AI reply in the same thread and can take over any conversation by simply typing.

2. One webhook, one queue

Receive messages at your webhook (see the webhook guide), store them, acknowledge immediately, and process from a queue. Keep the last few turns per customer as context; eight turns is plenty for retail and B2B trade.

3. Give the model tools, not scripts

A tool-using model with three or four functions replaces a hundred-branch flow builder. For a trading business the tools that matter: look up a party, get a ledger or invoice from the accounting system, draft a reply, send a document. The model reads the message, calls the tools, and writes a reply in the customer's language. Claude handles Hindi and Hinglish well; tell it in the system prompt to answer in the language the customer used.

4. Separate reading from acting

Answering a question ("what is my balance?") can be automatic. Anything that changes state, or sends money or documents to someone new, should be proposed to a human first: the assistant drafts, the owner says yes on WhatsApp, the action runs. Make the owner's own number a trusted line that can approve with one word.

5. Whitelist who can command the assistant

Customers get answers. Staff get actions. Keep a short list of staff numbers; everything else is a customer. A customer's number must never be able to tell the assistant to send a ledger to a third party.

6. Templates for outbound

If the assistant needs to reach a customer who has not written in 24 hours (payment reminder, dispatch note), it must use an approved template. Create three or four utility templates at the start and let the assistant pick the right one.

7. Log everything

Every inbound message, every tool call, every reply, every approval: in one table, visible to the owner. Trust in the assistant comes from the log.

Reference stack

  • Number: coexistence through NumberBridge, webhook to your server, send API with a Bearer key.
  • Server: FastAPI or Express, SQLite or Postgres, a queue.
  • Model: Claude with tool use; eight-turn memory per customer.
  • Accounting: Tally (XML over HTTP), Zoho Books or any API; see Tally on WhatsApp.

Put software on your business number without losing the phone

NumberBridge connects an existing WhatsApp Business app number to the Cloud API in two minutes. Flat monthly fee, no per-message markup, 14-day trial.

Start free Pricing

Related guides