# Building AgriAlert: A Proactive Marathi AI Voice Assistant for Indian Farmers

> Source: <https://dev.to/parth_deshpande_48b3d5ba8/building-agrialert-a-proactive-marathi-ai-voice-assistant-for-indian-farmers-1j17>
> Published: 2026-08-15 08:40:14+00:00

🌾 1. The Mission: Voice AI for the Backbone of Bharat

In rural Maharashtra, timely access to agricultural insights can make or break a harvest. Sudden unseasonal rainfall, fast-spreading crop diseases, and fluctuating Mandi prices directly impact a farmer's livelihood. While modern digital tools exist, digital literacy and complex smartphone UIs often stand in the way.

To bridge this divide, I spent the last 10 days building AgriAlert under the Farm & Field track of the #VoiceForBharat Challenge.

AgriAlert is a Marathi AI voice assistant designed to provide real-time weather advisories, Mandi market rates, crop care guidance, and proactive disaster warnings through voice conversations on the web and direct mobile phone calls.

⚙️ 2. High-Level System Architecture

AgriAlert is built on a real-time conversational voice pipeline:

[ Farmer Voice Input (Web/Phone) ]

│

▼

[ STT: LiveKit Multi-Locale Speech-to-Text ]

│

▼

[ Brain: LLM with Domain Prompt, Guardrails & Memory ]

├── SQLite DB (Caller profile, land size, crops)

├── Tools: Mandi Rates & Weather APIs

├── Telephony: Outbound SIP Calling

└── Specialist Agent: Deep Agronomy Handoff

│

▼

[ TTS: Murf Falcon (Pooja - Marathi) ]

│

▼

[ Real-Time Audio Output (<500ms Latency) ]

🚀 3. Key Features Built Across the 10 Days

Ultra-Fast Regional Voice: Powered by Murf Falcon, the Marathi voice (Pooja) speaks naturally in Devanagari Marathi with near-zero latency, understanding code-mixed terms like "pesticide", "urea", and "weather".

Strict Guardrails: Programmed to never guess market prices without verified sources, and strictly refuses to prescribe toxic chemicals without human expert validation.

Long-Term Caller Memory: Uses an SQLite database to remember returning farmers, their district, and their primary crops upon explicit consent.

Tool Chaining & Live Data: Automatically pulls the caller's saved district to fetch live weather forecasts and Mandi prices without making the farmer repeat themselves.

Proactive Outbound Calls: Uses LiveKit SIP integration to automatically call farmers on their mobile phones when severe weather alerts are issued.

Human Escalation (KVK Integration): Generates traceable support tickets for complex issues, routing them directly to agricultural extension officers.

Call Analytics Dashboard: Tracks success rates, total calls, and call outcomes in real time while enforcing zero PII retention.

Multi-Agent Specialist Handoff: Seamlessly transfers complex disease diagnosis calls to a dedicated Crop Problem Specialist Agent.

🛠️ 4. Key Challenges & How I Solved Them

Devanagari vs. Romanized Script: Early tests occasionally produced Romanized Marathi (e.g., 'namaste' instead of 'नमस्ते'), which caused TTS pronunciation issues. I resolved this by enforcing strict system prompt constraints requiring all Marathi responses to be strictly in native Devanagari script.

Tool Chaining Latency: Calling multiple tools sequentially added noticeable delays. By pre-fetching caller metadata on session connection and passing cached district data into API calls, latency was kept well under conversational thresholds.

Proactive Call Opt-outs: Outbound calls can easily feel intrusive. I structured the opening script to immediately state who is calling, why (weather warning), and how to opt out within the first two sentences.

💻 5. Quickstart Guide: Run Your Own Voice Agent

Prerequisites

Python 3.10+

Murf API Key (with Murf Falcon access)

LiveKit Cloud Project & API Keys

Clone the Starter Code

Bash

git clone [https://github.com/murf-ai/murf-livekit-starter.git](https://github.com/murf-ai/murf-livekit-starter.git)

cd murf-livekit-starter

Configure Environment Variables

Create a .env file in the root directory:

Code snippet

LIVEKIT_URL=your_livekit_url

LIVEKIT_API_KEY=your_api_key

LIVEKIT_API_SECRET=your_api_secret

MURF_API_KEY=your_murf_key

🔮 6. What's Next?

Expanding language models to support multi-lingual pan-India deployment (Hindi, Tamil, Telugu, Gujarati).

Direct integration with official state government agricultural databases and soil testing APIs.
