01 — The Problem
AI is powerful, but accessibility is a barrier. In Zimbabwe and across Africa:
- Most people won’t download a new app (data costs, storage limitations, app fatigue)
- Website-based chatbots require browser access and data
- AI interfaces assume technical literacy that most users don’t have
- The people who could benefit most from AI assistance have the least access to it
Meanwhile, WhatsApp is universal. Over 90% of smartphone users in Zimbabwe use it daily. It’s already optimised for low-bandwidth networks. People are comfortable typing messages in it. It requires zero onboarding.
The opportunity: bring AI to the platform people already live on.
02 — Context
Details to be added by Vincent.
03 — Why I Built It
Details to be added by Vincent.
04 — Approach
A WhatsApp-native AI assistant that:
- Receives messages via the WhatsApp Cloud API
- Understands intent using natural language processing
- Generates helpful responses using GPT-4 class models
- Maintains conversation context across multiple messages
- Handles diverse queries - from general knowledge to specific business questions
Users simply message the WhatsApp number like they’d message a friend. No accounts, no apps, no learning curve.
05 — Architecture
User (WhatsApp) → WhatsApp Cloud API → Webhook (FastAPI)
│
▼
┌──────────────────┐
│ Message Handler │
│ - Parse input │
│ - Load context │
│ - Route intent │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ AI Engine │
│ - Build prompt │
│ - Call OpenAI │
│ - Parse response │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Response Layer │
│ - Format output │
│ - Send via API │
│ - Store context │
└──────────────────┘
06 — Technology
FastAPI - Async webhook handling is critical. WhatsApp sends messages via webhooks that must respond quickly. FastAPI’s async support handles concurrent messages without blocking.
Redis for conversation context - Each user’s conversation history is stored in Redis with a TTL. This gives the AI context about previous messages without expensive database queries on every interaction. Context expires after inactivity so the system doesn’t accumulate stale conversations indefinitely.
PostgreSQL for analytics - Every interaction is logged: message content, response time, user satisfaction signals, error rates. This data drives improvements to the system over time.
WhatsApp Cloud API (Meta) - Chose the official API over unofficial libraries (Baileys) for production reliability. The official API has rate limits and costs per conversation, but provides stability and compliance that matter for a production service.
Prompt engineering over fine-tuning - Rather than fine-tuning a model (expensive, slow to iterate), the system uses carefully crafted prompts with dynamic context injection. This allows rapid iteration on the AI’s behaviour without model retraining.
07 — My Role
Details to be added by Vincent.
08 — Challenges
Details to be added by Vincent.
09 — What Worked
Details to be added by Vincent.
10 — What Didn’t
Details to be added by Vincent.
11 — What I Learned
Details to be added by Vincent.
12 — Current Status
Details to be added by Vincent.
13 — Demo / Repository
Details to be added by Vincent.
14 — What’s Next
Details to be added by Vincent.