Skip to main content
Analyse drone or satellite imagery, detect crop stress and pests before they spread, and receive actionable treatment plans — all from a single workflow call.

Quick Start

1

Run the prebuilt workflow for multiple fields

from praisonaiagents import Agent, tool
from examples.cookbooks.Industry_Templates.agriculture_template import precision_agriculture_workflow

fields  = ["FIELD-001", "FIELD-002", "FIELD-003"]
weather = {"temperature": 25, "humidity": 60, "wind_speed": 8, "precipitation": 0}

result = precision_agriculture_workflow(fields, "wheat", weather)

print(result["alerts"])
print(result["yield_forecasts"])
print(f"Sustainability score: {result['sustainability_score']:.0f}/100")
2

Use IoT sensor network agent for real-time data

from examples.cookbooks.Industry_Templates.agriculture_template import IoTSensorPatterns

sensor_agent = IoTSensorPatterns.create_sensor_network_agent(
    sensor_types=["soil_moisture", "temperature", "humidity", "ph"]
)

status = sensor_agent.start("Collect sensor readings from all FIELD-001 nodes")
print(status)

How It Works

AgentResponsibilitySLA
MultispectralAnalyzerCalculate NDVI/NDRE/CCCI vegetation indices and identify stress zones≤ 2 min per field
DiseaseIdentifierAI-based pest and disease classification with severity level≤ 30 s
SprayRecommenderTargeted spray strategy — product, rate, GPS zones, weather window≤ 1 min
YieldPredictorHarvest yield forecast with quality grade and market value estimate≤ 45 s

Configuration Options

Pydantic I/O schemas used by this template:
SchemaKey Fields
MultispectralDatafield_id, ndvi_index, ndre_index, ccci_index, moisture_level, temperature, affected_area, gps_coordinates
PestDiseaseReportreport_id, field_id, pest_type, disease_type, severity, affected_crops, spread_rate, confidence_score
SprayRecommendationrecommendation_id, field_id, treatment_type, product_name, application_rate, target_zones, optimal_time, cost_estimate, environmental_impact
YieldForecastforecast_id, field_id, crop_type, predicted_yield, confidence_interval, harvest_window, quality_grade, market_price_estimate
Severity levels (used in PestDiseaseReport)
LevelMeaningTypical action
noneNo threat detectedRoutine fertiliser application
lowEarly blight signsOrganic treatment (e.g. Neem Oil)
moderateLocalised infestationTargeted fungicide/pesticide
highSpreading infestationSystemic treatment + monitoring
severeField-wide outbreakEmergency intervention

Common Patterns

Integrated Pest Management (IPM) strategy by severity
from examples.cookbooks.Industry_Templates.agriculture_template import SustainableFarmingPatterns

strategy = SustainableFarmingPatterns.integrated_pest_management("moderate")
print(strategy)
Precision irrigation based on soil moisture
from examples.cookbooks.Industry_Templates.agriculture_template import SustainableFarmingPatterns

irrigation = SustainableFarmingPatterns.precision_irrigation(
    moisture_level=25.0,
    crop_stage="flowering"
)
print(f"Irrigate: {irrigation['irrigation_needed']}, Amount: {irrigation['amount_mm']} mm")
Recommend next crop for rotation
from examples.cookbooks.Industry_Templates.agriculture_template import SustainableFarmingPatterns

next_crop = SustainableFarmingPatterns.crop_rotation_optimizer("wheat", soil_data={})
print(f"Next crop: {next_crop}")

Best Practices

MultispectralAnalyzer accuracy degrades significantly in overcast conditions or when shadows cover more than 20 % of a field. Schedule drone flights within 2 hours of solar noon for best NDVI readings.
DiseaseIdentifier reports spread_rate in % per day. At high severity (spread_rate > 2 %), a one-day delay can double the affected area. The workflow automatically generates a SprayRecommendation for high/severe findings.
The workflow calculates a sustainability_score (0–100) based on total chemical application. Track this per season — a declining score signals overuse of pesticides, which correlates with long-term soil health degradation.
SprayRecommendation.target_zones contains GPS polygon boundaries. Always cross-check these against your field boundary GIS layer to prevent off-target application near water bodies or buffer zones.

Industry Templates Overview

Hub page — choose the right template and understand cross-industry reuse.

Transportation Template

LiDAR structural analysis, displacement tracking, and infrastructure safety heatmaps.