-
-
Native Google Cloud Architecture: Google Earth Engine, Vertex AI Search RAG, Cloud Run, Firestore, and Firebase Edge CDN.
-
Live B2B Web Console at terralegacy.web.app: Interactive map telemetry, Sentinel-2 NDVI, NASA SMAP soil moisture & ICAR advisory.
-
WhatsApp Copilot: Drop a live GPS location pin to receive instant multi-spectral satellite telemetry and grounded vernacular advisories.
💡 Inspiration
Over 80% of smallholder farmers and agricultural micro-lenders in India lack access to real-time, objective field telemetry. Traditional farm advisory services rely on delayed manual surveys, while bank loan officers struggle with high default risks due to unmonitored crop failure and soil nutrient exhaustion.
We set out to build TerraLegacy: an autonomous, multi-modal Agri-Intelligence Agent that bridges the gap between petabyte-scale satellite constellations, grounded agronomic science, and everyday communication tools (WhatsApp and executive web dashboards).
⚙️ What it Does
TerraLegacy acts as an autonomous agricultural copilot that monitors farm health, scores loan risk, and delivers grounded ICAR (Indian Council of Agricultural Research) advisories.
- Autonomous Telemetry Perception: Ingests live Sentinel-2 10m multi-spectral composites, NASA SMAP root-zone soil moisture (
0-5cmand root-zone depth), and CHIRPS daily cumulative precipitation over any geographic coordinate in India. - Grounded Agronomic Reasoning: Uses Gemini 3.5 Flash grounded with Vertex AI Search (Discovery Engine) datastores containing regional crop management and soil rejuvenation protocols.
- Multi-Channel Dispatch:
- WhatsApp Bot: Farmers or field officers simply drop a WhatsApp location pin or query
!crop <Taluk>to receive real-time NDVI vegetation health, YoY trend analysis, and vernacular crop rotation advice. - B2B Web Portal (terralegacy.web.app): An interactive glassmorphic dashboard for bank loan officers and crop insurers featuring interactive dark map telemetry, parcel risk scoring, and enterprise system specs.
- WhatsApp Bot: Farmers or field officers simply drop a WhatsApp location pin or query
🤖 How We Built It (Agentic Architecture)
TerraLegacy is built natively on Google Cloud using an event-driven, tool-calling agent pipeline:
- Autonomous Agent Core (Gemini 3.5 Flash): Acts as the central reasoning engine that evaluates multi-modal environmental variables and determines risk posture.
- Perception Tool (Google Earth Engine API): Programmatically computes rolling 2026 Sentinel-2 NDVI composites, compares baseline 2025 YoY metrics, and evaluates ESA WorldCover 10m land classifications.
- Knowledge Retrieval Tool (Vertex AI Search RAG): Grounded against verified ICAR agronomic datastores in Cloud Storage (
gs://terralegacy-crop-advisories) to eliminate hallucinations and enforce scientific fertilizer/rotation recommendations. - Compute & Persistence: Serverless containerized FastAPI backend hosted on Google Cloud Run (
asia-south1) with Google Cloud Firestore for session state management. - Edge Delivery: Firebase Hosting CDN providing instant (<100ms) global dashboard delivery.
🚧 Challenges We Ran Into
- Satellite Latency vs. Real-Time Chat: Computing 10m Sentinel-2 multi-spectral buffers across dynamic regional boundaries in real time can take several seconds. We optimized spatial reducer geometry in Earth Engine and cached frequent telemetry points in Firestore.
- Grounding Accuracy: Ensuring Gemini provides hyper-localized recommendations rather than generic advice. We solved this by pairing Gemini 3.5 Flash with Vertex AI Search datastores indexed with regional soil and crop rotation research papers.
- Serverless Cold-Starts: We decoupled static web delivery onto Firebase Global Edge CDN, reducing first-click load times from 4s down to 50ms.
🏆 Accomplishments That We're Proud Of
- Fully functional, 100% production-deployed platform live on https://terralegacy.web.app.
- Seamless integration between Google Earth Engine satellite pipelines and Meta WhatsApp Cloud API webhooks.
- Sub-5 second end-to-end response time from dropping a WhatsApp GPS pin to receiving a complete multi-spectral crop risk audit.
📖 What We Learned
- How to leverage Gemini 3.5 Flash's speed and reasoning capabilities for structured environmental telemetry synthesis.
- The power of combining Google Earth Engine's geospatial computation with Vertex AI Search grounding for verifiable, mission-critical B2B applications.
🚀 What's Next for TerraLegacy
- Automated 1-Page PDF Crop Risk Reports: Exportable credit assessment certificates for bank loan files.
- GeoJSON/KML Multi-Parcel Polygon Boundaries: Enabling cooperative farms and industrial plantations to analyze irregular multi-acre field boundaries.
- Scale-up Deployments: Partnering with regional rural banks and agricultural cooperative societies across Karnataka and pan-India.
📜 Pre-existing Code & Hackathon Development Disclosure
Per the official rules of the Google Cloud All Things Agentic Hackathon:
- Pre-existing Scaffolding: Initial repository setup, standard FastAPI web skeletons, and basic API routing boilerplates were adapted prior to August 4, 2026.
- Built During Hackathon (Aug 4 – Aug 26, 2026): The entirety of the TerraLegacy Autonomous Agent architecture, including the Google Earth Engine multi-spectral telemetry pipeline (Sentinel-2, NASA SMAP, CHIRPS), Gemini 3.5 Flash multi-modal reasoning engine, Vertex AI Search ICAR Grounding Datastores, Cloud Firestore session state, Meta WhatsApp API webhook integrations, and the Production Web Portal (
terralegacy.web.app), was designed, implemented, and deployed entirely during the official hackathon submission period.
Built With
- agentic-ai
- chirps
- cloud-run
- discovery-engine
- docker
- fastapi
- firebase-hosting
- firestore
- gemini-3.5-flash
- google-cloud
- google-earth-engine
- leaflet-js
- meta-whatsapp-api
- nasa-smap
- python
- rag
- sentinel-2
- vertex-ai
Log in or sign up for Devpost to join the conversation.