🌩️ Inspiration
It's Tuesday at 2:30 AM. A Category 3 storm just formed over the Nevada corridor. You're responsible for 6 commercial fleets carrying $30 million in cargo across the US West Coast. Your operations center is flooded with weather alerts, your drivers are calling in, and your dispatch software is still showing yesterday's routes.
This scenario inspired TerraGrid—an autonomous engine designed to act before the crisis hits, providing a "Nano Melon" level of precision and organic efficiency to global supply chains.
🚀 What It Does
TerraGrid utilizes a sequential 3-Agent Chain-of-Thought pipeline:
- 🛰️ Ecological Watcher: Ingests real-time climate anomaly data (NASA FIRMS) and GPS telemetry, flagging severe weather threats or wildfires the moment they appear.
- 🧠 Causal Reasoner: Cross-references anomalies against historical route data and carbon models to calculate the optimal path bypass.
- ⚔️ Adversarial Verifier: Red-teams every reroute decision to eliminate hallucinations and validate logistics feasibility before broadcasting to assets.
Key Metrics:
- Carbon Intelligence: Automatically calculates CO2 offsets for every reroute (e.g., 127kg saved per incident).
- Explainable AI: Every decision is accompanied by a live-streaming Chain-of-Thought console.
🛠️ How We Built It
- Frontend: Next.js (App Router) + Tailwind CSS + Leaflet.js
- Backend: Python + FastAPI (Multi-Agent Orchestration)
- AI Engine: Google Gemini API (Agentic Reasoning Pipeline)
- Database: Neon Postgres (Real-time telemetry storage)
- Data Sources: NASA FIRMS API (Satellite thermal hotspots & wildfire tracking)
🚧 Challenges We Ran Into
- Multi-Agent Logic Synchronization: Coordinating a three-agent sequential pipeline—Watcher, Reasoner, and Verifier—required complex state management. Ensuring that the "Adversarial Verifier" could effectively critique and roll back the "Causal Reasoner's" logic without causing infinite loops was a major orchestration hurdle.
- Structured JSON from LLMs: Getting Gemini to reliably return deterministic route coordinates + carbon offset JSON required rigorous prompt engineering and output validation schemas.
- Real-time Geospatial Sync: Keeping the map, telemetry feed, and AI console in sync during a live anomaly event required building a custom event-bus to manage state across the frontend.
✨ Accomplishments We're Proud Of
- Live Satellite Integration: The threats on the map aren't simulated; they are pulled from real NASA thermal hotspot data.
- Autonomous Sustainability: We made carbon footprint reduction a hard constraint for the AI, not just an afterthought.
- Zero-Hallucination Pipeline: By using an adversarial agent, we ensure the reroutes stay on actual roads rather than "hallucinating" paths through mountains.
🔮 What's Next for TerraGrid
- MarineTraffic API: Expanding into sea-freight tracking for global shipping lanes.
- Mobile Driver App: Pushing real-time reroute waypoints directly to driver dashboards.
- Carbon Credit Market: Automatically converting CO2 savings into tradeable offset credits.
Built With
- fastapi
- gemini
- leaflet.js
- nasafirmsapi
- neon
- next.js
- python
- tailwindcss
Log in or sign up for Devpost to join the conversation.