ChapFarm: AI-Powered Farming via USSD**

💡 Inspiration

The spark for ChapFarm came from my grandmother, a smallholder farmer in rural Kabale, Uganda. For decades, she relied on her intimate knowledge of the seasons — knowing when the March rains would arrive or when to plant her beans and maize. But climate change has disrupted this rhythm.

In Uganda, where 70% of the population depends on agriculture (World Bank, 2022), unpredictable weather has led to devastating crop losses. In 2023, flash floods in Katakwi destroyed 60% of sorghum crops, while late rains in Kabale delayed planting by a month (FAO Uganda, 2023). Meanwhile, pests like the fall armyworm, worsened by warmer temperatures, ravaged 40% of maize yields in northern Uganda in 2024 (MAAIF).

The pattern is heartbreaking:

  • 🌧️ Unpredictable rains flood or parch fields
  • 🐛 Pests and diseases surge without warning
  • 💔 Crops fail, wiping out livelihoods
  • 🤷🏾‍♀️ Farmers lack timely, localized advice

My grandmother had no access to real-time weather forecasts or expert guidance. With only 15% of Ugandan farmers reached by extension services (UBOS, 2023), and over 70% owning basic feature phones (UCC, 2023), I envisioned ChapFarm:

An AI-powered, USSD-based platform delivering instant, localized agricultural advice to farmers on any phone — no internet required.

🌍 What It Does

ChapFarm is a low-bandwidth, high-impact agricultural assistant that works on basic phones through a simple USSD code. It allows rural farmers to:

  • 📥 Ask farming-related questions and receive smart, AI-generated responses
  • 🌦️ Get localized weather warnings and agricultural alerts from authorities
  • 🐞 Report problems like crop diseases, flooding, and pests
  • 📡 Access the service without needing internet or a smartphone
  • 🛠️ Help government officials track field issues and respond faster

Admins and agricultural officers use a web dashboard to monitor farmer reports, send mass alerts, and manage the system.

🔧 How We Built It

Backend

  • FastAPI: Powered the API and backend logic with modular, clean code
  • SQLModel + MySQL: Managed user data, reports, alerts, and AI responses
  • Africa's Talking USSD API: Let us build seamless menu flows for feature phones
  • JWT Auth: Secured user roles for farmers, authorities, and admins
  • AWS Bedrock (Titan Model): Handled AI generation of concise agricultural advice
  • Fuzzy Matching: Reduced repeated AI calls by caching similar past queries

Frontend

  • React + TypeScript: Built a modern dashboard for authorities to track reports and alerts

😅 Challenges We Ran Into

  • USSD Limitations: Designing powerful features with a 160-character SMS mindset required lots of iteration
  • Localized AI Prompts: Tuning AI to respond in familiar phrasing for rural Ugandan farmers took creativity
  • Role-Based Access: Balancing simplicity with admin control across multiple roles (farmer, transport, authority)
  • Low Internet Regions: We had to ensure the system was usable even with minimal data access for authorities

🏆 Accomplishments That We're Proud Of

  • Deployed an AI system that rural farmers can access using feature phones
  • Successfully integrated AWS Bedrock for low-cost, contextual advice generation
  • Built a clean, effective admin dashboard
  • Created an architecture that could be replicated across other African regions
  • Made farmers feel seen and supported, even in hard-to-reach areas

📚 What We Learned

  • How to integrate AI tools like Bedrock into lean, real-world platforms
  • That user empathy — especially for low-tech users — is everything
  • How USSD can still be incredibly powerful with the right design
  • Real change doesn’t always need fancy apps — sometimes, it’s just one short code away

🌱 What's Next for ChapFarm

  • 🌍 Launch pilot programs in Kabale, Katakwi, and Gulu districts
  • 📊 Integrate real-time market price updates and location-specific content
  • 🗣️ Add multilingual support for Luganda, Runyankole, Ateso, and Acholi
  • 🤝 Partner with the Ministry of Agriculture and NGOs to scale adoption
  • 🧠 Continuously improve our AI’s local language fluency and trustworthiness
  • 📞 Introduce a voice-based IVR option for even lower literacy access

Built With

Share this project:

Updates