🏆HACKATHON WINNERBuild with AI: Code for CommunitiesTrack 4 — Kisan AlertTeam: Vishwakarma Devs

KisanVaani — किसानवाणी

AI agricultural intelligence for farmers — without requiring a smartphone.

An engineering and product case study detailing how KisanVaani evolved from an initial mobile web application into a multi-channel agricultural intelligence system powered by Indic Voice, SMS, WhatsApp, grounded soil telemetry, and district command center operations.

Project Snapshot

Core constraints, target persona, and product architecture at a glance

Executive Summary
01. The Problem

Small and marginal farmers lack localized guidance and often do not own smartphones, reliable mobile data, or digital apps.

02. Target Users

Indian smallholder farmers (86% of 146M+ holdings), predominantly using basic feature phones with oral-first Indic dialects.

03. Core Insight

The farmer shouldn't adapt to technology. The technology must meet the farmer on the devices they already own.

04. Multi-Channel Solution

AI advisory delivered via Voice Calls, SMS, WhatsApp, and Web Demo, backed by soil telemetry, weather data, and mandi prices.

05. Operations Layer

Every farmer interaction aggregates into district-level signals for early pest outbreak alerts and agricultural officer triage.

06. Team & Track

Team Vishwakarma Devs • Built for Build with AI: Code for Communities (Track 4: Kisan Alert).

01 / Problem Context

Why Traditional Agritech Fails Smallholder Farmers

Existing agritech platforms assume modern smartphones, high-speed 4G/5G connections, and English/text fluency. But rural Indian agriculture operates under completely different realities.

146M+Total Farm Holdings
86%Small & Marginal Farmers
~45%Carry Basic Feature Phones
15–25%Yield Lost to Pests & Timing
📱Smartphone Dependency

Most apps assume a 6-inch touchscreen and app store installation, excluding nearly half of rural households.

📡Connectivity Dependency

Heavy web applications fail over intermittent 2G/EDGE networks in deep agricultural hinterlands.

🗣️Literacy & Interaction Barrier

Navigating complex drop-down forms and typing crop diseases in Latin scripts creates immediate friction.

🇮🇳Regional Language Barrier

Agronomic science is published in English/Hindi, while farmers discuss soil symptoms in localized regional dialects.

🧩Fragmented Information

Weather forecasts, mandi prices, soil cards, and pest guides exist as disjointed silos across different portals.

🔄Lack of Feedback Loop

Farmer distress calls are treated as one-off support queries rather than aggregate early-warning outbreak signals.

02 / User Constraints

Designing for The Smallholder Farmer

Rather than designing for an idealized tech-savvy user, we mapped the strict boundary constraints of real farmers across rural India.

👨🏽‍🌾

Smallholder Farmer (Ramesh)

2 Acres Paddy & Cotton • Basic Keypad Phone • Bundelkhand / AP

Ramesh relies on seasonal rain and neighbor advice. When his paddy leaves show brown spots, he cannot search web forums or upload high-res files. He needs to dial a number, describe symptoms in his mother tongue, and receive an immediate actionable advisory.

Hard Design Constraints
  • Device: Basic 2G/GSM feature phone without browser capability.
  • Primary Input: Voice speech in vernacular Hindi/Telugu/Kannada.
  • Secondary Channel: SMS bulleted steps for reference while in the field.
  • Friction: Zero logins, zero app downloads, zero date inputs.
03 / The Turning Point

The Big Pivot: “Does the Farmer Need an App at All?”

✕ INITIAL CONVENTIONAL THINKING (THE WRONG QUESTION)

“How do we build an agricultural mobile app with interactive forms?”

App Store DownloadSmartphone HardwareHigh-Speed 4GText Literacy(Excludes 45%+ of farmers)
✓ THE CORE PRODUCT INSIGHT (THE RIGHT QUESTION)

“The farmer shouldn't have to adapt to our technology. The technology must adapt to the farmer.”

