- AI & Automation
- DevOps & Infrastructure
- Web Development
Neema AI: WhatsApp sales agent
An AI sales agent that runs customer conversations and orders over WhatsApp, with humans able to step in at any moment.
The problem
Many online shops sell over WhatsApp, but answering every product question, building every cart and confirming every order by hand doesn't scale. A fully automated bot, on the other hand, can't be trusted with every customer.
What we built
Neema handles the whole sales conversation on WhatsApp: answering questions, finding products, managing the cart and placing the order. It remembers each customer's history, preferences and past orders, and reads the mood and intent of every message before it replies.
How every message flows
Each inbound message runs through an n8n workflow:
- 1
Receive the WhatsApp message and identify the customer.
- 2
Load the customer's context from the API.
- 3
Classify intent, mood and buying signals.
- 4
Generate a reply, with cart and order actions, using GPT-5.
- 5
Check whether a human agent has taken over the conversation.
- 6
Format the reply and send it through the WhatsApp Business API.
Humans stay in control
A real-time dashboard built in Next.js shows every live conversation. Agents can intercept a chat, reply directly, approve the AI's drafts, hand the conversation back, or transfer it to a colleague. Updates arrive over WebSockets, backed by Redis pub-sub. Admin, Agent and Read-only roles control who can do what.
Under the hood
A FastAPI service (Python 3.12, async SQLAlchemy, Alembic migrations) stores conversations, orders and a product catalogue with SKU aliases, pricing and stock in PostgreSQL 16. The platform starts with a single Docker Compose command, sits behind nginx with Let's Encrypt certificates, and was moved from an earlier Firestore-based version to this API.