How momoinuddin-ali/kisanmitra-ai-smart-farming-project works
KisanMitra AI is a farming-advice application. A farmer submits location, crop, growth stage and optionally symptoms or a leaf photo through the dashboard or CLI. The core orchestrator gathers a live farm snapshot, builds shared context, dispatches four advisory agents and returns a combined report. The README also describes crop-knowledge retrieval, market-trend analysis and Grok-backed reasoning; sampled agent excerpts show simplified fallback implementations, so those richer behaviors are documented capabilities rather than verified runtime links here. The plural market module is separate from the singular module registered in the sampled runtime.
Main entry points: main_core.py Agent pipeline · base_agent.py Agent base · app.py Flask API · crop_advisory_agent.py Crop advice
Components 19
Farmer access
- Web dashboard
index.html - Flask API
app.py - CLI entry
main_core.py
Context and orchestration
- Farm context
main_core.py - Agent pipeline
main_core.py - Advisory report
main_core.py
Farm advisory
- Weather advice
agents/weather_irrigation_agent.py - Crop advice
agents/crop_advisory_agent.py - Pest detection
agents/pest_detection_agent.py - Market advice
agents/market_insights_agent.py - Market analysis logic
agents/market_insights_agents.py - Agent base
agents/base_agent.py
Data and services
- Weather client
utils/weather_client.py - Crop knowledge
data/crop_knowledge.json - Market prices
data/market_prices.json - Settings
config.py
Other components
- Farmer
- Open-Meteo
- Grok API
Connections 24
- Farmer → Web dashboard: uses
README.md - Web dashboard → Flask API: submits query
app.py - Farmer → CLI entry: provides input
README.md - Flask API → Farm context: builds context
app.py - CLI entry → Farm context: builds context
main_core.py - Farm context → Weather client: fetches snapshot
main_core.py - Weather client → Open-Meteo: requests weather
utils/weather_client.py - Weather client → Settings: reads settings
utils/weather_client.py - Farm context → Agent pipeline: supplies context
main_core.py - Agent pipeline → Weather advice: dispatches
- Agent pipeline → Crop advice: dispatches
- Agent pipeline → Pest detection: dispatches
- Agent pipeline → Market advice: dispatches
- Weather advice → Agent base: inherits
agents/weather_irrigation_agent.py - Crop advice → Agent base: inherits
agents/crop_advisory_agent.py - Pest detection → Agent base: inherits
agents/pest_detection_agent.py - Market advice → Agent base: inherits
agents/market_insights_agent.py - Agent pipeline → Advisory report: assembles results
main_core.py - Flask API → Advisory report: returns JSON
app.py - Market analysis logic → Market prices: reads prices
agents/market_insights_agents.py - Market analysis logic → Grok API: requests analysis
- Crop advice → Crop knowledge: uses knowledge
README.md - Agent base → Grok API: uses model
README.md - Flask API → Web dashboard: serves UI
app.py