# Building Mathondu: How We Built an Autonomous AI Merchant & Store Factory with Google ADK, Gemini 3.5, and Cloud Run

> Source: <https://dev.to/navaneethalgorithm/building-mathondu-how-we-built-an-autonomous-ai-merchant-store-factory-with-google-adk-gemini-43oc>
> Published: 2026-08-28 13:41:51+00:00

Disclosure:I created this piece of content for the purposes of entering the Google All Things Agentic Hackathon on Devpost.

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:

We built ** mathondu** (ಮತ್ತೊಂದು —

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.

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        │
      └────────────────────────┘          └────────────────────────┘
```

`@google/adk`

)
When a merchant sends messy photos of handwritten paper menus or shelf items, our pipeline executes in specialized stages.

`onboard_orchestrator`

The top-level ADK agent coordinates sub-agent execution and commits the verified state to **Cloud Firestore**.

`store_extract_agent`

Extracts:

using **Gemini 3.5 Flash Lite**.

`product_data_agent`

Parses:

into typed schemas.

`missing_fields_agent`

Analyzes missing critical fields and generates targeted follow-up prompts without overwhelming the merchant.

`catalog_image_agent`

Synthesizes high-resolution, square product catalog photography using **Gemini 3.1 Flash Lite Image**.

Most AI prototypes stop at returning text.

**mathondu compiles real-world deliverables.**

Indian merchants frequently ask for *"their own app on the customer's phone."*

We built an asynchronous 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
```

Each build produces a tenant-specific Trusted Web Activity (TWA) binary such as:

```
com.mathondu.s.{slug}
```

The signed `.apk`

is uploaded directly to **Firebase Storage**, generating a secure **7-day download link** and installable QR code.

Customers can message:

```
+91 94621 46133
```

with:

```
Hi, shop {slug}
```

A state machine backed by **Firestore** handles:

Real-time order events then alert the seller with direct links to the admin console.

The result is a complete commerce loop:

$$

\text{Browse}

\rightarrow

\text{Add to Cart}

\rightarrow

\text{Place Order}

\rightarrow

\text{Merchant Alert}

$$

—all without requiring the customer to install another shopping application.

To prevent silent catalog corruption, our `admin_manager_agent`

follows a strict:

$$

\text{Proposal}

\rightarrow

\text{Review}

\rightarrow

\text{Accept}

$$

pattern.

For example, if an owner asks:

"Discount all bakery items by 10%."

The agent does **not** immediately modify the database.

Instead, it:

This gives merchants the speed of an AI agent while preserving human control over critical business data.

| 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) |

Isolating extraction, validation, and image synthesis into separate ADK agents drastically reduced hallucination and improved reliability when processing regional languages such as **Kannada and Hindi**.

Instead of asking one agent to do everything, each agent has a narrow responsibility and a structured output contract.

Compute-heavy tasks such as:

should not block the primary user experience.

Offloading these workloads to background **Cloud Run workers** allowed the UI to remain responsive while longer-running tasks executed asynchronously.

The biggest lesson was that **agentic AI becomes much more useful when it produces something tangible**.

An installable:

`.apk`

`.pdf`

menuhas significantly more operational value than a conversational answer explaining how to create one.

Don't just make the agent answer. Make the agent ship.

Message:

```
+91 94621 46133
```

Try:

```
Hi, shop {slug}
```

**mathondu turns a merchant's messy input into a complete digital commerce business — powered by autonomous agents.**

📸 **Photos / Voice / Text**

↓

🤖 **Google ADK Multi-Agent Pipeline**

↓

🌐 **Storefront + Catalog + APK**

↓

💬 **WhatsApp Commerce**

↓

🛍️ **Real Orders**

If a merchant can send a photo or a voice note, mathondu should be able to build the store.
