Gram Saathi
Inspiration
India has millions of farmers who have no smartphone or internet access. They are completely excluded from the AI revolution transforming agriculture. Every existing agri-tech solution requires an app or data connectivity, leaving the most vulnerable farmers behind. We asked ourselves: what if a farmer could access live market prices, weather forecasts, and government scheme information just by giving a missed call from a ₹500 feature phone? That question became Gram Saathi, a voice-first AI assistant that meets farmers where they already are: on a basic phone call, in their own language, at zero cost.
What it does
Gram Saathi is a voice-only AI agricultural assistant that works through a missed call trigger. A farmer dials a number —> the call auto-rejects (costing them nothing) —> Gram Saathi calls them back with a full AI-powered voice conversation in their regional language. It provides:
- Live mandi prices from 1,266+ agricultural markets across India via official government data
- 5-day hyperlocal weather forecasts with severe weather alerts (heavy rain, heatwave, frost)
- Government scheme eligibility matching against 45+ central and state schemes
- Crop-specific advisory — season-aware, region-specific guidance on sowing, irrigation, pest management, and fertilizer
- Progressive profiling — builds the farmer's profile naturally through conversation (no forms, no apps)
- Analytics dashboard for monitoring calls, transcripts, user profiles, and usage patterns in real-time
All of this works across 11 Indian languages: Hindi, Tamil, Telugu, Kannada, Marathi, Bengali, Gujarati, Punjabi, Malayalam, Odia, and English.
How we built it
The architecture is a real-time voice pipeline stitching together speech, AI reasoning, and telephony:
Farmer speaks → LiveKit (VAD) → Sarvam STT → AWS Bedrock LLM (with Nova2) → Sarvam TTS → LiveKit → Farmer hears
Backend: Python 3.12 + FastAPI (async), PostgreSQL + Redis, running on a single AWS EC2 instance in Mumbai (ap-south-1).
Voice pipeline: LiveKit Agents SDK handles real-time WebRTC media. We built a custom Bedrock LLM plugin to support tool use with Nova 2 via the non-streaming Converse API. Sarvam AI provides native Indian-language STT (saaras:v3) and TTS (bulbul:v3) at 8kHz PCM for telephony quality.
Telephony: Twilio provides the phone number and Elastic SIP Trunk. On a missed call, a webhook triggers an outbound callback through LiveKit's SIP integration, the farmer never pays a paisa.
Data sources: data.gov.in for live mandi commodity prices (30-min cache), Open-Meteo for hyperlocal weather (2-hr cache), a curated schemes.json for government scheme matching, and structured crop advisory data with season detection.
Frontend: Next.js 16 + Tailwind CSS + shadcn/ui dashboard with TanStack React Query, showing live call monitoring, call history with transcripts, user profiles, and analytics charts.
Deployment: Docker Compose orchestrating 7 services (PostgreSQL, Redis, LiveKit server, SIP, backend, agent worker, frontend) on a single t3.medium instance.
Challenges we ran into
- Message ordering rules — Bedrock enforces strict message alternation (user/assistant) and requires specific block ordering. Debugging silent failures from malformed message histories was painful.
- 11-language number formatting — Digits and currency symbols can't be spoken by TTS. We built language-specific number-to-word conversion so "₹2,450" becomes "do hazaar chaar sau pachaas rupaye" in Hindi or "இரண்டாயிரத்து நானூற்று ஐம்பது ரூபாய்" in Tamil.
- Marker stripping — The LLM emits
<thinking>blocks,<<<LANG:xx-YY>>>markers, and<<<END_CALL>>>tags that must never reach the TTS engine. Getting this filtering reliable across all edge cases took multiple iterations. - Mandi price API reliability — The data.gov.in API is inconsistent. We implemented a dual-endpoint strategy (primary date-specific + fallback rolling 3-day window) with 30-minute caching to ensure farmers always get data.
- Feature phone audio quality — 8kHz narrowband audio over Indian telecom networks means STT accuracy drops. Tuning VAD (voice activity detection) thresholds and prompt engineering for brevity was critical.
Accomplishments that we're proud of
- Zero cost to the farmer — The entire missed call → callback model means a farmer with no balance, no internet, and no smartphone can access AI-powered agricultural intelligence for free.
- 11 languages from day one — Not as an afterthought, but as a core design principle. The system prompt uses feminine verb conjugations, culturally appropriate greetings, and region-specific agricultural knowledge in every supported language.
- Sub-3-sentence responses — We engineered the LLM to give phone-friendly answers. No walls of text — just the information the farmer needs, spoken naturally.
- Progressive profiling — Instead of a registration form (impossible on a feature phone), the system builds the farmer's profile organically through conversation. By the second call, it already knows their state, district, crops, and land size.
- Production-ready on a single EC2 — The entire stack (7 Docker services, real-time voice pipeline, database, caching) runs on a single t3.medium instance (~$30/month), making it viable for NGOs and government deployment.
- Full observability dashboard — Real-time call monitoring, live transcripts, language distribution analytics, and tool usage tracking — all in a polished Next.js UI.
What we learned
- Voice-first design is fundamentally different from screen-first. You can't show a table of prices — you have to narrate the most relevant one. Every UX decision had to be rethought for audio.
- Indian language NLP is still an emerging frontier. STT accuracy varies significantly across languages and dialects. Tamil and Odia were notably harder than Hindi.
- Government APIs need defensive engineering. data.gov.in has inconsistent response formats, occasional downtime, and no SLA. Building resilient fallbacks is not optional.
- LLM tool use over voice requires tight latency budgets. Every tool call adds a round-trip. We learned to make the LLM decisive — call the right tool on the first try, don't ask clarifying questions when you have enough context.
- Farmers don't behave like chatbot users. They speak in long, context-rich sentences mixing multiple requests. The system prompt had to be engineered to handle "what's the price of wheat and will it rain tomorrow and am I eligible for PM-KISAN" as a single turn.
What's next for Gram Saathi
- WhatsApp integration — Extend the same voice AI to WhatsApp voice notes for farmers who have basic smartphones but prefer voice over text.
- Proactive outbound alerts — Call farmers before a severe weather event, when mandi prices spike, or when a government scheme deadline approaches — without them having to call in.
- Regional dialect fine-tuning — Partner with Sarvam AI to improve STT accuracy for underserved dialects (Bhojpuri, Chhattisgarhi, Rajasthani).
- Farmer-to-farmer knowledge network — Let farmers record and share crop tips in their own voice, building a community knowledge base.
- Integration with FPOs and cooperatives — Enable Farmer Producer Organizations to broadcast price negotiation updates and collective selling opportunities.
- Offline-capable edge deployment — Explore running lightweight models on local hardware at village telecom towers to reduce latency and cloud costs.
- Government and NGO partnerships — Pilot with state agriculture departments and organizations like Digital Green to reach millions of farmers across India.
Built With
- amazon-web-services
- bedrock
- docker
- livekit
- nova
- postgresql
- sarvam