Cody — WhatsApp AI Sales Agent
Production multi-turn, tool-calling WhatsApp AI agent with live monitoring dashboard
Overview
Cody is a production WhatsApp AI agent deployed at CodeMyFYP, built on Flask and the Claude API. It handles real sales conversations around a defined sales-assistant persona — processing INR/UPI pricing queries, mirroring Hindi/Hinglish based on detected user language, and managing vacancy/job-related queries as the dominant traffic type. Includes a live monitoring dashboard for observing tool invocations and failure modes.
Problem
Sales conversations on WhatsApp were handled manually, creating bottlenecks for pricing queries, vacancy information, and language-specific (Hindi/Hinglish) customer support. Teams lacked real-time visibility into conversation health and agent failure modes.
Solution
A multi-turn, tool-calling WhatsApp agent built on Flask and Claude Haiku. Tool-calling logic handles pricing lookups, vacancy queries, and language detection. A live monitoring dashboard gives the team real-time visibility into every conversation, tool invocation, and failure mode.
Architecture
- 1Flask webhook endpoint receives WhatsApp Business API messages
- 2Claude Haiku (Anthropic API) with multi-turn conversation context
- 3Tool-calling layer: pricing tools, vacancy query tools, language detection
- 4Hindi/Hinglish language mirroring based on detected user language
- 5Live monitoring dashboard — conversations, tool invocations, failure modes in real time
- 6Conversation state persisted across turns for coherent multi-turn sessions
Technical Challenges
- Designing tool schemas precise enough to prevent Claude from hallucinating pricing or vacancy data.
- Implementing language detection reliable enough to mirror Hindi/Hinglish consistently without misclassification.
- Building a monitoring dashboard that surfaces tool-call failures without cluttering the operator view.
Results
- Automated the dominant traffic type — vacancy and pricing queries — reducing manual sales workload.
- Live monitoring dashboard gave real-time production visibility into agent health.
- Successfully processed real user conversations with multi-turn coherence and correct tool invocations.