All Articles Multi-Agent AI

Building CropMind: A Multi-Agent AI System for Smallholder Farmers in APAC

A production-grade breakdown of CropMind, a multi-agent AI system built on Google Cloud, that transforms complex agricultural queries into grounded, explainable decisions through agent orchestration, real-time data integration, and vector search.

April 14, 2026 19 min read Likhon
🎧 Listen to this article
Checking audio availability...

Building CropMind: A Multi-Agent AI System for Smallholder Farmers in APAC

By MD Bazlur Rahman Likhon · AI Engineer / Cloud Engineer / Builder


Meta description: See how CropMind uses multi-agent AI, Google Cloud Run, Vertex AI, and vector search to deliver practical agricultural recommendations for smallholder farmers in APAC.


I Didn't Want to Build Another Chatbot

There is a very specific kind of frustration that comes from building a demo that impresses a room but helps no one.

When I joined the Google Cloud Gen AI Academy APAC Edition — a three-month accelerator program designed to help builders leverage Google's latest AI technologies — I made a decision early: I was not going to build a chatbot that answered generic farming questions from a knowledge base. Anyone can do that. It takes an afternoon and a well-crafted system prompt.

What I wanted to build was different. I wanted to build something that could support real decisions in the field — the kind of decisions where a wrong answer on a Tuesday morning can mean a failed harvest by Friday. Where a farmer asking "what is happening to my rice leaves?" deserves not just an answer, but an answer that is grounded in that day's weather forecast, the current disease outbreak alerts for their region, and the market price they will face when they bring their crop to market.

That ambition became CropMind — a multi-agent AI system for smallholder farmers in APAC, built on Google Cloud Run and Vertex AI, designed to turn one messy, real-world query into one clear, traceable recommendation.

This post is the full engineering story: why the problem demanded this architecture, how the system was designed and built, what broke, what worked, and where it goes next.


Why Agriculture in APAC Needs Connected Intelligence

The scale of the problem is worth understanding before looking at the solution.

Of the 570 million farms worldwide, approximately 475 million are smallholder farms — and 74% of them are located in Asia, where they account for roughly 60% of all agricultural production in the region. In Asia, 75% of farmers are directly dependent on agriculture for their livelihoods. These are not marginal contributors to regional economies. They are the backbone of food systems across APAC. Yet they face some of the most compounding, interconnected pressures of any industry anywhere.

Climate change is making an already difficult situation structurally harder. Extreme climate events — intensifying droughts, floods, and heat waves — have already reduced major cereal crop yields by approximately 9–10% across the Asia-Pacific region. Climate change is projected to reduce crop productivity by 15% to 20% by 2050 in a business-as-usual scenario, with some crops facing losses of up to 50%. The Asia-Pacific region is home to over half of the world's population, and events like El Niño have already triggered significant crop losses across Thailand, Vietnam, and China.

Then there are the market and financial pressures. Research shows that Indian farmers receive just one-third of the final consumer price for their produce, with intermediaries capturing the rest. Less than 30% of smallholder farmers in Indonesia and Vietnam have access to formal financing channels. Limited access to reliable market price information means that even a good harvest can translate into a poor economic outcome.

Against this backdrop, the response from the technology sector has been growing but fragmented. The Asia-Pacific digital agriculture market was valued at USD 8.96 billion in 2024 and is projected to reach USD 23.88 billion by 2034. The global AI in agriculture market is expected to grow at a compound annual rate of 19.49% through 2034. The opportunity is real. But most of the products being built are siloed tools — a pest detection app here, a weather dashboard there, a price aggregator somewhere else.

Siloed tools do not solve interconnected problems. A farmer dealing with potential rice blast while a weather front moves in and market prices are dropping needs one integrated answer, not three separate apps.

That is the insight behind CropMind.


What CropMind Is

CropMind is a production-oriented multi-agent AI system for smallholder farmers that accepts a plain-language query — with or without an image — and returns a single, grounded, explainable recommendation drawn from multiple specialist agents working in coordination.

The design philosophy was deliberately anti-monolithic. A single LLM call with a mega-prompt cannot reliably handle the complexity of a real agricultural decision. Disease diagnosis, weather interpretation, market context, and treatment protocol generation require different information sources, different reasoning styles, and different grounding needs. CropMind separates those concerns into specialist agents, orchestrates them in a defined pipeline, and synthesizes their outputs into one traceable answer.

