🏆 0.816
Live
OpenEnv Competition · All Tasks Passed

Precision Agriculture
for Indian Smallholders

A scientifically-grounded RL environment simulating real farming decisions — irrigation scheduling, pest management, and season optimisation — built on FAO-56, ICAR IPM, and AGMARKNET data.

📈 Baseline Results · Seed 42
Irrigation Scheduling
threshold ≥ 0.65
0.800
Pass
Pest Management
threshold ≥ 0.60
0.655
Pass
Season Optimiser
threshold ≥ 0.55
0.993
Pass
Overall Average
3 / 3 tasks passed
0.816
🏆 Top
⚙️ How It Works
1

Environment Simulates a Farm

Server models soil moisture via FAO-56 water balance, crop growth via GDD, weather from 3 Indian regions, and pest populations using ICAR thresholds — updated every simulated day.

2

LLM Agent Makes Daily Decisions

An AI agent reads moisture levels, pest counts, 7-day forecasts, and market prices — then decides whether to irrigate, spray pesticides, or harvest.

3

Dense Rewards from Real Science

Every decision scores against FAO-56 equations, ICAR economic thresholds, and AGMARKNET prices. Dense per-step rewards in [−1.0, 1.0] — zero arbitrary heuristics.

🟢 Server Status
—
Status
7860
Port
Docker
Runtime
$ Pinging server...
🟢 Easy

Irrigation Scheduling

Rice (Kharif) · IR-64 · Pune, Maharashtra

Manage rice irrigation for 14 days during the critical tillering stage. Read soil moisture depletion against RAW thresholds and balance against 7-day rainfall forecasts to avoid both stress and waterlogging.

Episode Steps
14 days
Pass Threshold
≥ 0.65
Soil Type
Black Cotton
Water Model
FAO-56 ET₀
Max Yield
6.5 t/ha
MSP
₹2,183/q
Score Achieved0.800 ✓
Key Decisions
Soil moisture reading ET₀ calculation Rain forecast check Irrigation method
🟡 Medium

Pest Management

Cotton (Kharif) · Bt-Cotton RCH-2 · Guntur, AP

Control whitefly and bollworm pressure over 30 days. Apply pesticides only when pest populations reach ICAR Economic Thresholds — rotate chemicals to prevent resistance buildup and preserve natural enemies.

Episode Steps
30 days
Pass Threshold
≥ 0.60
Pest Standard
ICAR IPM
Resistance Idx
Tracked
Max Yield
2.8 t/ha
MSP
₹6,620/q
Score Achieved0.655 ✓
Active Pests
Whitefly Bollworm Natural Enemies Resistance Index
🔴 Hard

Season Optimiser

Tomato (Rabi) · Pusa Ruby · Guntur, AP

Manage a complete 110-day tomato Rabi season. Simultaneously optimise irrigation, pest and disease management, and harvest timing against volatile AGMARKNET market prices with 65% annual volatility.

Episode Steps
110 days
Pass Threshold
≥ 0.55
Max Yield
25 t/ha
Price Volatility
65% annual
Growth Stages
6 stages
Market
AGMARKNET
Score Achieved0.993 ✓
Objectives
Net revenue Yield achievement Harvest timing Sustainability
🌾

Crop Profiles

4 varieties
Crop & VarietySeasonDaysMax YieldMSP
Rice IR-64Kharif1206.5 t/ha₹2,183/q
Wheat HD-2967Rabi1405.5 t/ha₹2,275/q
Bt-Cotton RCH-2Kharif1802.8 t/ha₹6,620/q
Tomato Pusa RubyRabi11025.0 t/haNo MSP
🪨

Soil Profiles

4 types
Soil NameTextureFC%WP%Drainage
Black Cotton (Vertisol)Clay42%22%Slow
Alluvial (IGP)Sandy Loam32%14%Good
Red LateriteLoamy Sand22%10%Excessive
Medium LoamyLoam35%16%Moderate
📈

Market Price Structures

AGMARKNET 2023–24
CropBase MSPAnnual VolatilityGrade A PremiumHarvest Glut Disc.
Rice₹2,183/q12%+15%−8%
Wheat₹2,275/q9.5%+12%−6%
Cotton₹6,620/q22%+25%−12%
Tomato₹1,500/q65%+35%−25%
🌦️

