Building a WhatsApp AI agent yourself
Meta's Cloud API plus an LLM looks like a weekend project. The model is the easy part. Here is the list of what production needs, and what one call to Altrnative's API does instead.
What you would build
| Piece | What it involves |
|---|---|
| Webhook | Verify Meta's challenge, check the X-Hub-Signature-256 of every event against the right app secret, answer fast, and survive Meta retrying the same event |
| Routing | Several numbers and apps on one endpoint; each event to the right number, tenant and conversation |
| The 24-hour window | Free-form replies only within 24 hours of the customer's last message; a template outside it |
| Templates | Submit for approval, map named and numbered variables, headers and buttons; handle rejections and recategorisation |
| Sending at scale | Meta's per-number throughput and daily messaging tiers, backoff on throttling, a queue that survives a deploy |
| Never twice | Idempotency so a retried batch doesn't message real people again |
| Opt-outs | STOP, "unsubscribe", "band karo": honoured before every send |
| The agent | The prompt, the whole conversation as context, what to capture, when to hand over, what never to say, and replies in the customer's language |
| Captured answers | Structured fields from free text, merged across replies, typed, exportable |
| Receipts | Delivered, read, failed with Meta's reason, button presses, all matched back to the right contact |
| Billing | Meta's charge per category, and (since 1 October 2026) per reply inside the window too |
Each piece is a few days; together they are months, and then they need running.
Or: one call
POST /api/v1/chats
{
"agent": "ag_…",
"number": "+919812345678",
"template_name": "visit_followup",
"variables": {"1": "Riya"},
"context": "Lead L-2231, asked about Sunrise Residency 3 BHK"
}
The template goes out; the agent answers every reply; GET /api/v1/chats/{id} returns the status, the messages and what the agent captured. An Idempotency-Key header makes a retry safe. Opt-outs, the 24-hour window, template checks and credit are checked before anything is sent. See the API docs.
What it costs
No monthly fee. ₹0.30 per 24-hour agent conversation, AI included, plus Meta's own charges at cost; a conversation with 6 agent replies is about ₹0.99.
When building it yourself is right
- WhatsApp is your product's core and you need control of every byte.
- You have engineers to run it: on-call, Meta's changes, template reviews, billing.
For everyone else, the agent is the part that matters, and that is the part Altrnative lets you write in plain words.
Questions
Can I build a WhatsApp AI agent with the Cloud API and an LLM?
Yes. You need a webhook with signature checks, routing per number, the 24-hour window rule, approved templates, throttling and retries, opt-outs, receipts, and the agent logic itself. Altrnative's API does all of that; you write the agent in plain words and start chats with POST /api/v1/chats.
Does Altrnative have a WhatsApp AI agent API?
Yes. POST /api/v1/chats starts a WhatsApp chat that an agent answers, GET /api/v1/chats/{id} returns its status, messages and captured fields, and GET /api/v1/agents lists your agents. Account API keys are made in the dashboard.
How much does the Altrnative API cost?
The same as the product: ₹0.30 per 24-hour agent conversation plus Meta's charges at cost, with no monthly fee and $5 free to start.
Try it on your own number
Describe your agent in plain words, test it in a chat, and put it on your WhatsApp. $5 free to start, no subscription.
Read next
- A WhatsApp AI agent for your business
- WhatsApp Business API pricing in India
- WhatsApp bulk messaging, the approved way
- A WhatsApp chatbot that reads what people type
- WhatsApp for real estate
- WhatsApp for e-commerce and D2C brands
- WhatsApp for logistics
- WhatsApp for clinics and hospitals
- WhatsApp for education
- AI agents for operations
- Send a quote in minutes, not days
- Payment reminders on WhatsApp
- Take orders on WhatsApp, without retyping them
- The cheapest WhatsApp AI agent in India, with the maths
- WhatsApp Business API providers in India, compared
- Altrnative vs WATI
- Altrnative vs Interakt
- Altrnative vs AiSensy
- Altrnative vs Gupshup
- Altrnative vs Meta Business Agent
- Questions about Altrnative