The system is built to serve farmers who ask questions like:

  • "My tomato leaves have brown spots and the weather has been very wet — is this blight? What should I do?"
  • "Should I spray pesticide today given the forecast?"
  • "Is it a good time to sell my cassava crop?"

From that one query, CropMind coordinates an entire decision-support pipeline — and the farmer receives an answer that can be acted on immediately.


The Technical Architecture

CropMind is a full-stack, cloud-native system. Every layer of the stack was chosen to serve the core design goal: fast, grounded, explainable recommendations at production quality.

Stack Overview

Layer Technology Role
Frontend React Farmer-facing query interface, image upload, streaming display
Backend API Express (Node.js) API gateway, request routing, agent orchestration controller
AI Engine Vertex AI — Gemini (Google Cloud) Core LLM for each specialist agent
Tool Grounding MCP-compatible services Weather, alerts, market price, subsidy context
Memory / Retrieval PostgreSQL + vector search Historical case similarity and retrieval
Deployment Google Cloud Run Single-service, containerized, auto-scaling deployment
Streaming Server-Sent Events (SSE) Real-time token streaming to frontend

React Frontend

The frontend is intentionally minimal. A farmer types a query in plain language, optionally uploads a leaf or crop image, and submits. The UI streams the response in real time as agents complete their work, using Server-Sent Events (SSE) — the de facto standard for streaming LLM responses in web applications, used by OpenAI, Anthropic, and most major AI APIs. This matters for transparency: the farmer can see the system reasoning in real time rather than staring at a loading spinner.

SSE delivers near-instantaneous updates over a single long-lived HTTP connection with minimal resource overhead and built-in reconnection — a meaningful advantage in environments where network reliability is not guaranteed.

Express API and Orchestration

The Express backend acts as both the API gateway and the orchestration controller. It receives incoming queries, manages the multi-agent pipeline execution, handles tool calls, and coordinates the synthesis step. Keeping orchestration logic server-side — rather than in the client or in a separate orchestration microservice — meant a simpler deployment footprint and cleaner observability.

Vertex AI with Gemini

All agent reasoning runs through Vertex AI — Google Cloud's fully managed, unified AI development platform, built for agentic workflows. Using Gemini through Vertex AI provides structured output support, grounding capabilities, and model flexibility across the pipeline. Different agents in the system can use different model configurations, enabling a routing strategy that balances latency against reasoning depth depending on task complexity.

MCP-Compatible Tool Grounding

Rather than embedding weather data, market prices, or subsidy information into a static knowledge base, CropMind fetches live context through tool calls using a Model Context Protocol (MCP)-compatible architecture. MCP is an open standard for connecting AI agents to external tools and data sources — a universal protocol that provides standardized, secure, two-way connections between LLM applications and real-world services. This means CropMind's recommendations are grounded in what is actually happening, not in a static snapshot from training data.

CropMind stores historical agricultural cases and embeds them for vector similarity search. When a new query arrives, the retrieval layer identifies semantically similar historical cases and surfaces relevant context for the agents. Research demonstrates that retrieval-augmented generation (RAG) with vector search significantly improves factual grounding and recommendation quality in agricultural advisory systems — particularly for disease queries and crop management scenarios where prior cases carry high evidential value.

Google Cloud Run

The entire system deploys as a single containerized service on Google Cloud Run — Google's managed container platform for microservices. This simplified delivery substantially: no Kubernetes cluster to manage, no complex service mesh, auto-scaling built in. A single Cloud Run service handles the Express API, agent orchestration, and tool coordination. For a project scoped to demonstrate production-readiness without infrastructure complexity, this was the right call.


The Multi-Agent Workflow: From Farmer Query to Grounded Answer

The most important engineering decision in CropMind was the move from a single-agent monolith to a specialized multi-agent pipeline. Multi-agent systems in agriculture work by integrating multiple intelligent agents — software programs capable of autonomous action — that collaborate to solve complex challenges that a single agent cannot address reliably.

Here is how CropMind's pipeline processes a real farmer query end-to-end:

Step 1 — Query Parsing

The farmer's natural language query arrives at the Parser Agent. This agent structures the raw input: extracting the crop type, region, symptoms, and intent. It determines which downstream agents need to be invoked and what context each one requires. If an image was uploaded, visual features are incorporated here.