Instead of forcing the farmer to buy a smartphone and learn application navigation, we moved the intelligence to the cloud and connected it to standard toll-free telephony and SMS.

1. Voice Telephony PathAny Phone → Toll-Free Call → Native Speech → Indic ASR → Gemini AI → Spoken Advice
2. Low-Bandwidth SMS / WhatsAppAny Phone → SMS Query / Photo → Multimodal AI → Bulleted Hindi/Telugu Prescription
04 / Evolution Timeline

How KisanVaani Was Discovered Through Iteration

The final platform was not designed on Day 1. It was discovered across four rapid iterations of user testing, prototype building, and challenging our own assumptions.

ITERATION 01

From Problem Statement to Visual Concept

🎥 Primary Artifact & Visual Evidence

Our initial attempt focused on defining the project vision and building a clean website showcase for satellite crop diagnostics and weather alerts.

Iteration 01 — Landing Page & Agricultural Website Concept

Click to load and play video evidence 🎬

Recorded demonstrationWatch on YouTube ↗
What We Thought

An educational web portal where farmers could read weather advisories and check crop diseases online.

What We Built

Landing page with agricultural alert cards, hero animations, and static weather/crop guidance.

Assumption Made

Assumed farmers would browse the internet and read web articles during daily farming activities.

What We Learned

Farmers don't browse landing pages. They have urgent, specific, localized crop problems requiring direct action.

ITERATION 02

From Concept to Application

🎥 Primary Artifact & Visual Evidence

Transitioned from a static website to an application-oriented experience with interactive diagnostic modules and crop advisory forms.

Iteration 02 — Building The Web Application Experience

Click to load and play video evidence 🎬

Recorded demonstrationWatch on YouTube ↗
What We Thought

If we build an interactive web app with forms and dropdowns, farmers can input soil stats and get tailored advice.

What We Built

Mobile-first React application with interactive diagnostic inputs, soil charts, and weather cards.

Assumption Made

Assumed farmers knew technical soil parameters (pH, NPK values) and could comfortably navigate multi-step form UIs.

What We Learned

Form friction is catastrophic. Real farmers couldn't answer form fields and lacked touchscreen fluency.

ITERATION 03

The Accessibility-First Voice & SMS Pivot

🎥 Primary Artifact & Visual Evidence

The fundamental architecture pivot: Replaced complex UI forms with natural Indic Voice interaction and low-bandwidth SMS delivery for feature phones.

Iteration 03 — The Voice & SMS Accessibility Pivot

Click to load and play video evidence 🎬

Recorded demonstrationWatch on YouTube ↗
What We Thought

Eliminate the app entirely for the farmer. Use natural spoken voice in regional languages over phone calls.

What We Built

Telephony gateway connecting speech recognition to Gemini LLM with instant voice-back and automated SMS summary delivery.

Assumption Made

Assumed pure AI conversational bots could answer 100% of cases autonomously without expert supervision.

What We Learned

Severe fungal blights and ambiguous symptoms need human expert escalation; and individual calls hold rich district-wide signal.

ITERATION 04

From Feature to Full Multi-Channel Ecosystem

🎥 Primary Artifact & Visual Evidence

The final complete platform: Integrating Voice, SMS, WhatsApp, Multimodal Leaf Diagnosis, Grounded Soil/Weather APIs, and District Command Center.

Iteration 04 — The Full Multi-Channel Agricultural Ecosystem

Click to load and play video evidence 🎬

Recorded demonstrationWatch on YouTube ↗
What We Thought

Build a comprehensive two-sided platform: zero-friction access for farmers, and operational intelligence for agriculture officers.

What We Built

Full KisanVaani platform with Voice, SMS, WhatsApp, photo diagnosis, grounded SoilGrids/Meteo data, and RSK Command Center.

The Outcome

Won Google Code for Community (Track 4: Kisan Alert) with end-to-end working telephony, AI pipelines, and operational suite.

The Vision

