Project

WhatsApp Procurement Agent

March 30, 2026 Content directed by me, drafted with AI

What It Is

This is a client project: a procurement automation system built around WhatsApp.

Instead of asking users to learn a new dashboard first, the system lets them send messages in a familiar chat workflow, then turns those messages into structured purchasing actions behind the scenes.

Part of the motivation was operational friction. Before this, admins were effectively doing manual data entry from WhatsApp into supplier websites, and there were also concerns around potentially fraudulent transactions that needed better process control and validation.

The Core Idea

The interesting part of the project is not just “an agent that replies on WhatsApp”.

The real job is translating messy conversation into something operationally useful:

  • capture incoming text and media from WhatsApp webhooks
  • buffer and combine rapid messages into a single usable input
  • route the conversation to the right workflow
  • create and update purchase request records
  • trigger downstream automation when enough information is available

That makes it closer to an operations system than a chatbot.

Technical Shape

At a high level, the system is built from a few layers:

  • a FastAPI service for webhooks, APIs, and orchestration
  • Redis and RQ workers for asynchronous job processing
  • PostgreSQL for application data
  • an LLM-powered agent layer for conversation handling and tool use
  • browser automation with Playwright for parts of the ordering flow that still live in external web systems
  • integration with a third-party ERP system
  • S3-compatible storage for message media and attachments

What Makes It Interesting

This project forced me to think about agents in a more practical way.

The hard part was not getting an LLM to respond. The hard part was combining deterministic operational flows with more dynamic agentic behavior, while still keeping the system reliable when real people send incomplete, messy, multi-message instructions with images, documents, corrections, and missing fields.

Some of the more interesting problems were:

  • batching fast consecutive messages into one coherent input
  • deciding when a conversation has enough information to move forward
  • routing different users into different toolsets and workflows
  • handling async jobs without losing state across the system
  • keeping token usage low enough for the workflow to stay practical
  • keeping browser automation stable against anti-bot defenses
  • mixing agent logic with deterministic automation where precision matters more than language fluency

Why I Like This Project

It sits in a useful middle ground between AI and backend systems work.

The AI layer helps interpret intent and manage conversation flow, but the value of the project really comes from the surrounding system: queues, persistence, validation, routing, and automation.

That made it a good project for learning how to build agents that are actually attached to business operations instead of just demo prompts.

Stack

  • FastAPI
  • PostgreSQL
  • Redis and RQ workers
  • Playwright
  • LLM-powered agents
  • WhatsApp webhook integration
  • third-party ERP integration
  • S3-compatible storage