Step 2 — Disease Agent (Primary Diagnosis)

The Disease Agent performs primary diagnosis. It receives the structured query, the image features if present, and the retrieved historical cases from the vector similarity search. It returns a structured diagnosis with a confidence signal and the evidence chain behind its conclusion.

Step 3 — Weather and Market Agents (Parallel Execution)

When relevant to the query, the Weather Agent and Market Agent run in parallel. The Weather Agent fetches the live forecast for the farmer's region via tool call and assesses how current conditions affect the diagnosis or treatment options. The Market Agent retrieves current prices and subsidy context. Running these in parallel reduces end-to-end latency — the farmer does not wait for sequential API calls.

Step 4 — Conflict Resolution

Before any recommendation is generated, CropMind runs a conflict resolution step. This is the most underappreciated part of the architecture. Weather conditions and disease treatment protocols can conflict: a fungicide spray that is the correct intervention for late blight may be ineffective or harmful if rain is forecast within 24 hours. Without explicit conflict resolution, the system would produce technically correct individual outputs that combine into a contradictory or dangerous recommendation. This step checks for such contradictions and flags or resolves them before proceeding.

Step 5 — Treatment Agent

If the diagnosis warrants intervention, the Treatment Agent generates a specific, actionable protocol: recommended inputs, application timing, dosage guidance, and safety notes. This output is grounded in the weather context from Step 3 — so the treatment recommendation already accounts for forecast conditions.

Step 6 — Synthesis and Traceability

The final Synthesis Stage assembles the full decision chain into one structured response. Critically, the response includes the traceability path: which agents contributed, which tool calls grounded the answer, and what evidence underpins the recommendation. The farmer receives a single, clear answer — and an engineer reviewing the system can inspect every step that produced it.


Why a Multi-Agent Architecture Was Necessary

The agricultural decision problem is a good illustration of when multi-agent design earns its complexity cost.

A single large-context LLM call with all available information — weather data, disease knowledge, market prices, historical cases, treatment protocols — runs into several failure modes:

  • Reasoning overload: The model's attention spreads across too many domains simultaneously, degrading accuracy in each
  • Inconsistent grounding: Without structured tool calls per domain, grounding becomes opportunistic rather than systematic
  • Opaque outputs: A single-call output cannot show which part of the reasoning relied on weather data vs. disease knowledge vs. historical cases
  • Rigid routing: Every query gets the full reasoning stack, even when it only needs disease diagnosis and nothing else

Specialist agents solve these problems. Each agent has a narrow scope, a defined set of tools, and a specific output contract. The orchestration layer routes queries to only the agents they need. The conflict resolution layer catches interactions that individual agents cannot see. And the synthesis layer produces an output that is both human-readable and machine-inspectable.

The comparison between a single chatbot and CropMind's multi-agent approach is worth making explicit:

Dimension Single-chatbot approach CropMind multi-agent system
Reasoning scope Broad, undifferentiated Narrow, specialized per domain
Tool grounding Optional, ad hoc Systematic, per-agent
Weather + disease interaction Handled in one prompt Explicit conflict resolution step
Output traceability Opaque Full decision chain visible
Latency management Monolithic — all-or-nothing Parallel agents reduce wait time
Modularity Add logic to one big prompt Add or update individual agents
Failure isolation Full failure on model error Partial results with graceful degradation
Alignment with agronomy workflow Implicit Mirrors how agronomists actually reason

This architecture mirrors how a good agronomist actually operates: disease first, then environment context, then market context, then treatment — each step building on the last, with contradictions flagged before any advice is given.


Challenges and Key Learnings

Building CropMind surfaced four engineering challenges that I think are instructive beyond agriculture.

Challenge 1: Advice Consistency Across Agents

Weather recommendations and disease treatment recommendations can conflict in edge cases. A treatment protocol that is correct for the disease can be counterproductive given the forecast. This was not a hypothetical concern — it surfaced in early testing where the disease agent correctly recommended a fungicide application, while the weather agent's tool call revealed heavy rain was forecast for the next 18 hours, which would wash off the treatment before it could act.

Lesson: Conflict resolution is not a nice-to-have. In any multi-agent system producing actionable recommendations, an explicit conflict resolution step is essential engineering infrastructure.

