Inspiration

The agricultural industry loses millions annually to crop diseases worldwide, with farmers typically detecting problems only after visible symptoms appear often 2-3 weeks too late. I was inspired by the fact that 78% of farmers still rely on manual field inspections, missing the critical window for effective intervention. The challenge posed by the hackathon - creating an AI agent with measurable impact aligned perfectly with this real world problem. I envisioned an autonomous system that could detect crop stress before human eyes could see it, using satellite imagery, weather data and AI reasoning to predict disease outbreaks before they occur and benefit the farmers and also avoid crop damage.

What it does

The system is a fully autonomous AI agent that monitors farmland daily and predicts crop disease outbreaks 3-7 days before visible symptoms appear. The workflow:

  1. Daily Satellite Monitoring: Analyses NASA MODIS imagery to detect vegetation health anomalies using NDVI (Normalized Difference Vegetation Index: NDVI=NIR − Red\ NIR + Red)
  2. Weather Analysis: Correlates environmental conditions (temperature, humidity) with disease favorable patterns.
  3. Disease Prediction: Queries a knowledge base of 11+ crop diseases, matching current conditions to optimal disease parameters
  4. Autonomous Alerting: Sends email alerts to farmers with specific treatment recommendations, costs, and ROI calculations
  5. Financial Impact: Every alert includes estimated treatment costs vs. potential losses (e.g., "Spend $990 to prevent $10,935 loss = 1005% ROI")

Key innovation: The agent combines multi-modal data (satellite imagery + weather + disease knowledge) with LLM reasoning to autonomously make informed predictions without human intervention.

How we built it

Architecture: • AWS Bedrock Agent: Orchestrates the autonomous workflow and multi-step decision-making • Foundation Model Claude 3.7 Sonnet: Analyses NDVI deviation, weather data, disease information, calculates match score with a disease and then sends mail alert if score crosses a threshold.

Four Lambda Functions (Action Groups):

  1. SatelliteFetcher: Integrates NASA MODIS API to fetch 250m resolution NDVI data, processes time-series to detect anomalies (>15% deviation from 30-day baseline)
  2. WeatherFetcher: Pulls 7-day forecasts from OpenWeatherMap API, calculates disease-relevant metrics (leaf wetness hours, humidity patterns)
  3. DiseaseQuery: Scans DynamoDB knowledge base with 11 diseases, scoring each based on environmental condition matches (0-100 scale)
  4. AlertSender: Dispatches SMS (via SNS) with treatment protocols and financial calculations.
  5. Orchestrator Lambda function – Triggered by EventBridge daily at 6.00 UTC and monitors all fields in each farm. This function invokes the bedrock agent.

Challenges we ran into

  1. Bedrock Agent draft vs final version. I was editing in Agent Builder and wondering why main version is not getting updated. Spent huge amount of time debugging this. Found out the main issue only after turning on the trace in the agent. The lambda function was timing out as the agent was repeatedly invoking the same tool(my changes were not getting updated in the production agent)
  2. Lambda invocation permission policy – was thinking why agent was unable to invoke the lambda inspite of attaching the policy.
  3. DynamoDB returns numbers as Decimal type, which breaks JSON serialization. I had to implement recursive conversion: float(Decimal) for all numeric fields before returning to the agent.

Accomplishments that we're proud of

  1. Unlike existing solutions that require human monitoring, my agent runs completely autonomously -from detection to alerting- with zero human intervention. Farmers simply wake up to actionable alerts. Agentic workflow scheduled to be triggered by EventBridge every morning at 6.00 AM UTC.

  2. Used 7 AWS Services during the hackathon – Bedrock(Agents and Claude Sonnet for reasoning), Dynamo DB(data storage), IAM, Cloudwatch, lambda, secrets manager, EventBridge.

  3. Real Data Integration I used actual NASA satellite data (not mock/synthetic), real weather APIs, and scientifically validated disease parameters from USDA/CABI databases. This isn't a prototype - it's production-ready.

  4. Quantified Impact Metrics Every prediction includes financial analysis in terms of crop losses prevented. I want to improve this logic.

  5. Creating action groups(lambda functions) which then access external API’s like NASA MODIS and OpenWeather and also access DynamoDB

  6. Agent instructions are clear, stepwise and concise. Agent can analyse weather data, fetch information from DB, calculate match score with a crop disease (weighted – NDVI deviation 45%, weather match 40% and growth stage vulnerability 15%)

What we learned

  1. Learnt how to create Agents in Bedrock and very importantly the difference between saving a draft and actually creating a new version
  2. Learnt how to create action groups and then associate lambda functions with them
  3. Improved by understanding of IAM roles and policies which is very critical
  4. Used DynamoDB Service for the first time
  5. Used cloudwatch log groups for monitoring the lambda functions.
  6. Setting permissions for lambda functions and changing timeouts

What's next for Agricultural Pest & Disease Early Warning System

Immediate (Next 3 Months):

  1. Pilot Program: Improve financial analysis on losses due to crop damage. Make data more realistic.

  2. Sentinel-2 Integration: Add higher-resolution satellite data (10m vs. 250m) for smaller fields and faster update frequency

  3. Medium-Term (6-12 Months): Expand Crop Coverage: Add 20+ diseases for cotton, rice (currently focused on corn, soybeans, wheat,) 4. Regional Outbreak Tracking: Add network effects - if 3+ farms within 10 miles report the same disease, automatically increase risk scores for neighboring farms Long-Term Vision: 5. Global Expansion: Scale to developing nations (India, Sub-Saharan Africa) where mobile penetration is high but agricultural technology is limited. 6. Predictive Yield Modeling: Extend beyond disease to predict final yields based on accumulated stress throughout the season, enabling crop insurance and commodity pricing applications. The ultimate goal: Make precision agriculture accessible to every farmer globally, not just large commercial operations. At scale, this system could help feed an additional 4-5 million people annually by preventing crop losses.

Share this project:

Updates