Case study

Cropilot

A bridge between NASA and farmers

  • TypeScript
  • Node.js
  • LangChain
  • OpenAI
  • RAG
  • NASA POWER API
  • Telegram Bot API
  • PostgreSQL
  • Drizzle
Ask my AI agent about this project
From idea to working bot
2 days
NASA climate variables
8
Open source
100%

The challenge

NASA publishes decades of open Earth observation data that could guide what and when to plant, but it is locked behind APIs and scientific units. The farmers who would benefit most are rarely tech-savvy and will not open a dashboard.

The solution

Cropilot is a RAG agent that lives in Telegram. A farmer shares their location, crop and time of year; Cropilot pulls the matching climate history from NASA's POWER API, compares it with the optimal conditions for each growth stage of the crop, and replies in plain language with whether to plant and what to adjust.

Key features

  • Chat-first: works inside Telegram, no new app to learn

  • Localized NASA climate data since 2000: temperature, precipitation, humidity, wind and soil moisture

  • Stage-by-stage analysis (sowing, tuber initiation, bulking, maturation) against optimal ranges

  • Plain-language recommendations generated with LangChain LLM chains

  • Multi-language replies with i18next

  • Use-case architecture that can extend to WhatsApp or Messenger

Technical challenges

  • Shipping a working product in a 2-day hackathon, our first one

  • Turning raw climate series into a context an LLM can reason over reliably

  • Defining optimal conditions per crop and growth stage

  • Making AI output understandable for non-technical users on a phone

Development process

I built Cropilot with Diego Sánchez and Luis Alejandro Martínez Maldonado for the 2024 NASA International Space Apps Challenge in Buenos Aires, under the challenge "Leveraging Earth Observation Data for Informed Agricultural Decision-Making". It was our first hackathon: in two days we went from idea to a working Telegram bot, with a TypeScript backend split into LLM, messaging and NASA modules.

Impact and results

Cropilot showed that open satellite data can reach farmers through the apps they already use. The project is open source, so anyone can adapt it to new crops, regions or messaging platforms.

“We want to make the vast amounts of data from our planet reachable by anyone and help them consume it in an easy-to-understand fashion, while allowing them to make informed decisions.”

Gallery

Hackathon pitch: from NASA climate data to advice in a Telegram chat
Cropilot architecture
NASA climate variables plus user data, evaluated with AI and delivered through Telegram
Cropilot answering in Telegram
Cropilot in action: a farmer asks whether to plant avocados next month and shares their location

Next project

OPear