Weather Regions

3 Indian zones
RegionClimate ZoneElevationAvg Tmax (Jun)Annual Rain
Pune, MaharashtraSemi-arid560 m29.5°C~663 mm
Ludhiana, PunjabSemi-arid Continental247 m40.1°C~418 mm
Guntur, Andhra PradeshTropical Semi-arid31 m36.8°C~631 mm
🔌 Endpoints
GET /docs Swagger UI →
GET /health Server ping
POST /reset Start episode · {task, seed}
POST /step Submit action → reward
GET /state Current observation
POST /grade Final episode score
🟢 Live Status
—
Status
7860
Port
FastAPI
Framework
$ Awaiting ping...
inference.py — Quick Start (Windows CMD)
# Step 1 — Set your LLM credentials (Groq is free) set OPENAI_API_KEY=your_groq_key_here set MODEL_NAME=llama-3.1-8b-instant set API_BASE_URL=https://api.groq.com/openai/v1 set AGROENV_URL=https://pranovraghavendhra-agroenv.hf.space # Step 2 — Run the baseline LLM agent python inference.py # Step 3 — Expected results (seed=42) [START] task=irrigation_scheduling env=agroenv [STEP] step=1 reward=0.30 done=false [END] success=true score=0.800 PASS ✓ [END] success=true score=0.655 PASS ✓ [END] success=true score=0.993 PASS ✓ ══════════════════════════════════════ Overall average score: 0.816 🏆 ══════════════════════════════════════
Sample /reset request
# POST /reset { "task": "irrigation_scheduling", "seed": 42 } # Response includes full observation: { "observation": { "soil": { "moisture_pct": 62.4, "depletion_mm": 18.2 }, "weather_today": { "et0_mm": 4.8, "rainfall_mm": 0 }, "pests": [...], "market": { "current_price_inr_per_quintal": 2240 } }, "max_steps": 14 }
📚 Scientific References & Grounding
💧

Allen et al. (1998) — FAO-56 Penman-Monteith

Daily crop water demand calculation via ET₀ × Kc. Used for all irrigation scheduling reward functions and soil water balance equations across all tasks.

🦗

ICAR IPM Guidelines (2022)

Economic Thresholds (ET) and Economic Injury Levels (EIL) for whitefly, bollworm, brown planthopper, stem borer, and fruit borer in Indian conditions.

📊

AGMARKNET Historical Price Data 2023–24

Wholesale market price data used for monthly price indices, seasonal volatility profiles, grade premiums, and harvest glut discount modelling.

🏛️

CACP MSP Recommendations 2023–24

Commission for Agricultural Costs & Prices official Minimum Support Prices used as price floor benchmarks in season optimiser reward calculations.

🌿

Baret & Guyot (1991) — NDVI-LAI Relationship

Beer-Lambert law applied to NDVI-LAI relationship for crop canopy monitoring, growth stage estimation, and yield potential tracking throughout the season.

🌦️

IMD 30-Year Regional Climate Normals

India Meteorological Department normals for Pune (MH), Ludhiana (PB), and Guntur (AP) used as stochastic weather simulation seeds with realistic uncertainty.

👁️ Observation Space
🌡️
Weather (Today + 7-day Forecast)
FAO-56 ET₀, Tmax, Tmin, humidity, rainfall, wind — with probabilistic uncertainty
🪱
Soil Water Balance
Moisture%, depletion_mm, RAW threshold, stress coefficient Ks, waterlog days
🌱
Crop State
GDD accumulated, growth stage, NDVI, LAI, estimated yield%, harvest window status
🦟
Pest Status
Population vs ICAR thresholds, resistance index, natural enemy population, damage%
💰
Market & Resources
Current price, MSP comparison, 15-day outlook, budget remaining, water available

⚡ Reward Structure

[−1.0, +1.0]

Dense per-step rewards provide continuous feedback. Positive for correct irrigation, timely pest intervention, optimal harvest timing. Negative for water stress, unnecessary sprays, pesticide resistance, waterlogging, and premature or late harvest.