Inspiration
Sub-Saharan African agriculture faces a double-edged sword: increasing climate unpredictability and a massive gap in accessible expert knowledge. While modern AI offers solutions, existing platforms rely heavily on expensive cloud APIs, high-speed internet, and stable power grids—luxuries that smallholder farmers in remote deep-tech zones cannot afford. Inspired by the Africa Deep Tech Challenge 2026, we wanted to bridge this digital divide by building an engineering-first, zero-cloud AI system that brings enterprise-grade agricultural intelligence straight to low-cost commodity hardware.
What it does
AgriDoc-OfflineAI is a 100% offline, on-device AI ecosystem designed to run on a standard $400–$500 laptop with 8 GB RAM and integrated graphics. It serves as a comprehensive agricultural suite across four core interfaces:
- 🌱 Cultivation Guide: Step-by-step methodologies for the top 10 African staple crops.
- ⚠️ Disease Diagnosis: A detailed offline structural matrix charting symptoms and underlying vectors.
- 🛡️ Remedy & Prevention: Immediate, budget-friendly, and organic control protocols.
- 🤖 AgriDoc AI Assistant: A localized, quantized Small Language Model (SLM) that answers complex farmer queries locally via an internal database, backed by strict professional safety disclaimers.
How we built it
The application's backbone is Microsoft's Phi-3-mini-4k-instruct (3.8B parameters), highly optimized into a 4-bit GGUF format (Q4_K_M). We coupled this with llama-cpp-python for direct hardware-level inference on low-power CPUs without needing discrete GPUs. The entire UI and multi-page workflow architecture were engineered using Streamlit, ensuring a clean, lightweight, and responsive frontend-backend synergy within a single operational environment.
Challenges we ran into
Operating within a strict 7 GB RAM budget and avoiding thermal throttling on low-end CPUs was incredibly difficult. Initially, unconstrained text generation pushed CPU package temperatures past critical thresholds, risking major thermal penalties. We overcame this by capping sequence context windows at 2048, tuning runtime threads (n_threads=4) dynamically to prevent core saturation, and forcing aggressive memory recycling through Streamlit’s resource caching.
Accomplishments that we're proud of
We successfully achieved an optimized memory footprint of just 3.2 GB Peak RAM, maximizing our ADTC efficiency score while leaving plenty of room for system OS stability. Furthermore, we managed to unlock a highly responsive throughput performance of ~16.5 Tokens Per Second (TPS) on a standard laptop CPU, keeping the package temperature safely under 72°C with zero reliance on the internet.
What we learned
We learned that massive cloud infrastructure isn't always the answer for real-world impact. Optimizing local parameters, careful thread allocation, and relying on quantized Small Language Models (SLMs) can democratize access to AI in remote areas. We gained deep insights into engineering for absolute edge-computing constraints and understanding the specific, organic agricultural realities of African farming structures.
What's next for AgriDoc-OfflineAI
Our next phase focuses on integrating ultra-lightweight, offline text-to-speech capabilities to support low-literacy communities through spoken dialects. We also plan to implement local vector-based RAG (Retrieval-Augmented Generation) using a localized SQLite/Chroma vector DB to allow local extension officers to dynamically update crop guidelines simply by dropping regional PDF files into the system offline.
Built With
- ai
- edge
- llama.cpp
- local
- offline
- phi-3
- phython
- streamlit


Log in or sign up for Devpost to join the conversation.