An LLM-powered rangeland and livestock advisory agent for Namibian farmers, built for the Deep Learning IndabaX Namibia 2026 Hackathon
# SavannaCompass
An LLM-powered rangeland and livestock advisory agent for Namibian farmers, built for the
Deep Learning IndabaX Namibia 2026 Hackathon (see docs/architecture.md
for full technical documentation). A farmer describes their region, camp, or herd -- by web
chat **or by SMS text** -- and SavannaCompass reasons over rangeland/pasture site data plus
live rainfall/temperature data to answer practical grazing and herd-management questions in
plain language.
> Is my camp overgrazed? What's a safe stocking rate right now? Should I move my herd, and
> when? Is bush encroachment getting worse? Which camps should I rest this season? How long
> can my 50 cattle and 20 sheep safely stay on this pasture?
## How it works
SavannaCompass is an **agentic tool-caller**, not a fixed script: an LLM (OpenAI, or Google
Gemini via its OpenAI-compatible endpoint) decides, per question, which of three tool families
to call -- the rangeland dataset, live weather data, herd-sizing math, all three, or none --
then explains its reasoning in the final answer rather than giving a bare verdict. The exact
same agent and tools power every interface below; only the delivery channel changes.
```
farmer (web chat, or SMS text) --> FastAPI --> LLM tool-calling loop
| | |
rangeland dataset NASA POWER herd/LSU
tools (pandas) weather calculator
| | |
plain-language recommendation
with cited reasoning + data trace
```
## Interfaces
- **Web chat** (`frontend/index.html`) -- the primary interface. Shows a "Data sources used"
panel on each answer with exactly which tools/arguments the agent used, for transparency
rather than a black-box verdict. Supports English, Afrikaans, and Oshiwambo (Oshiwambo is
machine-translated and flagged as such in the UI -- not presented as verified), plus optional
voice input/output (browser Web Speech API, English and Afrikaans).
- **SMS gateway** (`backend/app/main.py`'s `/api/sms/webhook`, via Twilio) -- lets a farmer wi …