← Back to Blog

Building Akua: A Production-Ready WhatsApp AI Shopping Assistant

How I built a reliable WhatsApp AI shopping assistant for Clickmothercare that survives hallucinated products, silent save failures, and multi-agent handoff bugs.

Anas Rhimi
Anas Rhimi August 2026 • 8 min read

When building an AI chatbot for an e-commerce platform like Clickmothercare, the stakes are high. If a traditional web app crashes, you get a 500 error. If an AI shopping assistant hallucinates a product that doesn't exist, recommends the wrong size to a pregnant mother, or silently drops a user's cart—you lose the customer permanently.

The client needed Akua: a WhatsApp-based AI shopping assistant that could handle natural language queries, check real-time inventory, and guide users through checkout seamlessly. But bridging the gap between unpredictable LLMs and rigid e-commerce backends is a monumental infrastructure challenge.

The Three Deadly Sins of Production AI

During the build, we ran into three critical failure modes that plague almost all "wrapper" AI projects:

  • Hallucinated Products: The LLM would confidently offer products that Clickmothercare didn't actually stock, leading to dead-end conversations.
  • Multi-Agent Handoff Bugs: Transitioning the conversation state from the "Greeting Agent" to the "Inventory Lookup Agent" to the "Checkout Agent" would frequently drop context, asking the user to repeat themselves.
  • Silent Save Failures: Network timeouts between the LLM API and the database caused state mutations to fail silently, meaning the bot would forget what was in the user's cart mid-conversation.

Architecting Reliability with n8n & Kubernetes

To solve this, I completely re-architected the backend infrastructure. Instead of relying on a monolithic Python script, I implemented a robust, asynchronous event-driven architecture using n8n hosted on Kubernetes.

We solved hallucinations by forcing the LLM to execute strictly typed tool calls against a cached Redis inventory database, rather than relying on its internal knowledge. We fixed handoff bugs by externalizing conversation state to a high-availability PostgreSQL cluster. And we eliminated silent failures by implementing message queues with exponential backoff retries.

The result? Akua now handles thousands of WhatsApp messages reliably, proving that AI is only as good as the infrastructure it runs on.

Is your AI agent's infrastructure secure and reliable?

Book a Free 15-Min Technical Audit
Hire Me