Pilot blueprint designed to serve 2,000+ farmers across blocks at an operating cost of under ₹12 per farmer per season.

05 / Evolution Matrix

Early Assumptions vs Reality & Product Response

Early Assumption

Farmer has a smartphone and will install an app.

Built complex React UI views and forms.

Ground Reality

45%+ rural users carry feature phones on 2G networks.

App download is an insurmountable barrier.

Product Response

Toll-Free Voice IVR + Automated SMS Prescriptions.

No app download or screen required.

06 / Ecosystem

The 3-Tier Multi-Channel Ecosystem

KisanVaani is a comprehensive three-tier system connecting edge farmer telephony, multi-source scientific intelligence, and district agricultural governance.

LAYER 1 — UNIVERSAL FARMER ACCESSEdge Ingress Channels

Voice Calls, SMS, WhatsApp & Web Simulator

Provides multi-channel entry points adapted to the farmer's available hardware: Toll-free IVR for basic phones, DLT SMS for offline bulleted steps, WhatsApp for photo leaf diagnosis, and browser demo simulation with Web Speech API for testing.

LAYER 2 — SCIENTIFIC INTELLIGENCE & GROUNDINGAI & Real-Time Data

Gemini Multimodal + Grounded Agronomic Data Pipelines

Synthesizes real-time satellite meteorology, ISRIC SoilGrids texture/pH layers, Government of India data.gov.in mandi wholesale prices, and ICAR/SAU package of practices. All Gemini LLM answers are strictly grounded against empirical agricultural parameters.

LAYER 3 — OPERATIONS & DISTRICT COMMANDGovernance & Extension Network

RSK / KVK Agronomist Portal & Early Outbreak Signals

Provides government extension officers and Krishi Vigyan Kendra (KVK) scientists with a triage portal for uncertain/severe disease cases, pin-code targeted weather alerts, and geographic clustering heatmaps to spot emerging locust/fungal infestations before they spread.

07 / Technical Architecture & Flows

Engineering Flowcharts & Visual Architecture

Clean, high-level visual diagrams showing the end-to-end communication pipelines, algorithmic decision loops, and operational triage flows.

1. High-Level End-to-End System Architecture

Full Pipeline
1. Farmer Channels
  • • 📞 Inbound Voice (Toll-Free)
  • • 💬 DLT SMS Messaging
  • • 📲 WhatsApp Business Bot
  • • 💻 Web Browser Simulator
2. API & Routing Layer
  • • Twilio Voice / SMS Webhooks
  • /api/advisory & /api/mandi
  • /api/weather & /api/diagnose
  • /api/recommend Crop Engine
3. AI & Scientific Grounding
  • • 🧠 Google Gemini 1.5 Pro / Flash
  • • 🌍 ISRIC SoilGrids v2 (pH, Texture)
  • • 🌧️ Open-Meteo & OpenWeather
  • • 📊 data.gov.in & Agmarknet Mandi
4. Operations & RSK Command
  • • 🎫 NeonDB Escalation Tickets
  • • 🏛️ KVK / RSK Scientist Review
  • • 📍 Outbreak Anomaly Heatmap
  • • 📢 Pin-Code Broadcast SMS Alerts
How it works:Farmer ingress feeds into domain route handlers, which query Google Gemini alongside grounded satellite, soil, and mandi data before logging to NeonDB for officer visibility.

2. Production Telephony vs Web Demo Separation

Hardware Ingress
📞 Feature Phone (Production Path)2G / GSM Keypad
1Farmer dials Toll-Free number on basic keypad phone
2Twilio Voice Webhook triggers /api/telephony/voice
3Indic ASR transcribes vernacular Hindi/Telugu/Kannada
4Gemini generates TwiML voice response + automated DLT SMS
💻 Web Browser (Demo Simulator)Recruiter / Evaluator
1Evaluator visits /demo and speaks into laptop mic
2Client-side Web Speech API recognizes speech in browser
3Sends payload to /api/advisory with grounded context
4Browser SpeechSynthesis speaks agricultural guidance back
How it works:The production path relies on Indian toll-free numbers and Twilio TwiML for keypad phones, while the web simulator uses the browser Web Speech API for evaluation.

