An agentic workflow that helps Ethiopian teff farmers identify crop pests and receive weather-aware, localized treatment advice using LangGraph, RAG, and Vision AI.
# AgriTeff Agent — Localized Pest Identification & Advisory
> A multi-agent system that gives smallholder Ethiopian teff farmers safe,
> weather-aware, locally-grounded pest & disease advice from a single photo.
**Hackathon:** micro1 Agentic Workflows
---
## Problem
Smallholder teff farmers in Ethiopia and local extension workers lose yields
to localized pests (Welo bush-cricket, armyworm) and diseases (rust, blight).
A raw LLM asked "treat my teff" will (a) hallucinate, (b) suggest chemicals
that are banned or unavailable in Ethiopia, and (c) ignore imminent rain that
would wash a spray away. The bottleneck is the gap between **seeing** the
problem and getting a **safe, localized, weather-aware** intervention plan.
## Architecture
```
┌───────────────────────────┐
photo ─────► │ Vision Tool (Gemini 1.5) │ ── visual symptoms
└───────────────────────────┘
│
▼
┌───────────────────────────┐
│ Diagnostic Agent (RAG) │ ── pest/disease id
│ queries data/teff_pests │
└───────────────────────────┘
│
growth stage ──┐ │
▼ ▼
┌───────────────────────────┐
│ Weather Tool (Open-Meteo) │ ── live rain forecast
└───────────────────────────┘
│
▼
┌───────────────────────────┐
│ Advisory Agent (draft) │ ── treatment plan
└───────────────────────────┘
│
▼
┌───────────────────────────┐
│ Verification Agent │ ── REJECT if unsafe
│ (weather / legality gate) │ (spray before rain)
└───────────────────────────┘
│
▼
safe final advisory
```
## Quick Start
```bash
# 1. Clone (or use this folder directly)
git clone
github.com
cd agriteff-agent
# 2. Create a clean environment
python -m venv .venv && source .venv/bin/activate
# 3. Install deps
pip install -r requirements.txt
# 4. Add your key (optional for testing — agent falls back to deterministic mode)
cp .env.example .env
# edit .env -> GOOGLE_API_KEY=your_key_here
# edit .env -> MAX_ITERATIONS=2 (optional: configure the verification reject-loop safety cap) …