A comprehensive platform designed to support smallholder farmers across all phases of the crop lifecycle—from pre-sowing planning to post-harvest market advisory—using satellite remote sensing, real-time data, generative AI, and market intelligence.
- Overview
- Key Features
- Project Structure
- Tech Stack
- Getting Started
- Project Milestones
- How It Works
- Data Integration
- API References
- Contributing
AgroSense bridges the gap between smallholder farmers and modern agricultural technology. Smallholder farmers often lack timely, location-specific guidance for crop management decisions. This platform integrates multiple data sources and AI to provide:
- Real-time crop monitoring using satellite imagery (NDVI)
- Weather-based advisory for irrigation and crop management
- Soil and agronomic insights for fertilizer application
- Market intelligence for optimal harvest timing and selling decisions
- Multilingual voice/text interface for accessibility across literacy levels
✓ Support every stage of the crop lifecycle: planning, growth, harvest, and post-harvest decision-making
✓ Provide actionable recommendations, not just alerts or detections
✓ Enable access for farmers of all literacy levels through voice interaction in local languages
✓ Combine remote sensing (e.g., NDVI) with agronomic models and market data
| Feature | Description |
|---|---|
| Pre-Sowing Planning | Crop suitability analysis, optimal sowing window identification |
| Real-time Monitoring | NDVI-based vegetation health tracking, anomaly detection |
| Mid-Season Advisory | Irrigation, fertilizer, and pest management recommendations |
| Yield Prediction | Forecasted yield with uncertainty bounds |
| Harvest Timing | Optimal harvest window recommendations with risk assessment |
| Market Intelligence | Real-time mandi prices, trend analysis, selling recommendations |
| Multilingual Support | Voice and text interaction in Indian regional languages |
| Personalized Context | Location-aware, crop-specific, history-based recommendations |
ds-ai-lab-group-4/
├── milestone-one/
│ └── agrosense.md # Project vision, user journey, benchmark analysis
├── milestone-two/
│ └── dataset_preprocessing.md # Data integration and preprocessing pipelines
├── milestone-three/
│ └── model_architecture.md # LLM-powered system architecture and design
├── milestone-four/
│ └── code # Code for the whole web app + server side LLM calls
├── milestone-five/
│ └── report.md # Testing and evaluation of AgroSense chatbot
├── milestone-six/
│ └── final-project-report.md # Final report
└── README.md # This file
- Product vision and principles
- User journey mapping across crop lifecycle
- Benchmark analysis (OneSoil, ChatGPT limitations)
- Sample farmer interaction scenarios
- Integration of 5+ data sources:
- Google Earth Engine satellite embeddings
- Open-Meteo weather API
- Digital Soil Map of the World (FAO-UNESCO)
- Agmarknet mandi price data
- Nominatim geocoding service
- Complete preprocessing pipelines with Python code examples
- Data cleaning, normalization, and feature engineering
- LLM-powered system design (Google Gemini 2.5 Pro)
- Request-response flow with detailed state diagrams
- Server layer components (Query Parser, Context Retriever, etc.)
- Tool orchestration and streaming response handling
- Database schema for user context and history
- Putting everything together on a Next.js-powered web app
- Conversation memory included
- Various tools for farmers to engage with also worked in
- Testing deterministic API calls (Python) side by side with the chatbot
- Identifying any issues with the workflow
- Comparing to other off-the-shelf tools like Gemini and ChatGPT
- Putting the whole project into an easy to read markdown report
- Integrates all the previous milestones and compiles them into one place
- LLM: Google Gemini 2.5 Pro (1M token context window)
- Framework: LangChain / LLM orchestration libraries
- Embeddings: Satellite embedding vectors (Google Earth Engine)
- Remote Sensing: Google Earth Engine (Sentinel-2, Landsat)
- Weather: Open-Meteo API (global historical & forecast data)
- Soil Data: Digital Soil Map of the World (FAO-UNESCO)
- Market Data: Agmarknet / eNAM APIs (Indian mandis)
- Geocoding: Nominatim (OpenStreetMap)
- Python 3.8+
- Git
- Google Earth Engine account (for satellite data)
- API keys for Open-Meteo, Agmarknet (if applicable)
- Project vision and user journeys
- Benchmark analysis
- Farmer interaction scenarios
- Data source identification (5 APIs/services)
- Preprocessing pipelines with code examples
- Feature engineering strategies
- Train/validation data splits
- LLM-powered system design
- Server layer components
- Tool orchestration framework
- Detailed request-response flows
- Database schema
- Backend API development (FastAPI)
- LLM integration (Gemini 2.5 Pro)
- Frontend development (React/React Native)
- Database setup and data loading
- Testing and validation
- Pilot deployment with farmers
Farmer Query → Query Parser → Context Retriever → LLM Preparation
↓
LLM Processing → Tool Orchestration → External APIs (parallel calls)
↓
Response Formatting → Streaming to UI → Farmer Receives Advice
↓
Store Interaction in History DB → Improve Future Recommendations
Farmer: "Should I irrigate my wheat field today?"
System Flow:
1. Parse intent: Irrigation decision needed
2. Retrieve context: Location (Meerut), Crop (Wheat), Stage (Tillering)
3. Call tools in parallel:
- Get weather forecast (0mm rain, 28°C, 65% humidity)
- Get soil moisture (35%, optimal is 45-55%)
- Get crop water requirements (2.5mm/day at tillering)
4. LLM reasoning: "Soil moisture is below threshold, no rain forecasted"
5. Recommendation: "YES, irrigate today. Apply 40mm water in early morning."
| Source | Purpose | Format | Coverage |
|---|---|---|---|
| Google Earth Engine | Satellite embeddings, NDVI | ImageCollection | Global, 30m resolution |
| Open-Meteo API | Weather forecast & historical | JSON/REST API | Global, hourly/daily |
| Digital Soil Map | Soil types and properties | Vector shapefile | Global, 1:5M scale |
| Agmarknet | Mandi prices and arrivals | HTML/CSV | India, daily data |
| Nominatim | Geocoding and reverse geocoding | GeoJSON/REST API | Global coverage |
- Endpoint:
https://api.open-meteo.com/v1/forecast - Parameters:
latitude,longitude,hourly,daily,forecast_days - Documentation: Open-Meteo Docs
- Dataset:
GOOGLE/SATELLITE_EMBEDDING/V1/ANNUAL - Resolution: ~30m (Sentinel-2 & Landsat harmonized)
- Documentation: Earth Engine Docs
- Portal: Agmarknet
- eNAM Integration: eNAM Portal
- Commodity List: Agmarknet Commodities
- Dataset: Digital Soil Map of the World (DSMW v3.6)
- Format: Vector shapefile, WMS, GeoTIFF
- Repository: SoilWise HE
- Endpoint:
https://nominatim.openstreetmap.org/ - Documentation: Nominatim Docs