{"slug": "building-mathondu-how-we-built-an-autonomous-ai-merchant-store-factory-with-adk", "title": "Building Mathondu: How We Built an Autonomous AI Merchant & Store Factory with Google ADK, Gemini 3.5, and Cloud Run", "summary": "A developer built mathondu, an autonomous AI merchant and store factory that uses Google's Agent Development Kit (ADK) and Gemini models to create digital shops, photograph products, compile Android apps, and automate WhatsApp orders for small merchants in India. The system orchestrates specialized sub-agents to extract store and product data from messy photos, generate catalog images, and deploy real-world deliverables via Cloud Run and Firebase.", "body_md": "Disclosure:I created this piece of content for the purposes of entering the Google All Things Agentic Hackathon on Devpost.\n\nMillions of small merchants, home bakers, and neighbourhood store owners across India run their daily business through **WhatsApp** and **UPI**.\n\nWhile messaging works for basic conversations, scaling a business through chat breaks down quickly:\n\nWe built ** mathondu** (ಮತ್ತೊಂದು —\n\nOur goal was simple:\n\nBuild 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.\n\nRather 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.\n\n```\n                         ┌──────────────────────────┐\n                         │ Merchant Photos /        │\n                         │ WhatsApp Text            │\n                         └────────────┬─────────────┘\n                                      │\n                                      ▼\n                         ┌──────────────────────────┐\n                         │ onboard_orchestrator     │\n                         │      (Google ADK)        │\n                         └────────────┬─────────────┘\n                                      │\n                 ┌────────────────────┼────────────────────┐\n                 │                    │                    │\n                 ▼                    ▼                    ▼\n        ┌────────────────┐   ┌────────────────┐   ┌────────────────┐\n        │ store_extract_ │   │ product_data_  │   │ missing_fields_│\n        │ agent          │   │ agent          │   │ agent          │\n        └───────┬────────┘   └───────┬────────┘   └───────┬────────┘\n                │                    │                    │\n                ▼                    ▼                    ▼\n        Gemini 3.5 Flash Lite  Gemini 3.5 Flash Lite  Gemini 3.5 Flash Lite\n\n                                      │\n                                      ▼\n                         ┌──────────────────────────┐\n                         │ catalog_image_agent      │\n                         │ Gemini 3.1 Flash Lite    │\n                         │ Image                    │\n                         └────────────┬─────────────┘\n                                      │\n                                      ▼\n                    ┌─────────────────────────────────┐\n                    │ Firebase Storage + Firestore    │\n                    └───────────────┬─────────────────┘\n                                    │\n                 ┌──────────────────┴──────────────────┐\n                 │                                     │\n                 ▼                                     ▼\n      ┌────────────────────────┐          ┌────────────────────────┐\n      │ Cloud Run APK Worker   │          │ WhatsApp Cloud API     │\n      │                        │          │                        │\n      │ Bubblewrap TWA Builder │          │ Inbound Webhooks       │\n      │ Android SDK            │          │ Orders & Alerts        │\n      └────────────────────────┘          └────────────────────────┘\n```\n\n`@google/adk`\n\n)\nWhen a merchant sends messy photos of handwritten paper menus or shelf items, our pipeline executes in specialized stages.\n\n`onboard_orchestrator`\n\nThe top-level ADK agent coordinates sub-agent execution and commits the verified state to **Cloud Firestore**.\n\n`store_extract_agent`\n\nExtracts:\n\nusing **Gemini 3.5 Flash Lite**.\n\n`product_data_agent`\n\nParses:\n\ninto typed schemas.\n\n`missing_fields_agent`\n\nAnalyzes missing critical fields and generates targeted follow-up prompts without overwhelming the merchant.\n\n`catalog_image_agent`\n\nSynthesizes high-resolution, square product catalog photography using **Gemini 3.1 Flash Lite Image**.\n\nMost AI prototypes stop at returning text.\n\n**mathondu compiles real-world deliverables.**\n\nIndian merchants frequently ask for *\"their own app on the customer's phone.\"*\n\nWe built an asynchronous compilation worker running on **Google Cloud Run**.\n\nThe workflow is:\n\n```\nMerchant clicks \"Get Android APK\"\n              │\n              ▼\n       Firestore apkJobs\n              │\n              ▼\n      Cloud Run Worker\n              │\n              ▼\n   Bubblewrap + Android SDK\n              │\n              ▼\n      Custom TWA APK\n              │\n              ▼\n      Firebase Storage\n              │\n              ▼\n   Secure download link\n        + install QR\n```\n\nEach build produces a tenant-specific Trusted Web Activity (TWA) binary such as:\n\n```\ncom.mathondu.s.{slug}\n```\n\nThe signed `.apk`\n\nis uploaded directly to **Firebase Storage**, generating a secure **7-day download link** and installable QR code.\n\nCustomers can message:\n\n```\n+91 94621 46133\n```\n\nwith:\n\n```\nHi, shop {slug}\n```\n\nA state machine backed by **Firestore** handles:\n\nReal-time order events then alert the seller with direct links to the admin console.\n\nThe result is a complete commerce loop:\n\n$$\n\n\\text{Browse}\n\n\\rightarrow\n\n\\text{Add to Cart}\n\n\\rightarrow\n\n\\text{Place Order}\n\n\\rightarrow\n\n\\text{Merchant Alert}\n\n$$\n\n—all without requiring the customer to install another shopping application.\n\nTo prevent silent catalog corruption, our `admin_manager_agent`\n\nfollows a strict:\n\n$$\n\n\\text{Proposal}\n\n\\rightarrow\n\n\\text{Review}\n\n\\rightarrow\n\n\\text{Accept}\n\n$$\n\npattern.\n\nFor example, if an owner asks:\n\n\"Discount all bakery items by 10%.\"\n\nThe agent does **not** immediately modify the database.\n\nInstead, it:\n\nThis gives merchants the speed of an AI agent while preserving human control over critical business data.\n\n| Layer | Technology |\n|---|---|\nAI Framework |\nGoogle ADK 2.x |\nAI Models |\nGemini 3.5 Flash Lite, Gemini 3.1 Flash Lite Image, Gemma fallback |\nFrontend / PWA |\nNext.js 15, App Router, React, Tailwind CSS |\nBackend / Hosting |\nFirebase App Hosting, Cloud Run |\nSecrets |\nGoogle Cloud Secret Manager |\nDatabase |\nCloud Firestore |\nStorage |\nFirebase Storage |\nAPK Worker |\nDocker, Cloud Run, Node.js, Android SDK, Bubblewrap |\nMessaging |\nWhatsApp Cloud API (Meta) |\n\nIsolating extraction, validation, and image synthesis into separate ADK agents drastically reduced hallucination and improved reliability when processing regional languages such as **Kannada and Hindi**.\n\nInstead of asking one agent to do everything, each agent has a narrow responsibility and a structured output contract.\n\nCompute-heavy tasks such as:\n\nshould not block the primary user experience.\n\nOffloading these workloads to background **Cloud Run workers** allowed the UI to remain responsive while longer-running tasks executed asynchronously.\n\nThe biggest lesson was that **agentic AI becomes much more useful when it produces something tangible**.\n\nAn installable:\n\n`.apk`\n\n`.pdf`\n\nmenuhas significantly more operational value than a conversational answer explaining how to create one.\n\nDon't just make the agent answer. Make the agent ship.\n\nMessage:\n\n```\n+91 94621 46133\n```\n\nTry:\n\n```\nHi, shop {slug}\n```\n\n**mathondu turns a merchant's messy input into a complete digital commerce business — powered by autonomous agents.**\n\n📸 **Photos / Voice / Text**\n\n↓\n\n🤖 **Google ADK Multi-Agent Pipeline**\n\n↓\n\n🌐 **Storefront + Catalog + APK**\n\n↓\n\n💬 **WhatsApp Commerce**\n\n↓\n\n🛍️ **Real Orders**\n\nIf a merchant can send a photo or a voice note, mathondu should be able to build the store.", "url": "https://wpnews.pro/news/building-mathondu-how-we-built-an-autonomous-ai-merchant-store-factory-with-adk", "canonical_source": "https://dev.to/navaneethalgorithm/building-mathondu-how-we-built-an-autonomous-ai-merchant-store-factory-with-google-adk-gemini-43oc", "published_at": "2026-08-28 13:41:51+00:00", "updated_at": "2026-08-28 13:50:39.766038+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "generative-ai", "developer-tools", "ai-products"], "entities": ["Google", "Gemini", "Cloud Run", "Firebase", "WhatsApp", "ADK", "mathondu"], "alternates": {"html": "https://wpnews.pro/news/building-mathondu-how-we-built-an-autonomous-ai-merchant-store-factory-with-adk", "markdown": "https://wpnews.pro/news/building-mathondu-how-we-built-an-autonomous-ai-merchant-store-factory-with-adk.md", "text": "https://wpnews.pro/news/building-mathondu-how-we-built-an-autonomous-ai-merchant-store-factory-with-adk.txt", "jsonld": "https://wpnews.pro/news/building-mathondu-how-we-built-an-autonomous-ai-merchant-store-factory-with-adk.jsonld"}}