Production

Mindi AI

Multi-agent RAG customer service

The story

Mindi is the customer-service agent on Abadikan's WhatsApp, where couples ask about our digital wedding invitations. Most questions repeat, but the answers have to be right: prices, promos, how to order. A wrong price in a sales chat costs trust.

It runs on Bun and Hono, with a LangGraph.js state machine per conversation. Incoming messages are buffered and debounced, so a burst of texts gets one reply. A fast path handles first contact and catalog requests with fixed templates. Everything else goes through triage by a small Llama model on Groq, retrieval from a Q&A knowledge base in MongoDB Atlas vector search, and a specialist model whose output is schema-checked. Deterministic guardrails then check the draft, for example that every price is on the allowed list. A failed draft gets one repair attempt; if it still fails, the chat goes to a human through a Discord alert.

I designed and built it. Sessions and eval runs live in Postgres, every node is traced in LangSmith, and a golden-set benchmark scores answer quality.

Highlights

  • LangGraph.js state machine: triage → retrieval → specialist → escalation
  • Deterministic guardrails plus a one-shot repair loop before human handoff
  • Answers grounded in a Q&A knowledge base on MongoDB Atlas vector search
  • LangSmith tracing and a golden-set evaluation harness
  • Runs in production on Abadikan's WhatsApp channel

Stack

  • LangGraph.js
  • RAG
  • MongoDB Atlas Vector Search
  • Bun
  • Hono
  • Postgres

Resources

Filed under

More projects