3. Conversational Crop Advisory Flow (Max 2 Rounds)

Advisory Logic
🗣️1. Farmer Speaks Symptom

“My cotton leaves are turning yellow with brown curling edges.”

🛡️2. Domain Validation

Verifies farming relevance; politely declines non-agricultural queries.

🔄3. Clarification (Max 2)

Asks concise numbered options: “Are leaves dry or sticky with white dust?”

📋4. Spoken & SMS Advisory

Delivers verified organic & chemical remedies + auto SMS prescription.

How it works:Strict domain guardrail prevents off-topic inquiries. Clarification loops are capped at 2 rounds to prevent endless conversational loops over telephony.

4. Mandi Price Engine: 7-Day Auto Lookback

Market Intelligence
Step 1. Intent Extraction

Extracts Commodity & District

E.g., “Tomato price in Guntur AP”. Auto-disambiguates duplicate city names.

Step 2. data.gov.in Query

Check Today's Arrivals

Queries Ministry of Agriculture daily APMC database for current date records.

Step 3. 7-Day Auto Lookback

Zero Date Friction

If today has no data (weekend/lag), scans back up to Day -7 on Agmarknet automatically.

Step 4. Price Output

Speaks Price Spread

Returns Min: ₹1,800, Modal: ₹2,200, Max: ₹2,500/Quintal + latest recording date.

How it works:Eliminates farmer friction by auto-disambiguating duplicate district names and looking back across 7 days if today's arrival data has not yet been filed.

5. Agro-Meteorological Weather & Spray Advisory

Climate Engine
1. Location & Station Resolution

Open-Meteo & OpenWeather

Extracts pin code/district and fetches 7-day hourly temperature, precipitation, and wind speeds.

2. IMD Threshold Analysis

Safety & Spray Calculations

Evaluates heavy rain (>64.5mm), heatwave (>40°C), and high wind (>15km/h drift risk).

3. Actionable Farm Advisory

Optimal Window Recommendation

“Optimal spraying window: 7:00 AM – 10:00 AM. Rain expected in afternoon.”

How it works:Analyzes rain probability, wind speeds, and evapotranspiration to calculate whether chemical pesticide/fertilizer spraying is safe today.

6. Photo Disease Diagnosis & Human-in-the-Loop Triage

Vision & Safety
Farmer Uploads Leaf Photo (WhatsApp / Web)Gemini 1.5 Flash Vision evaluates disease confidence score and severity threat level
Confidence Threshold: 75%
✓ High Confidence (≥75%) & Standard Pest

Automated Direct Prescription

Farmer immediately receives pathogen name (e.g. Early Blight), chemical dosage (Mancozeb 75% WP @ 2g/L), organic neem oil alternative, and safety interval.

⚠️ Low Confidence (<75%) or Critical Threat

Escalation to RSK / KVK Agronomist

Creates high-priority ticket in Command Center. Government agricultural officer reviews leaf photo, enters verified guidance, and triggers farmer callback.

How it works:AI handles high-confidence, routine cases. Low-confidence scans or critical quarantine pests are routed to Rythu Seva Kendra scientists for verified diagnosis.

7. Grounded Crop Recommendation Multi-Signal Convergence

Agronomic Ranking
🌍ISRIC SoilGrids

pH, Sand/Clay %, Organic Carbon

🧪Soil Health Card

NPK & Micronutrient Levels

🌧️Open-Meteo

Seasonal Rainfall & GDD

📊data.gov.in

Historical Mandi Profitability

🌾Top 3 Recommended

Crops, Water Fit, Profit Index

How it works:Synthesizes physical soil properties from ISRIC SoilGrids, rainfall patterns, market price trends, and state agricultural university guidelines to rank suitable crops.

