Inspiration

Smallholder farmers across Kenya often make farming decisions without access to reliable market data, weather insights, or logistics guidance. This leads to low profits, oversupply in markets, and significant post-harvest losses.

We were inspired to build SokoLeo to bridge this gap by giving farmers access to real-time, data-driven insights through a simple conversational interface. Instead of guessing, farmers can now make informed decisions on what to plant, when to harvest, and where to sell.


What it does

SokoLeo is an AI-powered agricultural assistant that helps farmers:

  • Identify the most profitable crops to plant
  • Access real-time market prices and demand
  • Get recommendations on where to sell produce
  • Optimize transport routes and logistics
  • Plan based on weather patterns
  • Reduce losses through better storage practices

It acts like a smart farming advisor, combining multiple sources of intelligence into one simple system.


How we built it

We built SokoLeo using a multi-agent AI architecture, where each agent handles a specific task:

  • Market Agent → Fetches real-time prices and demand
  • Weather Agent → Provides planting and harvesting guidance
  • Logistics Agent → Suggests transport and storage strategies
  • Profit Agent → Evaluates profitability of crops
  • Recommendation Agent → Combines all insights into one answer

These agents are orchestrated using LangGraph, allowing dynamic routing of farmer queries.

Tech Stack

  • Python
  • LangGraph (multi-agent orchestration)
  • Tavily API (real-time search)
  • Persistent memory (JSON-based storage)
  • Environment variables for secure API handling

Challenges we ran into

  • Coordinating multiple agents to produce one clear, unified response
  • Integrating real-time market data without slowing down the system
  • Designing context-aware memory so the system remembers previous farmer queries
  • Keeping the interface simple and usable despite complex backend logic

Accomplishments that we're proud of

  • Successfully built a fully functional multi-agent AI system
  • Implemented dynamic routing based on farmer questions
  • Created a system that provides context-aware recommendations using memory
  • Delivered a solution that directly addresses a real-world problem affecting farmers

What we learned

  • Multi-agent systems are powerful for solving complex, real-world problems
  • Combining different data sources (market, weather, logistics) leads to better decisions
  • Simplicity in user experience is critical, especially for non-technical users
  • Building AI for impact requires balancing accuracy, usability, and speed

What's next for SokoLeo

  • Integrate live market APIs and satellite weather data for higher accuracy
  • Add SMS/USSD support so farmers without smartphones can access the system
  • Support local languages to improve accessibility
  • Build a mobile and web app interface for wider adoption
  • Partner with markets and buyers to enable direct farmer-to-buyer connections

Our goal is to make SokoLeo a trusted AI companion for every farmer, helping them grow smarter, sell better, and earn more.

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for SokoLeo

Built With

Share this project:

Updates