Disclosure: I created this piece of content for the purposes of entering the Google All Things Agentic Hackathon on Devpost.
🌟 The Problem: Why Small Commerce Needs Autonomous Agents, Not Just Chatbots
Millions of small merchants, home bakers, and neighbourhood store owners across India run their daily business through WhatsApp and UPI.
While messaging works for basic conversations, scaling a business through chat breaks down quickly:
- Manually typing 50+ catalog items with prices, variants, and descriptions can take hours.
- Regional shop signs and informal receipts in languages like Kannada and Hindi are poorly supported by many standard SaaS tools.
- Flat $30/month subscriptions + 2–5% transaction fees can destroy the narrow margins of micro-retailers.
We built mathondu (ಮತ್ತೊಂದು — “Another One”) to eliminate this friction entirely.
Our goal was simple:
Build an agent that doesn’t just talk about opening a store, but actually creates the digital shop, photographs products, compiles an installable Android app, and automates WhatsApp orders end-to-end.
🏗️ System Architecture: Google ADK + Serverless GCP
Rather than building a single monolithic prompt, we leveraged the Google Agent Development Kit (ADK) to coordinate a fleet of specialized sub-agents with strict domain boundaries.
┌──────────────────────────┐
│ Merchant Photos / │
│ WhatsApp Text │
└────────────┬─────────────┘
│
▼
┌──────────────────────────┐
│ onboard_orchestrator │
│ (Google ADK) │
└────────────┬─────────────┘
│
┌───────────────────────┼───────────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ store_extract_ │ │ product_data_ │ │ missing_fields_ │
│ agent │ │ agent │ │ agent │
└────────┬────────┘ └────────┬────────┘ └────────┬────────┘
│ │ │
▼ ▼ ▼
Gemini 3.5 Flash Lite Gemini 3.5 Flash Lite Gemini 3.5 Flash Lite
│
▼
┌──────────────────────────┐
│ catalog_image_agent │
│ Gemini 3.1 Flash Lite │
│ Image │
└────────────┬─────────────┘
│
▼
┌─────────────────────────────────┐
│ Firebase Storage + Firestore │
└───────────────┬─────────────────┘
│
┌──────────────────┴──────────────────┐
│ │
▼ ▼
┌────────────────────────┐ ┌────────────────────────┐
│ Cloud Run APK Worker │ │ WhatsApp Cloud API │
│ │ │ │
│ Bubblewrap TWA Builder │ │ Inbound Webhooks │
│ Android SDK │ │ Orders & Alerts │
└────────────────────────┘ └────────────────────────┘
Enter fullscreen mode Exit fullscreen mode
🤖 The Multi-Agent Ingestion Pipeline
When a merchant sends messy photos of handwritten paper menus, receipts, or shelf items, our pipeline processes the information through specialized ADK agents.
onboard_orchestrator
The top-level ADK agent coordinates the entire onboarding workflow.
It delegates specialized tasks to sub-agents, validates their outputs, and commits the verified merchant state to Cloud Firestore.
store_extract_agent
Uses Gemini 3.5 Flash Lite to extract important business information such as:
- Business name
- Operating hours
- Delivery radius
- Currency units
- Store metadata
product_data_agent
Converts messy product information into structured schemas, including:
- Product names
- Categories
- Prices
- Variant options
- Variant-specific pricing
missing_fields_agent
Analyzes the extracted store data to identify missing critical information.
Instead of asking the merchant for everything at once, it generates targeted follow-up questions only for the information that is actually required.
catalog_image_agent
When product images are missing or unusable, this agent generates high-resolution square catalog photography using Gemini 3.1 Flash Lite Image.
This allows merchants to create professional-looking catalogs without hiring a photographer or manually editing every product image.
📦 The Deliverables Factory: Generating Real Artifacts
Most AI prototypes stop after returning a text response.
mathondu doesn’t.
The system turns merchant input into real, usable business assets:
- 🌐 PWA storefront
- 📄 Branded PDF catalog
- 📱 Custom Android APK
- 💬 WhatsApp ordering experience
The goal is simple:
The agent shouldn’t just tell the merchant what to do. It should do it.
📱 1. On-Demand Android APKs via Cloud Run
Indian merchants frequently ask for “their own app on the customer’s phone.”
To support this, we built an asynchronous Android compilation worker running on Google Cloud Run.
The workflow is:
Merchant clicks "Get Android APK"
│
▼
Firestore apkJobs
│
▼
Cloud Run Worker
│
▼
Bubblewrap + Android SDK
│
▼
Custom TWA APK
│
▼
Firebase Storage
│
▼
Secure download link
+ install QR
Enter fullscreen mode Exit fullscreen mode
When a merchant requests an APK:
- A build job is added to the Firestore
apkJobsqueue. - A dedicated Cloud Run container picks up the job.
- Bubblewrap CLI compiles the merchant’s Trusted Web Activity (TWA).
- The Android binary is signed.
- The
.apkis uploaded to Firebase Storage. - The merchant receives a secure 7-day download link and installable QR code.
Each merchant receives a tenant-specific package identifier such as:
com.mathondu.s.{slug}
Enter fullscreen mode Exit fullscreen mode
This architecture keeps Android compilation completely separate from the primary web application.
💬 2. WhatsApp Cloud API Conversational Commerce
Customers can interact with a merchant directly through WhatsApp.
WhatsApp Demo
+91 94621 46133
Customers can send:
Hi, shop {slug}
Enter fullscreen mode Exit fullscreen mode
The WhatsApp commerce engine then provides an interactive shopping experience.
It handles:
- Interactive catalog messages
- Cart modifications
- Customer session state
- Live order placement
Customer sessions are persisted in Cloud Firestore, allowing the system to maintain cart and conversation state across webhook requests.
Real-time order events then alert the seller with direct links to the admin console.
The result is a complete commerce loop:
Browse → Add to Cart → Place Order → Merchant Alert
—all without requiring the customer to install another shopping application.
🛡️ 3. Human-in-the-Loop Shop Assist
To prevent silent catalog corruption, our admin_manager_agent follows a strict:
Proposal → Review → Accept
pattern.
For example, if an owner asks:
“Discount all bakery items by 10%.”
The agent does not immediately modify the database.
Instead, it:
- Identifies the affected products.
- Calculates the proposed changes.
- Generates a diff card showing what will change.
- Presents the proposal to the merchant.
- Waits for explicit Accept confirmation.
- Only then performs the database mutation.
This gives merchants the speed of an AI agent while preserving human control over critical business data.
💻 Tech Stack Overview
Layer Technology AI Framework Google ADK 2.x AI Models Gemini 3.5 Flash Lite, Gemini 3.1 Flash Lite Image, Gemma fallback Frontend / PWA Next.js 15, App Router, React, Tailwind CSS Backend / Hosting Firebase App Hosting, Cloud Run Secrets Google Cloud Secret Manager Database Cloud Firestore Storage Firebase Storage APK Worker Docker, Cloud Run, Node.js, Android SDK, Bubblewrap Messaging WhatsApp Cloud API (Meta)🧠 How the Agent Architecture Works
The key architectural decision was to avoid one giant AI prompt.
Instead, mathondu uses specialized agents with bounded responsibilities.
Merchant Input
Images / Text / Voice
│
▼
┌───────────────────────┐
│ onboard_orchestrator │
└───────────┬───────────┘
│
┌───────────────┼────────────────┐
│ │ │
▼ ▼ ▼
Store Extract Product Data Missing Fields
Agent Agent Agent
│ │ │
└───────────────┼────────────────┘
│
▼
Catalog Image Agent
│
▼
Verified Store Data
│
┌───────────┴───────────┐
│ │
▼ ▼
Storefront + PDF Android APK
│ │
└───────────┬───────────┘
│
▼
WhatsApp Commerce
│
▼
Real Orders
Enter fullscreen mode Exit fullscreen mode
Each agent produces structured output that can be validated before being passed to the next stage.
This makes the overall system more predictable than relying on a single general-purpose prompt.
🧩 Challenges We Faced
1. Multilingual Extraction and Hallucination
Indian commerce data is rarely clean.
A single shop sign can contain:
- Kannada text
- Hindi text
- English product names
- Informal abbreviations
- Regional terminology
- Different pricing conventions
A monolithic prompt frequently misinterpreted currency units, dropped variants, or incorrectly structured product information.
We solved this by decomposing the pipeline into specialized ADK agents with:
- Strict JSON schemas
- Narrow domain responsibilities
- Explicit validation boundaries
- Reusable domain skill definitions
Our onboarding skills live under:
frontend/skills/onboard/
Enter fullscreen mode Exit fullscreen mode
This reduced the blast radius of extraction errors and made individual stages easier to debug.
⚙️ 2. Long-Running APK Builds on Serverless Infrastructure
Building an Android TWA with the Android SDK and Bubblewrap is significantly heavier than a normal web request.
The build can require 2 GiB or more of memory and take approximately 10–40 seconds, depending on the build environment.
Running this directly inside a normal Next.js request would make the user wait and could exceed request execution limits.
We solved this with an asynchronous job architecture:
Next.js API
│
▼
Firestore apkJobs
│
▼
Cloud Run Worker
│
▼
Bubblewrap + Android SDK
│
▼
Signed APK
│
▼
Firebase Storage
Enter fullscreen mode Exit fullscreen mode
The user-facing application remains responsive while the heavy build runs independently.
💬 3. Multi-Turn WhatsApp Session State
WhatsApp webhook events are stateless from the perspective of our application.
However, a commerce conversation requires persistent state:
- Customer identity
- Current shop
- Cart contents
- Selected variants
- Conversation state
- Order status
- Session expiration
We implemented a deterministic state machine backed by Firestore transactions.
This allows concurrent webhook events to safely update cart and order state without race conditions.
It also allows us to manage WhatsApp’s 24-hour customer service window constraints.
💡 Key Learnings from Building with Gemini & ADK
1. Specialized Agents Beat Monolithic Prompts
Our biggest AI architecture lesson was that one powerful model does not mean one giant prompt.
By isolating:
- Extraction
- Product structuring
- Missing-field detection
- Image generation
- Administrative operations
into specialized ADK agents, we gained better control over each stage of the workflow.
This was especially important for multilingual Indian commerce data.
2. Asynchronous Architecture Keeps Interfaces Fast
Agentic applications often combine lightweight interactions with heavyweight background operations.
APK compilation, image generation, and PDF generation can take significantly longer than a normal conversational response.
Moving these operations into asynchronous Cloud Run workers allowed us to keep the main application responsive while still producing complex deliverables.
3. Agents Should Ship Assets, Not Just Conversation
The most important lesson we learned is:
The value of an agent is measured by what it accomplishes, not just what it says.
A conversational response saying:
“You should create an online store.”
is useful.
But an agent that actually produces:
- An installable
.apk - A live storefront
- A branded
.pdfcatalog - Generated product photography
- A working WhatsApp ordering flow
- Verified database records
is dramatically more useful.
Don’t just make the agent answer. Make the agent ship.
🚀 Why This Matters
mathondu is designed around a simple observation:
Small merchants shouldn’t need to become software administrators to get the benefits of digital commerce.
They already know how to:
📸 Take a photo
🎙️ Send a voice note
💬 Use WhatsApp
💰 Accept UPI payments
mathondu turns those familiar actions into a complete digital commerce workflow.
Photo / Voice / Text
│
▼
Google ADK Agents
│
┌──────────┼──────────┐
▼ ▼ ▼
Store Catalog Images
Data Data + Assets
│ │ │
└──────────┼──────────┘
▼
Digital Store
│
┌──────────┼──────────┐
▼ ▼ ▼
PWA Android WhatsApp
Store App Orders
│
▼
Real Merchant
Orders
Enter fullscreen mode Exit fullscreen mode
🔗 Try It Live
🌐 Live Platform
🚀 AI Onboarding Demo
💬 WhatsApp Demo
Message:
+91 94621 46133
Try:
Hi, shop {slug}
Enter fullscreen mode Exit fullscreen mode
🏆 Built for the Google #AllThingsAgenticHackathon
mathondu turns messy merchant input into a complete digital commerce business — powered by autonomous AI agents.
📸 Photos / Voice / Text
↓
🤖 Google ADK Multi-Agent Pipeline
↓
🌐 Storefront + Catalog + Product Images
↓
📱 Custom Android APK
↓
💬 WhatsApp Commerce
↓
🛍️ Real Orders
If a merchant can send a photo or a voice note, mathondu should be able to build the store.
Built for the Google #AllThingsAgenticHackathon.