8. District Outbreak Anomaly Clustering (Early Warning)

Operational Intelligence
1. Farmer Call Queries

Support Interactions

Farmers across neighboring villages report leaf spots and worm damage.

2. NeonDB Ingestion

Spatial Telemetry

Queries are geocoded by pin code and anonymized in the telemetry database.

3. Anomaly Clustering

Spike Detection

System flags >15 cases of Fall Armyworm in 48 hours within Block 506001.

4. Officer Broadcast

Targeted SMS Alert

District Agriculture Officer broadcasts preventive neem spray alert to all registered farmers.

How it works:Farmer support calls become macro signals. Spatial clustering detects localized pest surges, allowing agriculture officers to issue preventive block broadcasts.
08 / Reliability & Resilience

Designing for Flaky Networks & Unreliable AI

In agricultural lifelines, returning a 500 error or hallucinated chemical dosage is unacceptable. KisanVaani implements two core resilience patterns:

ENGINEERING RESILIENCE

Cached & Hindi Offline Fallback Strategy

Every live telephony and API call path includes a pre-compiled local cache and static Hindi audio/text fallback. If Gemini or data.gov.in is temporarily unreachable, the farmer is never hung up on; they receive verified baseline seasonal package-of-practices guidance immediately.

Farmer Call → External API Timeout → Cached Seasonal Guidance Delivered
PRODUCT PHILOSOPHY

When AI Shouldn't Be the Final Answer

AI handles scale; humans handle uncertainty and crop severity. If an image is blurry or symptoms suggest high-quarantine pests (like Pink Bollworm), the AI does not issue autonomous final advice. It creates a high-priority ticket in the RSK dashboard for verified agronomist review.

Ambiguous Leaf Photo → AI Flags Low Confidence → RSK Scientist Prescribes
09 / Technology & Datasets

Technology Stack & Scientific Datasets

Production Tech Stack

Frontend / App

Next.js 16 (App Router)

React 19, TypeScript, Tailwind 4

AI & Reasoning

Google Gemini 1.5

@google/genai Pro & Flash

Database

PostgreSQL

Neon Serverless Driver

Telephony & SMS

Twilio Voice & SMS

TwiML, WhatsApp Business

Grounded Agricultural Data Sources

SOURCEDATA PROVIDEDROLE IN PLATFORM
data.gov.inDaily Mandi Wholesale Prices (Min, Modal, Max)Real-time commodity price intelligence for APMC markets.
Agmarknet 2.0State Mandi Fallback DatabaseSecondary lookback fallback when primary daily arrivals lag.
ISRIC SoilGrids v2Soil pH, Sand/Clay %, Organic Carbon, WRBAutomated soil texture & chemical profile without manual test entry.
Open-Meteo & OpenWeatherRainfall, Evapotranspiration (ET₀), Wind, HumidityDry-spell alerts, 72h downpour warnings, and spray windows.
Soil Health Card (SHC)National NPK & Micronutrient StandardsFertilizer recommendation calibration for nitrogen/phosphorus.
ICAR / SAU GuidelinesState Agricultural University Package of PracticesGround truth agronomic treatment protocols and safety windows.
IMD ThresholdsHeavy Rain (>64.5mm), Heatwave (>40°C)Automated trigger rules for district-wide emergency broadcasts.
10 / System Modules

Core API Endpoints & Route Architecture

/api/advisory

Conversational Agricultural Advisory

Receives voice/text transcriptions, validates farming relevance, queries Gemini with grounded context, limits clarifications to 2 rounds, and returns formatted Indic guidance.

/api/mandi

Wholesale Mandi Price Resolution

/api/weather

Agro-Meteorological Advisory

/api/diagnose

Multimodal Leaf Disease Diagnosis

/api/recommend

Soil-Climate Crop Match Engine

