A WhatsApp AI voice agent answers your WhatsApp chats and calls with AI. You connect a WhatsApp Business number through the Cloud API or a provider such as Twilio, run the logic in an n8n workflow, store memory in Supabase, and hand calls to a voice platform like Retell AI over SIP. Expect weeks, not days.
How does a WhatsApp AI voice agent work? The technical architecture
A WhatsApp AI voice agent is five services working as one: a WhatsApp connection, an automation layer, a voice platform, a database and a language model. Each does one job. WhatsApp has 3 billion monthly active users, a figure Meta itself publishes, which is why the channel is worth building on.
If you want the general method for voice agents on any channel, my complete guide to building voice AI agents covers it. This page is the WhatsApp version, with text and calls on one system.
The five components
| Component | Job in this build | Worth knowing |
|---|---|---|
| Twilio (or Meta's Cloud API directly) | Connects the WhatsApp Business number and carries messages and call signalling | Check Meta's opt-in rules before you message customers |
| n8n | Runs the workflows that route messages, call tools and log results | Visual workflows, self-hosted or cloud |
| Retell AI | Runs the live voice conversation: speech, turn-taking and interruptions | Billed per second |
| Supabase | Stores conversation history, customer records and the knowledge base | PostgreSQL with vector search |
| OpenAI GPT models | Understand each message and write the reply | Pick a model per task to control cost |
Twilio is optional. Meta's Cloud API can forward WhatsApp calls over SIP straight to a voice platform, without Twilio in the middle. Some agent platforms now offer a native WhatsApp channel as well: ElevenLabs Agents, for example, documents WhatsApp messages and calls.
I use Twilio, n8n and Retell AI here for control: I can see and change every step, and text and voice share one tool stack. The n8n WhatsApp integration guide walks through connecting straight to Meta's WhatsApp Cloud API for messaging.
Two routes in, one tool layer
Text and calls enter by different routes. A message goes from a webhook to n8n, then to the front agent and its sub-agents. A call goes from Twilio to an n8n register-call webhook, then to Retell AI over SIP, which reaches the tools through MCP.
Both routes use the same booking, email and knowledge base tools, and both write to the same Supabase database.
Why I split the work across a delegate agent
In my builds, a single agent asked to book appointments, answer pricing questions and send emails gets harder to keep accurate as its prompt and tool list grow. The delegate pattern splits the work. A front agent works out what the customer wants and passes the job to a specialist.
- Front agent (the receptionist): reads intent, keeps the conversation context and routes the request.
- Booking agent: checks the calendar, business hours and service durations, then books.
- Email agent: sends confirmations, preparation notes and follow-ups from your templates.
- Knowledge base agent: answers pricing, service and policy questions from your own documents.
Each specialist has a short prompt and only the tools it needs. When a booking goes wrong, you fix one workflow, and the rest of the agent carries on unchanged.
What jobs can it handle?
Most WhatsApp enquiries fall into a handful of jobs. This is how they map to the sub-agents above, and where you would add one.
| Job | Handled by | Extra build needed |
|---|---|---|
| Booking and rescheduling appointments | Booking agent | No |
| Pricing, service and policy questions | Knowledge base agent | No |
| Confirmations, preparation notes and follow-ups | Email agent | No |
| Routing a customer to a person | Front agent | No |
| Lead qualification saved to your CRM | New sub-agent | Yes: a CRM connection |
| Order status | New sub-agent | Yes: your order system's API |
Phase 1: How do you set up the WhatsApp Business Platform?
Phase 1 gets you a WhatsApp Business number that can send messages and take calls through an API. You need a Meta Business account, a WhatsApp Business account, a phone number Meta accepts, and calling switched on for that number. Do this first, because Meta's checks sit outside your control and can hold up the whole build.
Match your business details everywhere
Your business name, address and website should match exactly across Companies House, your website and Meta Business Manager. In my experience, mismatched details are the usual reason verification stalls. I never quote a fixed turnaround for Meta's checks, so leave room in your plan for the wait.
Register the number and switch on calling
Meta's WhatsApp Cloud API calling documentation (read 08/11/2026) covers both user-initiated and business-initiated calls, and calling has to be switched on in the settings for each business phone number. A number that already sends messages will not ring until this step is done.
On that reading, the calling documentation sets these conditions before a number can take or make calls:
- Cloud API number: the number must be registered on the Cloud API, with calling enabled in its settings.
- Messaging limit: the business number needs a messaging limit of at least 2,000 unique recipients.
- Region: business-initiated calling is not offered in every country, and the page lists where it is restricted.
- User permission: before a business-initiated call, the user must grant call permission, usually in reply to a permission request. Production accounts can send 1 permission request a day and 2 a week.
Meta revises these conditions, so re-check the page before you promise anyone a go-live date.
The set-up order
- Match your business details across every record.
- Create the Meta Business and WhatsApp Business accounts.
- Register the number for the API.
- Enable calling on that number.
- Point Twilio's webhooks at n8n, with signature checks switched on.
Configure Twilio for production
Choose a number that suits your market: a UK business serving UK customers should use a UK number. Then set up the webhooks that send each message and call event to n8n.
Validate Twilio's request signature on every webhook so nobody can post fake messages into your workflow.
Phase 2: How do you build the text-based WhatsApp AI agent?
Build the text agent first, because it is cheaper to test and the voice agent reuses its parts. In n8n, one workflow receives each WhatsApp message, loads the customer's history from Supabase, passes the message to the front agent, then sends the reply and saves the exchange.
The core n8n workflow
- A webhook node receives the incoming WhatsApp message from Twilio.
- A Supabase query loads recent history for that phone number.
- The front agent reads the message plus history and decides who handles it.
- The chosen sub-agent runs its tools and drafts a reply.
- n8n sends the reply through Twilio and writes both messages to Supabase.
Memory keyed by phone number
I store conversation memory in Supabase PostgreSQL rather than n8n's simple memory node. The history survives restarts, you can query it, and a returning customer gets an agent that remembers their last booking. Each conversation is keyed by phone number, so two customers messaging at once never share context.
Set a retention period for conversation data and purge older records automatically with a scheduled workflow. UK GDPR expects you to keep personal data no longer than you need it, and an automatic purge means nobody has to remember.
The sub-agent workflows
The booking agent talks to the Google Calendar API. It checks live availability, respects business hours and service durations, and offers alternatives when a slot is taken.
The email agent sends confirmations, preparation instructions and follow-ups using your templates. The knowledge base agent searches documents that a scheduled workflow pulls from Google Drive, splits into chunks and stores as vectors in Supabase. When you update a price list in Drive, the next re-index picks it up.
Plan for failure from day one
Every external call in the workflow needs a retry, a timeout and a fallback reply. If the calendar API is down, the agent should say it will confirm by message shortly and flag the request for staff. A polite holding reply beats silence.
Phase 3: How do you add voice calls with Retell AI?
Voice reuses the text agent's tools and adds a real-time layer. A WhatsApp call reaches Twilio, an n8n webhook registers it with Retell AI, and Twilio connects the audio to Retell over SIP. Retell runs the conversation and reaches the same tools as the text agent through an MCP server.
Configure the voice agent
Write the voice prompt separately from the text prompt. Spoken replies need to be shorter, avoid lists and links, and confirm details back to the caller. The prompt should also cover poor lines, background noise and callers who talk over the agent.
Speed matters as much as the voice. Human conversation turns over in roughly 200 milliseconds (Stivers et al., PNAS, 2009), so a voice agent that pauses for several seconds feels broken. Every hop (Twilio, SIP, n8n, the model and each MCP tool call) adds delay, so keep mid-call tool calls lean.
Voice choice matters. Pick a voice and accent that suit your customers, and test pacing and interruption handling on real calls before launch. Retell offers several voice and model options; if you are still choosing a platform, see my Retell AI vs Vapi vs ElevenLabs comparison.
Connect tools through MCP
Model Context Protocol (MCP) is an open standard for connecting AI models to outside tools and data. In this build, an MCP server exposes the functions the text agent already calls. The voice agent can check the calendar mid-call, and you maintain those functions once for both channels.
The same Retell agent can also answer an ordinary phone number, so one AI voice agent covers WhatsApp and phone calls.
The call journey, step by step
SIP (Session Initiation Protocol) sets up the call between Twilio and Retell. RTP (Real-time Transport Protocol) streams then carry the audio itself.
- The customer taps the call button in WhatsApp.
- Twilio receives the call.
- Twilio's TwiML app calls an n8n webhook.
- n8n registers the call with Retell AI and returns the SIP routing details.
- Twilio connects the audio to Retell over SIP.
- The Retell agent talks to the caller and uses the MCP tools.
- The transcript and outcome are logged to Supabase.
Worked example: an evening booking call
An illustrative scenario: at 19:40 a customer calls through WhatsApp asking for a boiler service on Friday. The agent checks the calendar through MCP, offers 10:00 or 14:00, and books 14:00. The email agent sends the confirmation before the call ends, and the transcript lands in Supabase for staff in the morning.
Now say the caller instead asks for a person 90 seconds into the call. The agent transfers the call to a member of staff, and Retell AI's pricing page says: "Once the call is transferred, the AI voice agent fee stops." So the agent fee covers those 90 seconds; check separately how your telephony provider bills the transferred leg.
What does a production WhatsApp agent need before it goes live?
A production agent needs security, compliance, monitoring and a human fallback in place before customers reach it. Callers share names, numbers and often addresses, so UK GDPR applies from the first message. The agent also has to cope with outages and odd requests without leaving a customer stranded.
Security and data handling
Encrypt data at rest and in transit, use role-based access with multi-factor authentication, and log who touches what. Rotate API keys on a schedule and restrict who can reach your n8n instance.
Log enough of each conversation to improve the agent, then let the retention purge do its job. Keep a backup of your workflows and database, and a written plan for what happens if one service goes down.
Tell callers it is AI and offer a person
Our own answering agent follows a simple rule: "If asked, it says what it is. Callers who want a person get routed to one." I build every WhatsApp agent the same way. For the legal detail, read whether it is legal to have AI answer your business calls in the UK.
Outbound messages and PECR
The Privacy and Electronic Communications Regulations (PECR) cover electronic marketing in the UK. The ICO's PECR guidance treats text messages as electronic mail, so the electronic mail marketing rules cover marketing texts. Treat outbound WhatsApp marketing with the same care: get consent first, and check Meta's messaging policy too.
Monitoring, cost and quality
Track response times, error rates, completed bookings and handoffs to staff. Watch spend across every platform: Twilio, Retell, OpenAI and your hosting each bill separately, so set usage alerts on each. Read a sample of transcripts every week and fix the prompt where the agent got it wrong.
Phase 4: How do you test it before launch?
Phase 4 proves the agent works on real channels before customers find the gaps. Run test chats, an inbound WhatsApp call, a business-initiated call, a forced tool failure and a handoff request, then work through the launch checklist. Use team members' phones, and fix the prompt after every round rather than saving it all for the end.
The test round
- Test chats: book an appointment, ask a pricing question, then message again later to check the agent remembers the booking.
- Inbound call: call the business number from WhatsApp and run the same booking by voice. Listen for pauses while tools run.
- Business-initiated call: call a team member's WhatsApp from the business number, within Meta's permission rules for business-initiated calls. Check Meta's calling documentation for how the user grants permission first.
- Forced failure: break the calendar API credentials in a test copy of the workflow. Confirm the agent gives the holding reply and flags the request for staff.
- Handoff: ask for a person mid-chat and mid-call, and check the request reaches a member of staff.
The launch checklist
Before launch, I confirm the eight production requirements set out in the section above. Each line should be a yes:
- Signature validation on every webhook
- API keys rotated on a schedule
- Retention period set and the purge automated
- The agent says it is AI if asked
- A route to a person on request
- A fallback reply when a service fails
- Monitoring of errors, latency and spend
- A weekly transcript review in the diary
How long does a WhatsApp AI voice agent take to build, and what will it need?
There is no fixed figure for a DIY build, because Meta's checks, your existing systems and the number of sub-agents all change it. As a reference point, the timeline we give for our AI answering service is "Around three weeks to go live, then four to eight weeks of tuning against real calls." Budget time after launch either way.
The phases and who is involved
| Phase | What happens | Who needs to be involved |
|---|---|---|
| 1. Accounts and Meta checks | Business details matched, number registered, calling enabled | Owner or director, for documents |
| 2. Text agent | n8n workflows, Supabase memory, sub-agents, knowledge base | Builder, plus whoever owns your prices and policies |
| 3. Voice layer | Retell agent, MCP server, Twilio SIP routing | Builder |
| 4. Testing and tuning | Test calls and chats, prompt fixes, handoff checks | Builder and front-line staff |
Ongoing maintenance
Each month, review transcripts, refine prompts and update the knowledge base when prices or services change. Keep an eye on platform changes too: Meta, Twilio, Retell and n8n all update their products, and a changed API can break a workflow quietly. Document how the system fits together so someone other than the builder can fix it.
What it costs
TrustedAIAgencies' UK price index for November 2026 puts the median starting price for an AI agent, chatbot or custom build at £2,150 across 18 agencies. That is a starting price, not a quote for a two-channel build like this one. Running costs sit on top, billed separately by each platform.
On the WhatsApp side, Meta's WhatsApp Business Platform pricing page (checked 10/11/2026) charges per delivered template message, by message category and the customer's country. Replies inside the customer service window are service messages: each business phone number gets 1,000 free a month, and Meta charges from the 1,001st. Calls are priced separately: Meta's Calling API pricing page says all user-initiated calls are free, and lists the rates for business-initiated calls.
Retell AI's pricing page lists its voice rates, billed per second, and Twilio's WhatsApp pricing page lists its per-message fee on top of Meta's charges (both checked 10/11/2026). Retell's billing docs say workspaces moved to credit-based billing on 30/09/2026, with enterprise workspaces staying on monthly invoicing.
My guide to AI automation costs in the UK breaks those running costs down.
Build it yourself or have it built
If you get only a handful of WhatsApp enquiries a week, start with the text agent alone and add voice once the volume justifies it. If you are comfortable with APIs and webhooks, this guide gives you the full route.
If you would rather have it built and maintained, AI Agency Plus builds n8n workflow automation and AI voice agents for UK SMEs. I would start with your text enquiries, then add voice once the text agent is answering well.
Frequently asked questions
Can I use my existing WhatsApp number for an AI agent?
Yes, in most cases, though I still recommend a dedicated number. Meta's Cloud API onboarding docs (read 08/11/2026) say a number on the consumer WhatsApp app must have that account deleted before it can be registered, and the app stops working on it. A number on the WhatsApp Business app can join the Cloud API through coexistence and keep the app, or move off the app entirely.A new number is registered directly. Calling can be enabled on a new or fully moved number like any Cloud API number; for a coexistence number, confirm Meta's calling page lists it as supported before relying on it. A dedicated number also avoids disturbing one your staff use every day.
Do I need a WhatsApp Business API account to run an AI agent?
Yes. You need a Meta Business account and a WhatsApp Business account on the Cloud API, either directly or through a provider such as Twilio, with calling enabled on the number. The standard consumer WhatsApp app is not enough. Phase 1 above sets out the order to do it in.
Can one AI voice agent answer WhatsApp calls and normal phone calls?
Yes. The same Retell AI agent can be attached to an ordinary phone number as well as receiving WhatsApp calls through Twilio. You keep one prompt and one set of tools, so a change to your booking rules applies to both channels.
How fast does an AI voice agent need to respond?
As close to a natural pause as you can get. Stivers et al. (PNAS, 2009) put the turnover between speakers in human conversation at roughly 200 milliseconds, so a gap of several seconds feels broken. Keep mid-call tool calls lean and test the delay on real WhatsApp calls before launch.
Does a WhatsApp AI receptionist have to say it is an AI?
UK data protection law requires you to be transparent about how you process personal data in an AI system, so the people who message or call it should be told, in your privacy information, that an AI handles their messages and calls. The ICO says so in its guidance on AI and data protection.I go further and build every agent to say it is AI if a caller asks, and to route anyone who wants a person to a member of staff. My guide to the UK legal position on AI call answering covers the rest.
Can the agent handle several conversations at once?
Yes. Text conversations run in parallel, and keying each one to its own phone number in Supabase keeps their context separate. For voice, check Retell's current concurrency limits for your plan and size it to your busiest hour.
Can it connect to my existing booking software or CRM?
Usually, yes. n8n connects to most systems with an API or webhooks, including Google Calendar, Outlook, Calendly and CRMs such as HubSpot or Salesforce. Proprietary systems with no API are the exception and may need a custom connector.
