Inspiration
Nigeria's informal economy runs on trust, WhatsApp, and handshakes. Merchants on FairPrice.ng, our live escrow marketplace, were spending hours manually checking inventory, chasing Paystack payouts, handling disputes, and updating buyers one by one. We asked: what if an AI agent did all of that automatically, with a human only approving the big calls?
What it does
ZEMA360 is an autonomous commerce OS that runs merchant operations end-to-end on top of FairPrice.ng:
Ziva AI — a natural language shopping assistant powered by Alibaba Qwen. Type "I need an iPhone around ₦1m" and Ziva searches the live catalog, returns product cards with real prices, and lets you negotiate with sellers in one click.
Ops Squad — a multi-agent pipeline (Inventory → Fulfillment → Finance → Comms) that processes new orders automatically: checks stock, updates tracking, releases escrow, triggers Paystack payouts, and sends WhatsApp notifications to buyers and sellers.
Human-in-the-loop — high-value actions (large payouts, refunds, disputes) pause and send a WhatsApp approval request to the merchant before executing.
Live dashboard at www.fairprice.ng/zema360/live — every agent decision is logged to AWS DynamoDB and visible in real time.
How we built it
- AI: Alibaba Qwen (
qwen3-max) via DashScope OpenAI-compatible API — multi-round tool-calling, budget-aware catalog search, automatic Gemini → Qwen failover - Frontend: Next.js 15 App Router on Vercel, Tailwind CSS, Framer Motion
- Databases: Neon Postgres (orders, products, escrow) + AWS DynamoDB (agent event logs)
- Payments: Paystack escrow + payout transfer API
- Comms: WhatsApp Business API for buyer/seller notifications and HITL approvals
- Analytics: Novus.ai — 37 track events instrumented, AI agent conversation tracking, full funnel visibility from search → purchase → payout
Challenges we ran into
- Qwen3 thinking mode:
qwen3-maxroutes output toreasoning_contentinstead ofcontentfor certain query types (e.g. budget searches like "around 1m"), causing silent JSON extraction failures. Disabling thinking mode withenable_thinking: falsefixed it - Multi-round tool calls: Qwen3 chains tool calls across multiple rounds. The original code only handled one round, so the second round returned a tool call instead of text and hit the error handler. We added a 3-round loop with
disableToolson the final call - Budget search fallback: When a strict price filter returned 0 results, Qwen hallucinated shortened product names — breaking the exact-name lookup that renders product cards. We added a ±60% budget tolerance fallback so the tool always returns real catalog names
- Shipping without breaking production: All AI work ran on a separate branch (
hackathon-zema), with the live marketplace (dev) untouched throughout
Accomplishments that we're proud of
- Ziva went from Gemini-only to a Qwen-primary / Gemini-fallback architecture that auto-recalibrates when either provider is down — zero config changes needed
- Real DynamoDB integration live in production: the agent dashboard reads and writes from AWS in real time
- 37 Novus.ai track events instrumented across the full user journey in under 24 hours
- The entire stack — Qwen AI, Vercel compute, AWS storage, Paystack payments, WhatsApp comms — runs on a real, live marketplace with real orders and real sellers
What we learned
Structured JSON output from LLMs is deceptively fragile at the edges. Thinking modes, chained tool calls, and budget-filter edge cases all produce silent failures that look identical in the UI ("I found something but had trouble formatting it"). Defensive extraction — strip thinking tags, regex fallback, provider cascade, near-budget catalog expansion — is what separates a demo from a production feature.
What's next for ZEMA360 — Autonomous Commerce OS for African Markets
- Qwen-VL multimodal listing creation — seller uploads a phone photo, Qwen-VL extracts specs and creates a structured product listing automatically
- Real merchant pilot — onboard 3 FairPrice sellers onto ZEMA360, capture before/after operations metrics (time saved, dispute rate, payout speed)
- Public enterprise API —
POST /api/zema360/process-orderwith API key auth, letting other African marketplaces plug their order flow into the ZEMA360 Ops Squad - Alibaba Function Compute deployment — move the Python orchestrator to FC for the full Alibaba Cloud stack (Qwen + OSS + FC)
Built With
- alibaba-qwen
- aws-dynamodb
- framer-motion
- neon-postgres
- next.js
- novus.ai
- paystack
- prisma
- tailwind-css
- typescript
- vercel
- whatsapp-business-api

Log in or sign up for Devpost to join the conversation.