Back to Selected Work Archive
AutomationSTATUS: Open Source 1 0

WhatsApp Automation Hub

NLP-powered customer interaction orchestrator

A Python backend designed to process concurrent WhatsApp Webhooks. By combining intent classification with Redis state management, it handles routine support queries and provides fallback mechanisms for human agents.

01 // THE BUSINESS PROBLEM & SITUATION

Operational Context

Service businesses relying on WhatsApp face response bottlenecks during peak hours due to repetitive manual inquiries.

CLIENT / ENVIRONMENT: Created for service businesses using WhatsApp as a primary client communication channel.
02 // SYSTEM ARCHITECTURE & SOLUTION

What Was Built

Built a webhook orchestrator using Python and FastAPI. The system classifies incoming intent and dispatches defined logical flows, escalating complex cases to human staff.

WHATSAPP.ORCHESTRATOR // WEBHOOKSystem Architecture Diagram
WEBHOOK
WhatsApp API
CLASSIFIER
FastAPI NLP
STATE
Redis Cache
ESCALATE
Human Desk
SYSTEMS_ARCHITECTURE_EXPLODER // LAYERED_STACKFULL-STACK SYSTEM DECOUPLING
Frontend Layer
Next.js 16 App Router, React 19, Tailwind CSS, TypeScript
API & Middleware
FastAPI, Pydantic Schema Validation, Rate Limiters
Orchestration
LangGraph Multi-Agent Supervisor & State Machines
Model Providers
OpenAI GPT-4o, Anthropic Claude 3.5, Vision AI
Data Stores
PostgreSQL (Prisma), Qdrant Vector Store, Redis Caching
Observability
LangSmith traces, Pydantic audit logs, Error retries
03 // ENGINEERING CONTRIBUTION & FEATURES

Exact Contribution

  • Developed the FastAPI webhook receiver
  • Implemented the NLP intent classification module
  • Built a Redis-based session state store
  • Designed the human-agent escalation protocol

Key Capabilities Built

Intent Classification
Redis Session State Management
Human-Agent Handoff Protocol
Automated Flow Routing
DATA_PROVENANCE_TIMELINE // AUDIT_TRACETRACE_ID: #TR-992041
14:22:01.002Source Ingestion
Received webhook payloadOK
14:22:01.045Schema Validation
Pydantic structured field checkOK
14:22:01.210LangGraph Reasoning
Evaluated criteria rulesOK
14:22:01.350Human Audit Check
Confidence threshold evaluationPASSED
14:22:01.480Database Commit
Created audit record in PostgreSQLCOMMITTED
*Illustrative system trace — demonstration data, not a client result.
04 // EXECUTION PIPELINE

Step-by-Step Workflow

STEP 01Client sends a WhatsApp message.
STEP 02Webhook payload is parsed and validated.
STEP 03Intent classifier categorizes the message goal.
STEP 04Redis state machine maintains conversational context.
STEP 05Automated response or human escalation is dispatched.
05 // ENGINEERING LESSONS & OUTCOMES

Technical Challenges Overcome

  • Maintaining conversational memory across asynchronous webhook callbacks.
  • Handling low-confidence classifier predictions gracefully.

Measurable Outcomes

Automated tier-1 FAQ responses.
Standardized Redis state persistence across worker instances.

Lessons & Engineering Rules

  • "Stateless webhook handlers require explicit caching layers for conversational continuity."
  • "Fallback paths should be triggered when intent confidence drops below threshold."
NEXT RELATED CASE STUDY

Competitor Tracking Engine

View Study
PROJECT METADATA
ARSLAN'S ROLEBackend Automation Engineer
YEAR & STATUS2025 // Open Source
CATEGORYAutomation
TECHNOLOGY STACK
PythonWhatsApp Business APIFastAPIRedisNLP
GITHUB METRICS
Stars: 1
Forks: 0
Verified GitHub Update: 7/17/2026

Need a similar solution?

If your business faces similar data, automation, or software bottlenecks, let's discuss your requirements.

Start a Conversation