/api/telephony/*

Inbound Telephony & DLT SMS Handlers

/command

District Command Center Suite

/demo

Interactive Web Simulator

11 / Scale Blueprint

Field Pilot Blueprint & Operating Economics

Outlining the operational deployment plan from single-block pilot to district-wide extension network.

PHASE 1 — INITIAL BLOCK PILOT (WEEKS 1–4)

2,000 Farmers in One Agricultural Block

  • • Onboarding via Gram Panchayats and local Krishi Vigyan Kendras (KVK).
  • • Missed-call registration to automatically register farm pin code.
  • • Inbound toll-free voice advisory and mandi price lookups.
PHASE 2 — DISTRICT EXTENSION (MONTHS 2–4)

Full District Expansion & Officer Visibility

  • • Rythu Seva Kendra (RSK) agronomist triage portal active.
  • • Automated weather-zone SMS broadcasts for frost and downpour warnings.
  • • District Agriculture Officer visibility into pest cluster heatmaps.
Target Operating Economics (Pilot Plan Estimate)

Under ₹12 per farmer per crop season

Achieved by concise AI speech prompts, localized token caching, and bulk government DLT SMS rates.

Frugal Telephony Architecture
12 / Decision Log

Engineering & Product Decision Log

DECISION 01Move from App-First to Voice + SMS Telephony
WHY (REASON):

Over 45% of Indian rural users own feature phones and face severe app-download friction.

OUTCOME (RESULT):

The core product became universal — accessible on any 2G keypad phone in India without internet.

DECISION 02Eliminate Date Ingestion from Mandi Price Queries
WHY (REASON):

Farmers do not remember exact APMC reporting calendar dates, and mandi data has 2-7 day lag.

OUTCOME (RESULT):

Implemented automatic 7-day lookback window. Farmer asks for commodity; system handles date matching.

DECISION 03Ground Gemini Responses in SoilGrids & Met-Data
WHY (REASON):

LLMs frequently hallucinate generic advice (e.g. 'water daily') without empirical soil texture/climate context.

OUTCOME (RESULT):

Advice is scientifically calibrated to specific sand/clay percentages and IMD precipitation forecasts.

DECISION 04Add Human RSK Escalation for Uncertain Diagnoses
WHY (REASON):

Severe leaf blights risk real livelihood devastation if misclassified by computer vision models.

OUTCOME (RESULT):

Low-confidence and high-severity cases become officer triage tickets in the Command Center.

DECISION 05Transform Inbound Telephony into District Signals
WHY (REASON):

Individual farmer distress calls contain latent geographic cluster signal about emerging pests.

OUTCOME (RESULT):

Created the Command Center early-warning heatmap to alert block officers before infestations spread.

13 / Retrospective

Key Product & Engineering Lessons

01

Don't build for the tech you want; build for the tech they have.

It is tempting as engineers to build rich WebGL dashboards. But true empathy means meeting users on their existing 2G basic keypad phones.

02

Accessibility dictates system architecture.

Choosing Voice + SMS wasn't just a UI tweak. It completely restructured the backend into event-driven telephony webhooks and DLT queues.

03

Voice is a primary product interface.

For oral-first communities, voice is not an auxiliary feature. It is the fastest, most natural, and most trusted interaction modality.

04

AI needs grounding to be actionable.

Generic LLM responses are dangerous in agriculture. Grounding against SoilGrids, Open-Meteo, and ICAR protocols turns text into reliable advice.

05

Safety requires explicit human escalation.

AI must know when to say 'I'm escalating this to Dr. Rao at Rythu Seva Kendra' instead of guessing on high-severity crop diseases.

06

Support systems are latent intelligence systems.

At scale, 1,000 farmers asking about leaf spots is no longer customer support — it is a real-time epidemiologic outbreak signal.

FINAL LIVE SYSTEM

Explore KisanVaani Live

Experience the complete working prototype: Simulate toll-free voice calls with speech synthesis, diagnose leaf pests via camera uploads, test mandi spreads, and explore the District Command Center.