Firstly on how gemini api was used:
- The Multi-Agent Reflexion Loop: Instead of basic prompts, we spin up two adversarial agent instances to cross-verify choices: Planner Agent: Generates multimodal alternative routes with coordinate nodes. Critic Agent: Audits proposals against time, cost, and emissions using a strict efficiency score:$$S = w_{t}(T_{delta}) + w_{c}(C_{cost}) + w_{e}(E_{carbon})$$The agents debate recursively until the route achieves a score of $\ge 0.85$.
- Tool Calling (Zero Hallucinations)To stop the AI from inventing fake roads or ports, we use native Function Calling. When the Planner suggests a detour, Gemini pauses execution and outputs a structured request to trigger our backend Geocoding API, mapping exact real-world latitude and longitude coordinates.
- Structured Outputs (JSON Mode)The Autonomous Watchman background service feeds chaotic, raw global news and weather text into Gemini. By enforcing responseMimeType: "application/json", Gemini filters the noise and formats the threat data into clean JSON objects ready for database insertion.
- Massive Context Ingestion Gemini’s large context window allows us to pass the entire global World State (all active shipments, live weather boundaries, and client business constraints) into a single payload. This ensures the AI optimizes the entire logistics network simultaneously rather than treating shipments in isolation.
Inspiration: The inspiration for CHRONOS was born from a stark reality: our global supply chains are dangerously reactive. During extreme weather events—like the 2024 floods or intensifying cyclones—logistics managers often don't realize a shipment is in danger until it is already stalled. We saw a critical gap where weather data existed, but wasn't being used to autonomously protect life-saving cargo. We wanted to build a system that doesn't just watch the storm, but outsmarts it. What it does CHRONOS is an Autonomous Supply Chain Orchestrator that turns passive tracking into active, self-healing resilience. The Watchman: An AI agent that proactively monitors global news and weather feeds to identify threats before cargo reaches a bottleneck. The Reflexion Loop: When a threat is detected, a multi-agent "debate" begins. A Planner Agent drafts new routes while a Critic Agent audits them for safety and efficiency. Autonomous Rerouting: The system calculates a weighted efficiency score (S) to validate detours. Once a path exceeds a threshold of (0.85), it executes the reroute automatically. Public Sentinel: A mobile PWA that allows ground-level workers to report "ground truth" weather impacts, bypassing data lags in official reporting. How we built it We built CHRONOS using a cutting-edge, AI-native stack: Intelligence: Google Gemini 2.5 serves as the reasoning engine, using Tool Calling to verify coordinates via Geocoding APIs. Frontend: A high-performance React dashboard featuring a 3D Digital Twin globe built with Three.js and React-Globe.gl. Backend: A Node.js environment deployed on Google Cloud Run, utilizing node-cron for the "Watchman" heartbeat. Database: Firebase Firestore provides real-time synchronization between the AI's internal reasoning and the user's view. The core of our decision-making is the Efficiency Score Formula:$$S = w_{t}(T_{delta}) + w_{c}(C_{cost}) + w_{e}(E_{carbon})$$This ensures every detour is mathematically optimized to balance arrival time, operational cost, and carbon emissions. Challenges we ran into One of our biggest hurdles was AI Hallucinations. In early builds, the AI would suggest "ghost" routes through non-existent roads to avoid storms. We overcame this by implementing a strict Critic Agent that audits every GPS waypoint against real-world map data. Additionally, managing the real-time state of multiple AI agents debating in the background while keeping the 3D globe fluid required significant optimization of our Firestore listeners and React rendering. Accomplishments that we're proud of We are incredibly proud of our Reflexion Loop. Watching two AI agents "argue" over the safest way to move medical supplies around a flood zone—and eventually reaching a consensus that is safer and greener than the original path—was a massive milestone. We also successfully integrated the Public Sentinel PWA, proving that "ground truth" data can be ingested by AI to trigger global logistics changes in seconds. What we learned This project taught us that the future of disaster resilience isn't just better forecasting; it's Autonomous Agency. We learned how to move beyond simple chatbots and into complex agentic workflows. We also discovered that sustainability doesn't have to be an afterthought—by including carbon metrics in our LaTeX-based scoring formula, we proved that the most resilient route can also be the most eco-friendly one. What's next for CHRONOS The next phase for CHRONOS involves deep IoT Integration. We plan to connect directly to vessel and truck telematics to receive real-time fuel and cargo health data. We are also looking into Blockchain-based Smart Contracts to automatically trigger insurance payouts or carrier updates the moment a weather-driven reroute is executed. Our ultimate goal is to scale CHRONOS into a global "logistics brain" that ensures no life-saving shipment is ever stopped by the weather.
Built With
- gemini
- javascript
- node.js
- openai-sdk
- tailwind
- three.js
Log in or sign up for Devpost to join the conversation.