AI in Agriculture: Where Agents and ML Actually Work
Where AI is really used on farms today: weed-targeting sprayers, crop maps, leaf-disease apps and farmer chatbots, plus a working NASA POWER weather example.
Most of the AI that is actually working on farms is narrow machine learning: a camera model that tells weeds from soil, a classifier that labels each pixel of a satellite image with a crop type, or a network that names the disease on a photographed leaf. Language-model agents are newer here, and the documented ones advise farmers rather than drive equipment. This guide covers systems with primary documentation (vendor pages, government metadata, peer-reviewed papers), then builds a small working tool on NASA’s free agroclimatology API.
At a glance
| System | Who runs it | What the model does | Source |
|---|---|---|---|
| See & Spray Select | John Deere | Cameras and machine learning find weeds in fallow fields so the sprayer targets them | Deere product page |
| PlantVillage disease model | Mohanty, Hughes and Salathé (paper, 2016) | Deep network names crop and disease from a leaf photo | Frontiers in Plant Science |
| Nuru | FAO and Penn State | Phone app that confirms Fall Armyworm damage, offline | FAO newsroom |
| Cropland Data Layer | USDA NASS | Random forest classifier maps crop types from satellite imagery each year | NASS CDL metadata |
| FarmVibes.AI | Microsoft (open source, MIT) | Fuses satellite, drone and weather data for geospatial models | GitHub |
| Farmer.Chat | Research paper, 2024 | Generative AI chatbot answering farmers’ questions | arXiv 2409.08916 |
Weed control: vision on the boom
John Deere describes See & Spray Select as using camera technology together with machine learning to find and kill weeds in fallow fields. The idea is that the sprayer treats the weed it sees rather than the whole strip of ground. That is as far as we state here: Deere’s pages load their detail with JavaScript, and we only repeat what we could cache and check. Ask Deere or a dealer about crop coverage, licensing and hardware before planning around it, and treat any herbicide savings figure as a vendor claim tied to a particular year and method.
Crop disease from a leaf photo
The best-known open dataset here is PlantVillage. In a 2016 paper in Frontiers in Plant Science, Mohanty, Hughes and Salathé trained convolutional networks (AlexNet and GoogLeNet, from scratch and with transfer learning) on 54,306 leaf images covering 14 crop species and 26 diseases, which gives 38 crop-disease classes including healthy leaves. On a held-out test split from the same dataset, the best model got the class right in 993 of every 1,000 images. Classification took under a second on a CPU, which is why the authors pointed to phones.
The limits in the same paper matter more for anyone building a product:
- The images were single leaves, facing up, on a plain background, taken under controlled conditions.
- On small sets of photos gathered from other trusted sources, accuracy fell to roughly one image in three. Still far better than chance across 38 classes, but not a diagnosis.
- The authors say the method should supplement existing diagnosis, and that laboratory tests remain more reliable than visual symptoms.
The dataset and analysis code are public, linked from the paper. A field deployment of the same line of work is Nuru, which FAO and Pennsylvania State University launched in 2018 to help African farmers recognise Fall Armyworm. FAO says a farmer holds the phone next to an infested plant and Nuru confirms whether the pest caused the damage; it runs on an ordinary Android phone and also works offline. It sits inside the free PlantVillage app. If you are building image recognition yourself, our guide to building image recognition systems covers the general workflow.
Mapping what is planted: the USDA Cropland Data Layer
The Cropland Data Layer (CDL) from USDA’s National Agricultural Statistics Service is a long-running, public example of machine learning at national scale. NASS describes it as an annual, geo-referenced raster of crop-specific land cover, built from satellite imagery plus extensive ground reference data. It began in 1997 with limited coverage and has covered the whole continental US since 2008.
How it is made, per the NASS metadata:
- Imagery: Landsat 8 and 9 and Sentinel-2A and -2B scenes collected through the growing season.
- Model: the 2025 CDL uses a random forest classifier run in Google Earth Engine. The 2008 to 2023 layers used a See5 decision tree.
- Training data: field boundaries and crops that producers report through the Farm Service Agency’s Common Land Unit program, with non-crop classes trained from the USGS National Land Cover Database.
- Resolution: 10 metres from 2024 onward, 30 metres for 2008 to 2023.
NASS notes that no farmer-reported data can be derived from the CDL, and recommends the NLCD rather than the CDL for non-agricultural land cover. For developers, the CDL is a ready-made label source: Microsoft’s FarmVibes.AI lists US Cropland Data among its built-in downloaders.
Geospatial toolkits: FarmVibes.AI
FarmVibes.AI is Microsoft’s MIT-licensed project for building models that combine several geospatial sources: satellite imagery (RGB, SAR, multispectral), drone imagery and weather data. Its downloaders include Sentinel-1 and -2, the US Cropland Data, USGS elevation, NAIP imagery and NOAA weather. The open-source release is a local cluster: workflows run as Docker images on your own machine, and you call them through a localhost REST API or a Python client. Example notebooks include estimating emergence and harvest dates from a Sentinel-2 NDVI time series for a single field, and micro-climate forecasts built from weather station data.
Where LLM agents fit
The clearest documented LLM deployment for farmers is advisory. The Farmer.Chat paper (arXiv, 2024) describes a generative AI chatbot meant to stand in where in-person extension services cannot reach. The authors report it was deployed in four countries, engaged more than 15,000 farmers and answered over 300,000 queries.
An agent becomes useful when it can call tools that return real data, such as weather, crop stage or a map layer, instead of answering from memory. The script below is the kind of tool you would hand to an agent. Our agent frameworks hub lists frameworks for wiring tools like this into an agent, and data and research tools covers the data side.
Working example: growing degree days from NASA POWER
NASA’s POWER project offers RESTful APIs that return analysis-ready solar and weather data. Its Daily API serves values from 1 January 1981 up to near real time, defaults to Local Solar Time, and accepts up to 20 parameters per single-point request. Setting community=AG selects the agroclimatology community. No key is needed.
Corn growth tracks accumulated heat rather than calendar days, so Ohio State University Extension recommends the “86/50 corn system” for growing degree days (GDD). Each day, cap the high at 86°F and raise the low to 50°F, average them, then subtract 50. The script fetches daily maximum and minimum temperature and corrected precipitation for a point in central Iowa and totals both for the season. It uses only the Python standard library.
import json
import urllib.parse
import urllib.request
API = "https://power.larc.nasa.gov/api/temporal/daily/point"
def fetch_daily(lat, lon, start, end):
params = {
"parameters": "T2M_MAX,T2M_MIN,PRECTOTCORR",
"community": "AG",
"latitude": lat,
"longitude": lon,
"start": start, # YYYYMMDD
"end": end,
"format": "JSON",
}
url = API + "?" + urllib.parse.urlencode(params)
with urllib.request.urlopen(url, timeout=60) as resp:
data = json.load(resp)
fill = data["header"]["fill_value"]
return data["properties"]["parameter"], fill
def c_to_f(c):
return c * 9 / 5 + 32
def gdd_86_50(tmax_c, tmin_c):
tmax = min(c_to_f(tmax_c), 86)
tmin = max(c_to_f(tmin_c), 50)
return max((tmax + tmin) / 2 - 50, 0)
p, fill = fetch_daily(42.0, -93.6, "20250501", "20250930")
total_gdd = total_rain = 0.0
for day in sorted(p["T2M_MAX"]):
tmax, tmin, rain = p["T2M_MAX"][day], p["T2M_MIN"][day], p["PRECTOTCORR"][day]
if fill in (tmax, tmin, rain):
continue # skip days with missing data
total_gdd += gdd_86_50(tmax, tmin)
total_rain += rain
print(f"GDD (86/50, deg F) since 1 May: {total_gdd:.0f}")
print(f"Precipitation since 1 May: {total_rain:.0f} mm")
When we ran it for 1 May to 30 September 2025 it printed about 3,063 GDD and 622 mm of rain. POWER returns temperatures in °C and precipitation in mm/day, which is why the script converts to Fahrenheit before applying the 86/50 limits.
Things to know before you rely on it:
- It is gridded data, not your field. If you bulk-download, the docs ask for one request per cell of the 0.5-degree grid and warn that hammering the same location can get you blocked. A
429status means too many requests;422lists what is wrong with your parameters. - Start the count the day after planting. Ohio State’s factsheet says to begin then, and to check that a seed company’s hybrid rating also uses the 86/50 method.
- Crop models want a different format. POWER can return ICASA files for a single point, a format built for crop simulation tools such as DSSAT.
To give this to an agent, wrap fetch_daily and the GDD sum as one tool that takes a location and a planting date, and let the model explain the result. Displaying it for a farm team is a small job in Streamlit; see our Streamlit guide.
What we could not verify
The earlier version of this page quoted yield and water-saving percentages, a market forecast and an expert quote, and linked unrelated software tools as farm systems. We could not find primary sources for any of these, so they are gone. If a vendor gives you performance numbers, ask what crop, region, season and baseline they came from.
Written by AI Agents Directory
Editorial team
Facts in this guide are checked against official documentation and repositories, which are linked in the article.