Challenge 2: Grounding vs. Fluency

The first version of CropMind produced fluent, confident-sounding recommendations that were not grounded in real current data. The outputs read well. They were not reliably correct. LLM fluency is not the same as accuracy, and in domains where the stakes are real — someone's harvest, their income, their family's food security — fluent hallucination is not acceptable.

Lesson: Traceability is not a compliance feature. It is a product feature. Every recommendation CropMind produces must link back to a concrete evidence source: a tool call result, a retrieved historical case, or a confirmed diagnosis step. Explainable AI for farming is not about academic transparency — it is about earning the trust of the person who actually has to act on the answer.

Challenge 3: Latency vs. Quality

Farmers in the field need fast answers. But synthesis requires depth. The first architecture was sequential: every agent ran one after another, which produced comprehensive outputs but unacceptably long wait times.

Lesson: Route tasks by complexity, and run independent agents in parallel. The Weather Agent and Market Agent have no dependency on each other — they run simultaneously. The conflict resolution step waits for both to complete before checking interactions. This parallel-then-synchronize pattern cut the end-to-end latency of multi-agent queries significantly while maintaining output quality.

Challenge 4: Product Thinking Beyond Model Calls

This is the most broadly applicable lesson. CropMind required more than good prompts and capable models. It required:

  • API design that could handle streaming, structured outputs, and partial failures cleanly
  • Schema discipline to ensure agents could reliably exchange structured outputs as inputs to downstream steps
  • Deployment engineering to containerize and ship a multi-service coordination system as a single Cloud Run deployment
  • Observability to understand which agents were failing, which tool calls were slow, and where the pipeline was bottlenecking

Lesson: A useful AI system is a software system first. The model calls are one component. Shipping matters as much as prompting.


Live Demo and Source Code

CropMind is deployed on Google Cloud Run and publicly accessible.

The repository includes the full pipeline: React frontend, Express orchestration backend, agent definitions, vector retrieval setup, and Cloud Run deployment configuration. It is intended to be readable — built with the understanding that the engineering decisions are as instructive as the output.


What's Next for CropMind

CropMind as it stands is a strong architectural foundation. The roadmap for making it genuinely production-deployable for smallholder farmers across APAC includes six priority areas:

Localized Language Support

The current system operates in English. Most smallholder farmers in APAC do not. Localization — not just translation but genuine linguistic grounding in the agricultural vocabulary of each region — is essential. Research in cross-lingual RAG for agricultural advisory has shown that translation-first architectures can deliver meaningful accuracy for Bengali and other regional languages; the same approach applies across the APAC language landscape.

Regional Agronomy Context

Disease profiles, pest calendars, soil conditions, and recommended varieties are highly regional. The knowledge base needs to expand from general agronomic principles to region-specific crop management knowledge — integrating data from authoritative sources like FAO, IRRI, and national agricultural research systems.

Better Retrieval with Real Case Data

The vector similarity layer is currently seeded with curated synthetic cases. Replacing that with real field cases — ideally contributed by extension officers and agronomists — will dramatically improve retrieval quality and recommendation relevance.

Mobile-First and Low-Bandwidth Support

The farmers CropMind is designed to serve are not using desktop browsers on high-speed connections. The frontend needs a mobile-first rearchitecture with aggressive optimization for low-bandwidth environments: smaller payloads, progressive loading, and offline-capable core features.

Human-in-the-Loop with Extension Officers

AI confidence should not be the only signal that determines whether a recommendation reaches a farmer. High-stakes recommendations — particularly novel disease detections or situations with high conflict scores — should route to a human agronomist or extension officer for validation before delivery. This human-in-the-loop workflow bridges the gap between AI capability and agricultural trust.

Agronomy Benchmarks for Evaluation

The current evaluation is informal. A serious production system needs rigorous evaluation against established agronomy benchmarks, validated by domain experts. Without defensible evaluation metrics, it is impossible to know whether CropMind is improving over time — or degrading.


Final Reflection

Building CropMind changed how I think about what it means to build useful AI.

Before this project, I thought of AI system quality primarily in terms of model performance: accuracy, coherence, fluency. Those things matter. But they are not what makes a system trustworthy or useful in a real-world context.

