Multi-agent AI system for crop disease diagnosis and farming guidance, built with CrewAI.
4 specialized agents collaborate to provide comprehensive farming solutions:
Expert plant pathologist that analyzes symptoms and environmental conditions to identify diseases with high accuracy using the Crop Disease Knowledge Database.
Creates immediate action plans with organic and chemical treatment options, considers budget constraints, and provides step-by-step implementation guidance.
Develops long-term prevention strategies including crop rotation, soil management, resistant varieties, and seasonal farming calendars tailored to your region.
Provides complete cultivation guides covering optimal growing conditions, soil prep, irrigation, fertilization schedules, harvest timing, and market strategies.
- Crop Disease Knowledge Database - Disease info, symptoms, treatments
- Soil Analysis - Soil type recommendations and amendments
- Weather & Climate - Regional climate data for risk assessment
- ✅ Multi-agent collaboration for comprehensive analysis
- ✅ Context-aware recommendations based on location and climate
- ✅ Both organic and chemical treatment options
- ✅ Preventive measures and long-term strategies
- ✅ Interactive and batch processing modes
- ✅ Detailed reports saved as markdown files
- Install dependencies:
pip install -e .- Set up environment variables:
Create a
.envfile in the root directory:
GEMINI_API_KEY=your_key_here
# Or use other LLM providers supported by CrewAIRun with user prompts to input crop information:
python -m agentic_ai.mainOr use the script command:
run_crewYou'll be prompted to enter:
- Crop type (e.g., Tomato, Rice, Wheat)
- Symptoms observed
- Environmental conditions
- Growth stage
- Location/region
Use the default run() function with example data:
agentic_aiCreate your own Python script:
from agentic_ai.crew import AgenticAi
inputs = {
'crop_type': 'Tomato',
'symptoms': 'Yellow leaves with brown spots, wilting',
'environment': 'High humidity, warm temperature',
'growth_stage': 'Flowering stage',
'location': 'Maharashtra, India'
}
result = AgenticAi().crew().kickoff(inputs=inputs)inputs = {
'crop_type': 'Tomato',
'symptoms': 'Water-soaked spots on leaves, white fungal growth on undersides, rapid browning',
'environment': 'High humidity (80%), temperature 18-22°C, recent heavy rains',
'growth_stage': 'Flowering stage, 60 days old',
'location': 'Maharashtra, India'
}The system generates a comprehensive report (plantix_farming_report.md) containing:
-
Disease Diagnosis
- Disease identification (common and scientific names)
- Confidence level
- Symptom analysis
- Severity assessment
- Yield impact prediction
-
Treatment Recommendations
- Immediate action plan
- Organic treatment options
- Chemical treatment options (if necessary)
- Application methods and dosages
- Safety precautions
- Cost estimates
-
Prevention Strategies
- Long-term preventive measures
- Crop rotation recommendations
- Soil management tips
- Disease-resistant varieties
- Monitoring guidelines
-
General Farming Advice
- Optimal growing conditions
- Seasonal calendar
- Soil and nutrient management
- Irrigation schedule
- Harvest and post-harvest handling
train <n_iterations> <filename>test <n_iterations> <eval_llm>replay <task_id>run_with_trigger '{"crop_type": "Rice", "symptoms": "Brown spots", ...}'agentic_ai/
├── src/agentic_ai/
│ ├── config/
│ │ ├── agents.yaml # Agent configurations
│ │ └── tasks.yaml # Task definitions
│ ├── tools/
│ │ ├── custom_tool.py # Custom tools implementation
│ │ └── __init__.py
│ ├── crew.py # Crew orchestration
│ ├── main.py # Entry points
│ └── __init__.py
├── knowledge/
│ └── user_preference.txt # User preferences
├── tests/
├── pyproject.toml
└── README.md
The system has knowledge of major crops including:
- Vegetables: Tomato, Potato, Cucumber, Pepper, Eggplant
- Grains: Rice, Wheat, Corn
- Commercial crops: Cotton, Sugarcane
- And many more...
- Late Blight
- Powdery Mildew
- Bacterial Wilt
- Leaf Spots
- Root Rot
- Mosaic Viruses
- And various pest infestations
This is a CrewAI-based project. To contribute:
- Add new tools in
tools/custom_tool.py - Extend agent capabilities in
config/agents.yaml - Add new tasks in
config/tasks.yaml - Update crew orchestration in
crew.py
This project is built using CrewAI framework.
Created by TejasS1233
- Built with CrewAI
- Powered by Large Language Models
- Designed to help farmers worldwide