Urgent.News

What's breaking now, across hundreds of outlets.

AI

Building a Production AI Agent for WhatsApp, Messenger and Web: What Actually Breaks

I'm Rohan Fardin, an AI & Automation Engineer based in Dhaka, Bangladesh. At Ray White Ltd I build AI systems for sales and support teams, and the biggest one, a set of RAG chatbots and the Dagao AI agent, now serves 3,000+ users across WhatsApp, Facebook Messenger and the web. Demo videos, if you want to see it running: Dagao AI Agent Demo: https://youtu.be/V6M-YyultxY Dagao Task Manager Demo:…

Rohan Fardin, an AI & Automation Engineer based in Dhaka, Bangladesh, shared his experience building a production AI agent for WhatsApp, Facebook Messenger, and the web at Ray White Ltd. The project involved creating RAG (Retrieval-Augmented Generation) chatbots and a Dagao AI agent that now serves over 3,000 users across the three channels.

The architecture consisted of WhatsApp and Facebook Cloud APIs feeding a FastAPI backend, with the website widget also hitting the same API. All three channels shared one brain, allowing for efficient handling of user queries.

The system used Retrieval for company documents, property listings, and FAQs, which were chunked, embedded, and stored in a vector database. The LLM only received the top matching chunks before generating an answer. A system prompt was included to force the LLM to say "I don't know" and hand over to a human if it couldn't provide a confident answer.

The agent was capable of handling various tasks beyond answering questions, such as qualifying leads, creating tasks in Dagao (the task manager), and updating CRM records. Before any customer-facing action, the agent required human approval.

Rohan highlighted several key issues that broke the system in production:

1. Users do not ask clean questions. The input is often messy, containing voice notes, screenshots, half-sentences, or multiple questions in a single message. The chunking and retrieval mechanisms had to be robust enough to handle such messy input.

2. RAG quality is fundamentally a data problem, not a model problem. Debugging bad answers consistently traced back to stale or poorly structured source data, rather than the model itself. Garbage in the knowledge base leads to garbage out.

3. Latency is a critical factor. On WhatsApp, even a perfect answer delivered after 40 seconds was considered a failed answer. Streamlining the retrieval step, caching common answers, and keeping the system lean proved more important than using a larger model.

4. Handover is non-negotiable. When the agent is unsure, it must provide the full conversation context to a human, rather than starting from a cold ticket. Designing an effective handover system was crucial for earning the team's trust in the AI agent.

5. Logs serve as the product roadmap. Regularly reviewing failed conversations every week proved more valuable than any evaluation framework. By analyzing the clusters of failures, the team could pinpoint exactly what needed to be fixed next.

The technology stack employed included Python, FastAPI, LangChain, OpenAI APIs, vector search (using FAISS or Pinecone), Docker, and extensive error handling.

Rohan concluded by suggesting that anyone building AI automation for businesses should reach out to him on LinkedIn for a comparison of notes and insights.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

More from Dev.to on urgent.news

Get the news by email. Yesterday's most-covered stories, every morning.

We track opens and clicks to improve the newsletter.

See today's edition · More options

More in AI

More from Sunday, 6 December 2026 →