AgroAI 🌾

Inspiration

Agriculture is the backbone of our economy, but farmers often lack real-time, intelligent guidance about how crop choice, chemicals, and health risks intersect. We wanted to build a smart CLI-style assistant that simulates multiple agricultural agents β€” without overwhelming users with technical jargon.

What inspired us most was imagining a tool a rural farmer could interact with easily, getting instant insights like:

  • Is this pesticide safe?
  • Will this crop yield well in my location?
  • Are there health risks to worry about?

What it does

AgroAI is a smart, conversational CLI assistant that:

  • Simulates crop yield and risk based on inputs
  • Analyzes chemical toxicity, soil impact, and leaching
  • Warns about human health risks like neurotoxins
  • Offers recommendations or safer alternatives

It uses LLMs (like Gemini) to parse natural language queries and returns structured, multi-agent reports in real-time.

How we built it

  • βš›οΈ Frontend: React (Vite) with Tailwind CSS for a clean, mobile-responsive CLI UI
  • πŸ€– LLM Backend: Gemini 1.5-pro (fallback to Flash), hosted on Cloudflare Workers to keep latency low and cost zero
  • 🌐 API: Simple REST /query endpoint that takes a query and returns a structured response
  • πŸ“¦ Deployment: Frontend hosted on GitHub Pages (or Netlify), backend on Cloudflare Workers

Challenges we ran into

  • 🧱 Gemini's quota limits (429s) at the worst possible time
  • 🧠 Model names constantly changing (e.g., gemini-pro to gemini-1.5-pro)
  • ⚠️ Parsing LLM output in a user-friendly and consistent way
  • πŸ•’ Time pressure with only a few hours left to debug backend + polish UI

Accomplishments that we're proud of

  • πŸ§ͺ Designed a full CLI-inspired multi-agent UX in React
  • πŸš€ Built a fallback-safe Gemini integration that switches models automatically
  • 🌎 Deployed full-stack using only free-tier tools (Cloudflare Workers + GitHub Pages)
  • ⚑ Delivered near-instant AI replies with detailed, clean formatting

What we learned

  • How to work around Gemini’s rate limits and deploy globally using Workers
  • Prompt engineering to coerce structured outputs from LLMs
  • Building reliable fallbacks between Gemini Pro and Flash
  • React UI tricks to render markdown-style outputs cleanly and responsively

What's next for AgroAI

  • πŸ” Add memory/context (using startChat or session IDs)
  • πŸ›°οΈ Integrate with Google Earth Engine or weather APIs for real crop predictions
  • 🧬 Build fine-tuned agents (via LangChain or Gemini functions) for pesticides, diseases, yield
  • πŸ“² Launch as a WhatsApp bot for easy access in rural areas
  • 🌍 Localize in Hindi and regional languages for accessibility

Built with πŸ’š by codxvoid
GitHub: https://github.com/codxvoid/AgroAi

Built With

Share this project:

Updates

Submission history