Khet Sarathi is an Intelligent WhatsApp-based Audio and Voice Agentic farming assistant that helps Indian farmers with crop advisory, weather & government schemes updates, OCR analysis of Mandi receipts and legal documents, fertiliser and chemicals component analysis in 11 plus Indic languages - powered by Sarvam AI and Gemini API
# Khet Sarathi - The all-in-one Agentic Farm Assistant
Khet Sarathi is an intelligent WhatsApp-based farming assistant that helps Indian farmers with crop advisory, market prices, weather information, government schemes, and image analysis of Mandi receits, Legal documents, fertilizer component analysis ad many more using Sarvam AI and Gemini technologies.
## Features
### 🌾 Core Capabilities
- **Multi-language Support**: Hindi, Bengali, Tamil, Telugu, Kannada, Malayalam, Gujarati, Punjabi, Marathi, Urdu, and English
- **Voice & Text Communication**: Speech-to-text and text-to-speech in Indian languages
- **Image Analysis**: Fertilizer packets, soil test reports, market receipts, and crop photos
- **Market Intelligence**: Real-time mandi prices and MSP comparisons
- **Weather Advisory**: Location-based weather forecasts with farming recommendations
- **Government Schemes**: Information about PM-KISAN, crop insurance, and credit schemes
### 🤖 AI-Powered Features
- **Intent Classification**: Smart understanding of farmer queries
- **Image Processing**: Multi-step analysis of agricultural images
- **Contextual Responses**: Memory of previous conversations
- **Tool Integration**: Automated data fetching from various APIs
## Demo Video
## Technology Stack
- **Backend**: FastAPI (Python)
- **AI/ML**: Google Gemini AI, Sarvam AI (TTS/STT)
- **Communication**: Twilio WhatsApp API
- **Audio Processing**: pydub, AudioSegment
- **Image Processing**: PIL, Google Gemini Vision
- **Database**: SQLite (with conversation memory)
## Prerequisites
Before deploying KrishiSarathi, ensure you have:
1. **Python 3.8+** installed
2. **API Keys** for the following services:
- Twilio Account (for WhatsApp)
- Sarvam AI API (for Indian language TTS/STT)
- Google Gemini API (for AI responses and image analysis)
3. **ngrok** or similar tunneling service (for local development)
4. **Domain/Server** (for production deployment)
## Installation & Setup
### 1. Clone the Repository
```b …