Inspiration

The inspiration for Agric Advisor AI came from observing the gap between modern agronomic data and the farmers who need it most. While weather forecasts and market prices exist online, they are often inaccessible to smallholder farmers due to literacy barriers and language differences.

I wanted to build a bridge: a system that doesn't just display data, but speaks it. By combining the intelligence of Large Language Models with the accessibility of SMS and Voice, I aimed to empower every farmer—regardless of their education level—to make informed decisions about their crops.

What it does

This is a multi-agent system designed to provide personalized agronomic advice to farmers in North America, Europe and West Africa. It leverages real-time data and Large Language Models (LLMs) to generate actionable insights in local languages and delivers them via SMS and Voice Note.

How we built it

I architected the solution as a Multi-Agent System using Python and Flask, where specialized agents handle distinct responsibilities:

  1. The Data Agent: This is the "eyes" of the system. I integrated the OpenWeatherMap API for real-time climate data and wrote a custom web scraper (using BeautifulSoup) to fetch live market prices for crops like wheat from local exchanges.
  2. The Knowledge Agent (The Brain): I leveraged Google Gemini (gemini-flash-latest) to process this raw data. Instead of just translating, the AI acts as an expert agronomist, analysing the weather and prices to generate specific, actionable advice (e.g., "Don't plant today, heavy rain expected").
  3. The Report Agent (The Voice): To ensure delivery, I integrated Twilio for SMS notifications. Recognizing that text isn't enough for everyone, I added a Voice Feature using Google TTS (TEXT TO SPEECH), allowing the app to "speak" the advice in local languages like English, French, Portuguese and so on.

Challenges we ran into

  1. API Model Availability: I initially faced 404 errors with the Gemini API models. Troubleshooting this required writing standalone test scripts to query the API directly and identify the correct available model (Gemini-flash-latest).
  2. Bridging the Digital Divide: One of the biggest challenges was figuring out how to deliver complex AI insights via simple SMS. Prompt engineering played a huge role here, forcing me to refine the AI's output to be concise yet impactful.
  3. Google Text To Speech Integration Issues: Google TTS lacks Igbo and Yoruba support, I suggest Google add full support for these languages to gTTS.

Accomplishments that I am proud of

  1. Multi-Agent Architecture: Successfully designed and implemented a modular system where independent agents (Data, Knowledge, Report) collaborate to solve a problem.
  2. Real-Time Data Pipeline: Integrated OpenWeatherMap API and built a custom Web Scraper to fetch live agronomic data.
  3. Generative AI Integration: Moved beyond simple logic by integrating Google Gemini, allowing the app to generate "human-like," context-aware advice rather than just displaying numbers.
  4. Multi-Modal Delivery: Achieved three different ways to deliver information: Web UI (Visual), SMS (Text via Twilio), and Voice (Audio via google TTS).
  5. Accessibility: Built a Text-to-Speech engine to support illiterate farmers, ensuring the app is inclusive.

What I learned

  1. The Power of Localization: Integrating local languages wasn't just a feature; it was a necessity. I learned how to engineer prompts to ensure the AI understands cultural nuances.
  2. Building for Resilience: Real-world data is messy. I learned to build fallback mechanisms (like mock data for market prices) to ensure the app never crashes, even when external websites change.
  3. Accessibility First: Adding the voice feature taught me that true accessibility goes beyond screen readers; it means designing for users who might never look at a screen at all.

What's next for Multi-Lingual Agricultural Advisor Tool

  1. The "No-Smartphone" Frontier (USSD Integration) The Idea: Currently, the app requires internet/smartphone. Most rural farmers use "yam phones" (feature phones). The Tech: To Integrate Twilio to build a USSD Menu (e.g., dial *384*12#). Result: Farmers can get advice on a Nokia 3310 without data.
  2. "Snap & Diagnose" (AI Vision) The Idea: Farmers often can't describe a pest or disease but they can see it. The Tech: Need to Upgrade the Gemini integration to use Gemini Pro Vision. Result: Users take a photo of a sick leaf, and the AI identifies the disease and prescribes a cure instantly.
  3. Voice-to-Text (Two-Way Voice) The Idea: I added output voice (TTS), but farmers still have to type input. The Tech: To Use Google's Speech-to-Text to let farmers ask questions by speaking into the phone. Result: Zero-literacy interface.
  4. Community Market The Idea: To Connect the "Market Price" feature to actual buyers. The Tech: To Create a "Marketplace" tab where farmers can list their harvest and buyers can bid. Result: Moving from advisory to financial empowerment.

Built With

Share this project:

Updates

Submission history