AI Voice & WhatsApp Sales Agent
AI agents that answer and make sales calls for a jewellery retailer.
- 700+
- AI calls a day
- 24/7
- Inbound coverage
The short version
A production AI calling platform for a jewellery retailer. AI voice agents answer inbound calls and run outbound campaigns on their own. After each call the customer gets the right catalogue on WhatsApp, and the sales team manages everything from one real-time console.
The problem
The business received hundreds of calls a day about gold rates, collections, wastage, making charges and store details, and wanted to re-engage thousands of past customers. A human team couldn't answer every call, remember what each caller wanted, send the right catalogue afterwards and call cold leads back at scale.
What it does
Inbound AI agent
Answers every call 24/7, handles product and pricing questions from a knowledge base (RAG), spots hot leads and transfers to a live agent when needed.
Outbound AI dialer
Runs campaigns from uploaded contact lists, respecting calling windows, pacing, DNC and consent rules, with automatic retries and backoff.
Post-call AI pipeline
Turns each transcript into a summary, outcome, interest, objections, budget, buying window and next actions.
WhatsApp automation
Matches what the customer asked for to the catalogue with vector search, then delivers links on a 30/90/270-minute retry ladder with duplicates blocked.
Operations console
Live dashboard, call logs with recordings and transcripts, campaigns, callbacks calendar, analytics, exports, roles and prompt management.
How it’s built
Distributed outbound dialer
The call queue lives in Postgres and is claimed with FOR UPDATE SKIP LOCKED, so several workers run at once without calling the same customer or taking the same line twice.
Self-learning concurrency (AIMD)
The dialer discovers the SIP trunk's hidden channel limit with the additive-increase, multiplicative-decrease method TCP uses. Nobody sets capacity by hand.
Carrier-error classification
Separates 'no free line' from 'customer didn't answer', so congestion never burns a customer's retry attempts.
Observable AI workflows
Every post-call pipeline is a named Mastra workflow persisted to Postgres, and the console shows which step failed and why.
Zero-drift migration
Moved from SQLite and in-memory state to Postgres and pgvector, with verification scripts proving RAG results matched the old system exactly.
Real-time console
Live calls, campaign progress and transfer requests are pushed to the UI over Server-Sent Events.
Tools
- Next.js 15
- React 19
- TypeScript
- Tailwind
- shadcn/ui
- TanStack Query
- Recharts
- Node.js 22
- Fastify 5
- Zod
- OpenAPI
- Server-Sent Events
- Mastra
- Azure OpenAI
- Vercel AI SDK
- RAG
- OpenAI embeddings
- Vapi
- SIP trunking
- Live call transfer
- WhatsApp Business webhooks
- PostgreSQL 16
- pgvector
- pg_trgm
- Prisma
- JWT + rotating refresh tokens
- Argon2id
- AES-256-GCM at rest
- HMAC webhooks
- RBAC
- Audit logs
- Docker
- Docker Compose
- Nginx
- Linux VPS
- Vitest
- React Testing Library
- MSW
What changed
- 700+ inbound and outbound calls handled by AI every day
- Every inbound call answered, 24/7, with no missed leads
- Catalogues and follow-ups sent on WhatsApp within minutes of the call
- Hot leads and callbacks handed to human agents with full call context
- Funnel, objection and interest analytics for management, with Excel and CSV export