Inspiration
Farmers across India often depend on middlemen, delayed mandi updates, and language-limited advisory systems. AgriVani was built to make agricultural guidance accessible through a voice-first, multilingual interface that works even on low-bandwidth rural networks.
What it does
AgriVani helps farmers ask crop and mandi-price questions in Indian languages. It provides:
- Pan-India mandi price estimates
- Historical CSV fallback when live government data is unavailable
- Multilingual advisory responses
- Voice-first workflow
- Audio output using free gTTS fallback
- Streamlit Cloud demo without paid API keys
- Local architecture ready for FastAPI, Deepgram, Gemini/Ollama, and ElevenLabs
The core “killer feature” is the MandiPriceEngine: it first tries live mandi data and falls back to historical data to generate AI-assisted price predictions.
How we built it
We built the app using Streamlit for the deployed demo and Python for the price prediction engine. The local production architecture includes a FastAPI backend, WebSocket voice flow, Deepgram STT integration, Gemini/Ollama reasoning support, ElevenLabs/gTTS TTS, and a structured pan-India mandi dataset.
For Streamlit Cloud, we optimized the app to run without paid APIs. It uses historical CSV data, deterministic advisory logic, and gTTS audio so judges can test it immediately.
Challenges we faced
The biggest challenge was making a real-time voice-first architecture work in a hackathon-friendly deployment environment. Streamlit Cloud runs a single app process, so we created a cloud-safe version while keeping the full backend architecture in the codebase.
We also handled dependency issues, Python version compatibility, and fallback logic so the project remains usable without paid Gemini, Deepgram, or ElevenLabs keys.
What we learned
We learned how important graceful degradation is for rural technology. A farmer-facing system cannot fail just because a cloud API is unavailable. AgriVani therefore prioritizes fallback data, local AI readiness with Ollama, and simple low-bandwidth flows.
What’s next
Next, we want to integrate live Agmarknet ingestion, expand the historical mandi dataset, improve speech recognition across Indian languages, add weather and pest advisory, and deploy the FastAPI backend separately for full real-time voice support.
Built With
- csv
- deepgram
- elevenlabs
- fastapi
- ollama
- python
- streamlit
- websockets


Log in or sign up for Devpost to join the conversation.