# WhatsApp AI agents for sales and support

> Mirai Minds builds WhatsApp AI agents that hold long conversations with customers on the WhatsApp Business Platform. They run on Gemini, remember people across weeks with Mem0 and rolling summaries, answer from your documents and serve several business numbers from one system. We also build team inboxes so staff can read any conversation and reply.

## Key facts

- **Model:** Gemini, with per-owner key and model settings
- **Memory:** Mem0 plus a rolling summary every 20 messages
- **Reply timing:** Waits 3 s after the customer's last message
- **Numbers:** Several WhatsApp Business numbers in one system
- **Human takeover:** Team inbox that respects WhatsApp's 24-hour window
- **Typical build:** 2–8 weeks


## What we build

### Long conversations that stay coherent

- Problem: Customers come back days later and the bot has forgotten them, or the prompt has grown too long to afford.
- System: Every 20 messages are folded into a rolling summary of at most 150 words. The agent sees that summary, the last 20 messages and relevant long-term memories from Mem0.
- Result: Context stays small and relevant in conversations that run for weeks.

### Answers from your documents

- Problem: Answers must match current price lists, policies or product sheets.
- System: Documents are chunked and indexed in a knowledge service shared with our voice agents, and the agent retrieves passages before it answers.
- Result: One knowledge base serves both phone and WhatsApp agents.

### A whole signup inside one chat

- Problem: Founders drop off long signup forms.
- System: For iKoMatch, the founder sends a pitch deck in chat, the agent reads it, a voice call fills the gaps and the profile publishes itself. A 45-day campaign then delivers a daily slate of matched investors in the same thread.
- Result: Signup, onboarding and daily delivery happen in one WhatsApp conversation, with no forms.

### People step in when it matters

- Problem: Some conversations need a person, and WhatsApp limits what a business may send after 24 hours of silence.
- System: A team inbox shows every conversation with media and read receipts. Staff reply in the thread; once the 24-hour window closes, the composer locks and only approved templates can go out.
- Result: Staff can take over a conversation without breaking WhatsApp's messaging rules.

### Replies that read like texting

- Problem: A customer sends three short messages in a row and gets three separate bot replies.
- System: The agent waits 3 seconds after the last message, answers once, and splits long replies into short bubbles with natural pauses.
- Result: Conversations read like a person typing, not a form.

## How is a WhatsApp agent different from a website chatbot?

A website chat lasts minutes. A WhatsApp conversation can run for weeks, with photos, voice notes and documents in between, and the customer expects you to remember. WhatsApp also has rules a website doesn't: replies are free-form only within 24 hours of the customer's last message, and after that only templates Meta has approved can go out. An agent that ignores those rules has its messages rejected.

Mirai Minds builds WhatsApp agents that are designed around this. They run on our [WhatsApp Agents](/work/whatsapp-agents-platform) service, which already handles long-running conversations for [iKoMatch](/work/ikomatch-ai-fundraising-assistant).

## How does it remember without a huge prompt?

Sending the whole history to the model on every message gets slow and expensive, and it gets worse as the conversation grows. Instead, every 20 messages are folded into a rolling summary of at most 150 words. The agent sees that summary, the last 20 messages and the long-term memories Mem0 finds relevant to the current message. A founder who mentioned their funding stage a month ago doesn't have to repeat it.

The agent also waits 3 seconds after a customer's last message before it answers, so three quick messages get one reply.

## How do people stay in control?

Three ways. First, staff can read every conversation in a team inbox and reply in the thread; once the 24-hour window closes, the inbox only lets them send approved templates. Second, the prompt says which topics the agent must hand to a person, and we test those cases before launch. Third, templates and broadcasts go through your approval and Meta's before any customer sees them.

## What does a build involve?

Setting up the WhatsApp Business account and webhook, writing and approving templates, loading your documents into the knowledge service, and writing the prompt with the cases where a person takes over. Then we test on real past messages, launch with staff watching the inbox, and tune from what customers actually send. The same knowledge base can serve a [voice agent](/services/voice-ai-agents), so phone and chat give the same answers.

## Typical stack

- **Model:** Gemini (google-genai)
- **Memory:** Mem0, Rolling summaries in PostgreSQL
- **Messaging:** WhatsApp Business Platform (Cloud API), Approved message templates
- **Knowledge:** Shared retrieval service, Chunked document collections
- **Backend:** FastAPI, PostgreSQL, SQLAlchemy (async), Alembic, Amazon S3 for media
- **Documents:** unoserver for deck and document conversion

## Related work

- [iKoMatch: an AI fundraising assistant on WhatsApp and voice](https://www.miraiminds.co/work/ikomatch-ai-fundraising-assistant.md) — 6,717 investor records; each day's matches graded by an LLM judge
- [WhatsApp Agents: our service for AI WhatsApp conversations](https://www.miraiminds.co/work/whatsapp-agents-platform.md) — Runs iKoMatch's founder conversations on WhatsApp
- [Voice Agents: our platform for AI phone agents](https://www.miraiminds.co/work/voice-agents-platform.md) — Live at voice-agents.miraiminds.co

## Frequently asked questions

### Do we need the WhatsApp Business Platform?

Yes. The agent sends and receives through Meta's WhatsApp Business Platform with a verified business number. We help with the setup, message templates and webhook; Meta approves templates and sets the rules for when a business may message a customer.

### What happens after 24 hours without a reply from the customer?

WhatsApp only allows approved template messages once 24 hours have passed since the customer's last message. Our agents and team inboxes respect that: free-form replies stop, and follow-ups go out as templates you have approved.

### How does the agent remember a customer?

Three layers: the last 20 messages, a rolling summary of everything older (rewritten every 20 messages, 150 words at most), and long-term facts in Mem0, such as a preference or a company's stage. The agent only pulls in memories relevant to the current message.

### Can a person take over a conversation?

Yes. Staff read every conversation in a team inbox, with media and read receipts, and reply in the same thread. We agree the rules with you before launch: which topics go to a person and how the agent should behave once someone has replied.

### Can one system run several WhatsApp numbers?

Yes. Each number is its own account with its own credentials and prompt, picked by the phone number ID on each incoming message. Account owners can also bring their own Gemini key and model.

### Which languages does it handle?

Gemini reads and writes most major languages, including Hindi and mixed Hindi and English. We test prompts on real messages from your customers before launch, because tone matters as much as grammar on WhatsApp.


---

Canonical: https://www.miraiminds.co/services/whatsapp-ai-agents
Last updated: 2026-09-23
Publisher: Mirai Minds LLP, 906 Sarthana Business Hub, Nana Varachha, Surat, Gujarat 395013, India. hello@miraiminds.co
