# EP 33: How Do You Give a WhatsApp AI Agent Memory Between Conversations?

- URL: https://www.agenticpod.net/episodes/ep33-whatsapp-agent-memory/
- Watch on YouTube: https://www.youtube.com/watch?v=9lgFW_kARrM
- Published: 2026-11-09
- Length: 5 min
- Hosts: Stella (asks), Liam (answers). Both are AI hosts with AI-generated voices.

## Summary

WhatsApp gives your AI agent zero memory: every message arrives as its own webhook and the model call is stateless. The fix is a load then save pattern on every turn, keyed by phone number.

## Key takeaways

- WhatsApp agents forget for three structural reasons: each message arrives as its own webhook, the model call is stateless, and history stays inside the automation tool instead of being loaded into the next conversation.
- A WhatsApp agent should remember four things: identity facts keyed by phone number, decisions already made, open loops, and the full conversation history word for word.
- The fix is a load then save pattern on every turn: save each message and reply as it happens, dedupe on the WhatsApp message ID, load the customer's history before the model reasons, and save the outcome after it acts.
- Vilix AI works as the memory store for this pattern: cloud hosted, reached over MCP with get_context and save_turn, storing full conversation history rather than extracted facts only.
- Agencies should use one Vilix AI account per client, so each client's customer memory stays separate while the same setup is reused.

## Chapters

- 0:00 Intro
- 0:39 Why WhatsApp agents forget
- 1:42 What the agent should remember
- 2:50 The fix, step by step
- 4:28 The client angle and the verdict

## FAQ

**Why does my WhatsApp AI agent forget returning customers?**

Because nothing carries over by default. WhatsApp delivers each message as a separate webhook event, the model call only contains what your code puts in it, and most setups never load the previous conversation into the next one.

**What should a WhatsApp agent remember?**

Identity facts such as name and language, decisions already made such as refunds or discounts, open loops such as documents still owed, and the full conversation history so disputed details can be checked word for word.

**How do I stop a WhatsApp agent answering the same message twice?**

WhatsApp can deliver the same message twice when your server answers slowly. Store the message ID with each saved turn and skip any message ID you have already saved.

## Resources

- [Step-by-step guide with the architecture and setup](https://github.com/asly-97/ai-automation-workflows/tree/main/whatsapp-agent-memory)
- [https://vilix.ai](https://vilix.ai)

## Transcript

### Intro

Liam: Hey hey hey, welcome to Agentic Pod! I'm Liam.

Stella: And I'm Stella! Liam, a customer gets a refund approved on WhatsApp on Monday, comes back Friday, and the agent asks for their order number like Monday never happened. How is that still normal?

Liam: Because WhatsApp gives your agent zero memory. Every message arrives on its own, and the agent only knows what your code hands it in that one moment.

Stella: Zero? It does not even get the earlier chat?

Liam: Nothing. By the end of this, you will know the four things it should remember, and the pattern that fixes it.

### Why WhatsApp agents forget

Stella: Okay, start simple. Where does the memory actually break?

Liam: Three layers, and every one starts blank. First, WhatsApp delivers each message to your server as its own webhook event. Your handler wakes up, reads one message, and exits.

Stella: So the chat window I see on my phone is not what the agent sees.

Liam: Exactly. You see a thread. The agent sees one lonely message. Second layer: the model call is stateless. Send just the new message, and, uh, the model cannot know this customer answered your questions yesterday.

Stella: And the third layer?

Liam: Most setups keep history inside the automation tool, if they keep it at all. When the conversation ends, nobody loads it into the next one. So the returning customer gets asked their name, their order number, their problem, all over again.

Stella: That is how you get "agent. human. please." in all caps.

Liam: Every time. So, what should it actually remember?

### What the agent should remember

Liam: Four things. One, identity facts. Name, language, account details.

Stella: Keyed by what? An email they never gave you?

Liam: By phone number. It is in every webhook payload, and it is how your team already finds a WhatsApp contact. Two, decisions already made. A refund already offered. A discount already approved. A human already taking over.

Stella: Because re-deciding is worse than forgetting. Imagine approving a refund twice.

Liam: Or un-approving one. Three, open loops. The document they still owe you, the appointment still to confirm. And four, the full conversation history, word for word.

Stella: Why full history, if you already stored the decisions?

Liam: Because decisions get disputed. A note that says "customer was offered a discount" does not tell you it was ten percent, or that it expired on Friday. The real exchange does. One to three stop the repeat questions. Four stops the contradictions.

Stella: Okay, so how do you wire this up without building a whole memory department?

### The fix, step by step

Liam: The pattern is load, then save, on every turn. Save each turn as it happens, the customer's message and your agent's reply, keyed by that phone number.

Stella: And WhatsApp retries, right? I have heard the double reply horror stories.

Liam: Yeah, if your server answers slowly, the same message can get delivered twice. So you store the message ID with each turn and skip one you already saved. Otherwise the agent answers twice, which is, you know, worse than forgetting.

Stella: Double memory, double confidence, same wrong answer.

Liam: Before the model reasons, you load that customer's history into the call. After it acts, you save the outcome, not just the reply.

Stella: And this is where Vilix AI comes in, because doing all that per agent sounds like a second job.

Liam: Right. Vilix AI is that memory store, already built, and cloud hosted, so there is zero infrastructure to run next to your webhook server. The agent calls get_context before it reasons, and save_turn after it replies, saving the full exchange back.

Stella: And the retrieval is not just keyword matching?

Liam: Semantic and keyword at the same time, so it finds what a conversation meant, and still matches exact strings like order IDs word for word. Vilix AI stores the full conversation history, not just extracted facts. When two saves disagree, the newest one wins, and each save carries a source label.

Stella: So the follow-up agent and the human teammate read the same memory too?

Liam: Same account, same memory. That is the whole point. Which brings us to your favorite topic.

### The client angle and the verdict

Stella: Agencies. Say I build WhatsApp agents for, like, six clients. One memory for all of them?

Liam: One Vilix AI account per client. Each client's agents connect to that client's account, so their customer memory belongs to their business and never mixes. You wire up Vilix AI once per client instead of building memory six times.

Stella: And trying it costs what?

Liam: Vilix AI has a free plan that is free forever, and a 7-day Pro trial with no credit card. You can export everything or delete it anytime.

Stella: My verdict: if your agent asks a returning customer for their order number, it does not have a memory problem, it has no memory, full stop.

Liam: Same. Links are in the description. What has your WhatsApp agent forgotten lately? Tell us in the comments. See you next time!