What makes CropMind different from a generic chatbot is not the underlying model. It is the architecture of accountability around the model: the specialist agents that keep reasoning focused, the tool calls that ground outputs in real data, the conflict resolution step that catches contradictions before they reach the farmer, and the traceability chain that makes the decision path inspectable.

The real engineering challenge in applied AI is not "how do we get the model to produce a good answer?" It is "how do we build a system that produces a trustworthy answer, consistently, at production scale, in a context where mistakes have real consequences?"

For MD Bazlur Rahman Likhon, that question is not academic. It is the design brief for every system worth building.


Explore CropMind

CropMind started as an attempt to build something more useful than a generic chatbot. It became a deeper lesson in orchestration, grounding, and accountable AI design.

If you are building in applied AI, agriculture intelligence, cloud-native systems, or multi-agent products, explore the project and connect.


Frequently Asked Questions

What is CropMind?

CropMind is a multi-agent AI system designed to help smallholder farmers in APAC make better agricultural decisions. A farmer submits a plain-language query — with or without an image — and CropMind coordinates a four-agent pipeline (disease diagnosis, weather analysis, market context, treatment protocol) to return a single, grounded, explainable recommendation.

How does CropMind help smallholder farmers?

Smallholder farmers in Asia account for approximately 60% of the region's agricultural output while facing compounding pressures from climate volatility, pest and disease risk, market opacity, and limited access to expert advice. CropMind addresses the advisory gap directly: instead of requiring a farmer to consult separate tools for disease identification, weather context, and market prices, CropMind integrates all three into one structured query-and-answer interaction, grounded in live data via tool calls.

Why use multi-agent AI in agriculture?

Agricultural decisions are inherently multi-dimensional. A single large-language-model call cannot reliably reason across disease diagnosis, weather data, market prices, and treatment protocols simultaneously without losing coherence or grounding in one or more dimensions. Multi-agent systems allow specialist agents to focus on narrow domains, use domain-specific tools, and contribute structured outputs to a synthesis layer — resulting in answers that are more accurate, more explainable, and more actionable than what a monolithic model call produces.

How is CropMind built on Google Cloud?

CropMind runs on Google Cloud Run — Google's managed container platform for scalable microservice deployment — with all AI reasoning powered by Vertex AI and Google's Gemini models. Tool grounding is implemented using a Model Context Protocol (MCP)-compatible architecture, enabling live weather, alert, and market data to ground agent outputs in real-world context.

What makes CropMind different from a chatbot?

A chatbot generates a response from a static model knowledge base. CropMind grounds every recommendation in live tool calls (weather, market prices, disease alerts), retrieves semantically similar historical cases via vector search, and runs an explicit conflict resolution step before generating any recommendation. The output includes a full decision traceability chain — every claim links back to a concrete evidence source. This architecture of accountability is what makes CropMind a decision-support system, not a conversational demo.

Can CropMind support climate-resilient agriculture?

Climate resilience is a core design consideration for CropMind's roadmap. The Asia-Pacific region faces some of the most severe climate-related agricultural risks globally — crop productivity reductions of 15% to 20% by 2050 in business-as-usual scenarios, with some crops potentially facing 50% losses. CropMind's weather agent integration means recommendations already account for current forecast conditions. Future development priorities include regional climate adaptation data, seasonal pattern grounding, and alignment with climate-smart agricultural practices.[^3]

What did this project teach you about real-world AI systems?

The most important lesson: product quality in AI is not determined by model choice. It is determined by the architecture around the model — how information is retrieved, how agents are grounded, how contradictions are detected, how outputs are made inspectable, and how the system is deployed and observed in production. Fluency is easy. Trustworthiness requires engineering.


About the Author

MD Bazlur Rahman Likhon is an AI Engineer and Cloud Engineer based in Dhaka, Bangladesh, specializing in multi-agent AI systems, Google Cloud architecture, OCR and document intelligence, and applied GenAI for real-world problems. He is a participant in the Google Cloud Gen AI Academy APAC Edition and builds production-oriented systems at the intersection of cloud infrastructure and applied machine learning. CropMind is his flagship project demonstrating end-to-end multi-agent AI design and deployment on Google Cloud.

Connect on LinkedIn · Explore CropMind on GitHub

Likhon - Gen AI Specialist

Senior Cloud and AI Engineer

Generative AI expert with 6+ years experience and 300+ certifications. Building LLM, RAG systems, and multi-cloud AI solutions.