Inspiration

Agriculture is the backbone of the African economy, yet smallholder farmers lose billions annually to pests and crop diseases. While building AfyaPulse, we realized that the same "Last Mile" connectivity gap exists in farming. Farmers in rural areas often spot the first signs of a Fall Armyworm invasion or Maize Lethal Necrosis, but by the time an extension officer visits, the entire harvest is lost. We wanted to give every farmer a digital agronomist in their pocket.

What it does

KilimoPulse uses the same lightweight USSD infrastructure to create a real-time agricultural early-warning system:

  • Pest Tracking: Farmers report crop symptoms via USSD without needing a smartphone.
  • Outbreak Visualization: Elastic Maps visualizes "Pest Waves" as they move across sub-counties.
  • AI Agronomist: An Elastic AI Agent analyzes the data and provides immediate localized advice on organic pesticides and mitigation strategies.

How we built it

We reused the AfyaPulse Stack to demonstrate the versatility of the Elastic RAG (Retrieval-Augmented Generation) architecture:

  • USSD Interface: Built on Africa's Talking, optimized for quick symptom reporting (e.g., 1. Maize -> 2. Leaf Holes).
  • Data Ingestion: A Python Flask backend structures the data and calculates an "Infestation Index" (I) using:

where \Delta t is the observation window in days.

  • The Brain: We created a separate crop-reports index in Elasticsearch and used the Agent Builder to ground an LLM in regional agricultural best practices.

Challenges we ran into

The primary challenge was Taxonomy. A farmer might call a pest "Leaf Eater" while an agronomist calls it "Spodoptera frugiperda." We had to design the USSD menu to focus on symptoms (visible damage) rather than names, allowing the Elastic AI Agent to handle the translation and diagnosis based on the reported visual cues. Accomplishments that we're proud of

  • Architectural Versatility: We successfully "pivoted" our entire codebase from Human Health to Agriculture in under 30 minutes, proving the robustness of our Flask-Elastic design.
  • Predictive Potential: The system doesn't just record data; it predicts where a pest invasion will head next based on the geographic density of reports.

What we learned

We learned that Data is Geography. In agriculture, a report is useless without a location. By mastering geo_point mapping in Elasticsearch, we moved from simple list-making to "Spatial Intelligence." We also learned that AI is most effective when it is Inclusive—serving those with the least technology but the most at stake.

What's next for KilimoPulse

  • Soil Health Integration: Connecting IoT soil sensors to the same Elastic index to provide "Precision Agriculture" advice via SMS.
  • Market Pulse: Integrating real-time crop price data so farmers can decide not just when to harvest, but where to sell to avoid exploitation.
  • Satellite Overlay: Using Elastic Maps to overlay our USSD reports with satellite vegetation indices (NDVI) for 100% accuracy in outbreak detection.

Built With

Share this project:

Updates