05Multi-Agent Python - WhatsApp
Ecommerce Swarm
LangGraph orchestrates a swarm of specialized Gemini agents for Shopify customer support over WhatsApp, with RAG, order lookup, refunds, and human escalation.
LangGraphGemini 1.5 ProFastAPIShopify Admin APIChromaDBRedisWhatsApp Cloud API
The problem
E-commerce support mixes FAQ questions with sensitive order and refund operations that require identity verification. A single LLM prompt can't route safely across catalog search, order lookup, and policy answers.
What it proves
Production multi-agent architecture: LangGraph state machine, specialized tool-using agents, response validation with retry/escalation, and WhatsApp webhook security.
Architecture
- 1.WhatsApp webhook hits FastAPI with signature validation + Redis idempotency/rate limits
- 2.classify_intent routes to rag, sales, orders, customers, greeting, or escalation nodes
- 3.Each specialized node runs a Gemini ReAct agent with Shopify or ChromaDB tools
- 4.response_validator checks answer quality; max 2 retries then forced human escalation
- 5.format_response adapts output for WhatsApp formatting before Cloud API send
Engineering highlights
- +Admin API REST for orders, customers, and refunds (not Storefront)
- +Phone validation before exposing sensitive order data
- +X-Hub-Signature-256, idempotency keys, sliding-window rate limits
- +Validator loop with automatic escalation after 2 failed attempts
Demo
Demo: FAQ from RAG, product search, order status with phone check, refund escalation.
Demo recording coming soon