Skip to content
Back

2026

WhatsApp PharmAgent

AI pharmacy assistant on WhatsApp with multi-pipeline orchestration over Azure

  • Python
  • Azure Functions
  • Azure OpenAI (GPT-4.1)
  • Cosmos DB
  • Document Intelligence
  • Speech-to-Text
  • Twilio WhatsApp API
  • Next.js

The problem

Small Indian pharmacies juggle paper invoices, manual stock counts, and phone-based reorders. Pharmacists already live on WhatsApp for supplier communication. PharmAgent puts the entire inventory workflow on the channel they already use, no app install, no training, and no separate POS device. A pharmacist can photograph a supplier invoice, send a voice note for a sale, or type a stock query, all in the same chat.

Architecture

A single Azure Function receives the Twilio webhook and delegates to a router that classifies the inbound message by type (image, audio, text, or session command). Three downstream services handle the actual work. The invoice service uploads images to Blob Storage, calls Document Intelligence with the prebuilt-invoice model, augments the result with regex fallbacks for missing batch numbers and expiry dates, and stores an editable session in Cosmos DB so the pharmacist can correct fields over WhatsApp before confirming. The voice service downloads audio from Twilio, transcribes via Azure Speech REST, and feeds the transcript through GPT-4.1 with a structured JSON intent schema. The text service goes straight to the LLM for intent classification. All three converge on a shared inventory service that handles the actual stock CRUD, with confirmation prompts before any destructive action. State for pending confirmations and in-flight invoice edits lives in a Cosmos sessions container keyed by phone number.

What I owned

System architecture and stack choices (Azure Functions, Cosmos DB, Twilio, GPT-4.1). Master orchestrator and message routing. Cosmos DB schema design across all 4 containers and the full data layer. Twilio WhatsApp integration. The natural language query pipeline end to end, including intent classification, inventory CRUD, and the confirmation flow. The invoice OCR and voice billing pipelines were built jointly with a teammate. The Next.js dashboard and its deployment were handled by another teammate.

Hardest technical decision

Choosing Cosmos DB over Postgres. Cosmos's schema flexibility was important because invoice OCR returns inconsistent field shapes across distributors, and pending session state is a natural document model. The trade-off was Request Unit cost on hot reads. I designed around it by partitioning every container by phone number, which keeps the access patterns single-partition and predictable, and by keeping session documents short-lived. If the read volume grew, the right next move would be a Redis cache in front of inventory lookups, but at the current scale the design holds.

What I'd do differently

Rebuild the orchestrator as an explicit conversational state machine rather than stateless intent routing. The current design routes each message in isolation and relies on the LLM to recover context from the prior turn, which works for clean conversations but is brittle for repair flows like a user clarifying a misheard product name across two messages. A state machine with named conversation states would also make the confirmation logic easier to test in isolation. I would also put a Redis cache in front of the inventory container. Repeated "do we have X" queries within a single session burn Cosmos RUs unnecessarily, and the cache invalidation rule is simple because every write goes through the inventory service.

Other projects

2026SWE Intern at Bajaj Finance Ltd

IT Request Advisory Agent

An advisory AI agent that reads database support tickets from Azure DevOps Boards and drafts risk-flagged SQL proposals for human review, without ever executing against a production database.

  • Built an advisory AI agent using Python and Azure OpenAI that reads database support tickets from Azure DevOps Boards, grounds them in a curated PostgreSQL knowledge base of 14 tables, and drafts risk-flagged SQL proposals for human review, with deterministic post-guards achieving 94.24% classification accuracy and zero false negatives on destructive SQL.
  • Designed a 7-stage pipeline (ingest, normalize, classify, resolve, generate, compose, notify) with three-stage classification and a four-tier SQL risk ladder that wraps destructive statements in rollback transactions and blocks DDL entirely.
  • Automated SLA metrics reporting via GitHub Actions and curated a 278-pair ground-truth dataset via the Azure DevOps REST API to quantitatively benchmark the agent.
  • Python
  • Azure OpenAI
  • PostgreSQL
  • Azure DevOps REST API
  • GitHub Actions
2026Founding Engineer at Crescentia One LLP

Leopardol E-commerce Platform

Live at leopardol.com. End-to-end e-commerce platform for a Gen Z clothing brand, built as Founding Engineer at Crescentia One LLP

  • Owned the full backend (Express, Razorpay, Delhivery, support and email flows, rate limiting, cron) and led the engineering for a production e-commerce platform built from scratch.
  • Made the infrastructure calls, AWS EC2 for the Express backend and Cloudflare R2 over S3 for image storage (R2 has zero egress fees and lower per-GB pricing). Handled the deployment end to end.
  • Led client engagement and architecture decisions across the build.
  • Next.js
  • Express.js
  • TypeScript
  • PostgreSQL (Neon)
  • Prisma
  • Better Auth
2026Founding Engineer at Crescentia One LLP

ProfitMaster Website

Two-app financial-education platform for ProfitMaster (profitmaster.in), a Telugu-language stock market education company, built as Founding Engineer at Crescentia One LLP.

  • Built a two-app platform for a Telugu-language stock market education company, a public site on Cloudflare Workers at the edge and an admin dashboard on Vercel, both reading one Supabase Postgres schema.
  • Made concurrent seat reservation safe for capped-attendance seminars with a Postgres function that runs the capacity check and pending order insert in a single transaction, so a full event returns a clean sold out instead of failing at payment time.
  • Owned the user-facing site end to end (page routing, seminar registration, blog reading, Razorpay checkout with server-authoritative pricing), its deployment on Cloudflare Workers, and client engagement through the rollout.
  • Next.js
  • Cloudflare Workers
  • Vercel
  • Supabase Postgres
  • Razorpay
  • Cloudflare R2