Climate-Aware Crop Risk & Protection Assistant
AgriShield AI is an AI-powered agricultural decision-support system that analyzes crop vulnerability under changing climate and rainfall conditions. It combines Retrieval-Augmented Generation (RAG) with a locally running LLM (Ollama) and a FastAPI backend to provide explainable, region-aware crop protection recommendations.
Built as part of the 1M1B AI for Sustainability Internship Project.
- 🌾 Crop risk assessment based on rainfall & region
- 🧠 RAG-based grounded agricultural responses
- 🔒 Fully offline AI inference using Ollama
- 📍 Region-aware recommendations
- 📑 Structured action plans (Immediate / Short / Long Term)
- 💰 Cost & resource insights
- 🕘 Analysis history tracking
- 🖥️ Clean React + Tailwind UI
- React + Vite
- Tailwind CSS
- React Icons
- FastAPI
- LangChain
- Ollama (Local LLM)
- ChromaDB (Vector Store)
- Local LLM via Ollama
- Retrieval-Augmented Generation (RAG)
- Domain agricultural knowledge embeddings
User → React Frontend → FastAPI API → LangChain RAG → Chroma Vector DB → Ollama LLM → Structured Response → UI
git clone https://github.com/Arni005/Agrishield_AI.git
cd Agrishield_AIcd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtRun backend:
uvicorn api:app --reloadBackend runs at:
http://127.0.0.1:8000
cd frontend
npm install
npm run devFrontend runs at:
http://localhost:5173
Make sure Ollama is installed and running:
ollama run llama(Use whichever model you configured.)
Agrishield_AI/
│
├── backend/
│ ├── api.py
│ ├── rag_engine/
│ ├── db/ (Chroma Vector DB)
│ └── requirements.txt
│
├── frontend/
│ ├── src/components
│ ├── pages
│ ├── public
│ ├── App.jsx
│ └── package.json
└── README.md
Helps farmers:
- Predict crop risks under rainfall variability
- Understand threats (drought, flooding, disease risk)
- Get prioritized protection strategies
- Plan resource allocation efficiently
Arni Johry 1M1B AI for Sustainability Virtual Intern


