Inspiration

Climate disasters are getting worse — and the response hasn't kept up. After a wildfire or flood tears through a community, the bottleneck isn't machines or materials. It's coordination. A human commander can't simultaneously track dozens of rescue units, a spreading hazard, a shifting list of vulnerable survivors, and a rebuilding operation — while making triage calls every few seconds as conditions change.And when rebuilding finally starts, it's broken too: new high-carbon materials get trucked in, perfectly usable wreckage gets bulldozed to landfill, and homes go up on the same vulnerable ground without a thought for the next disaster.We wanted to build the missing brain — an AI that could run the entire operation, make real decisions under pressure, and rebuild right the first time.

What it does

Haven is an agentic AI commander that deploys a fleet of autonomous robots through the aftermath of a climate disaster and runs the entire relief-and-rebuild operation.A team of specialized agents handles each piece of the mission:

Rescue & Triage — finds survivors and displaced families, weighs vulnerability against reachability, and dispatches units to the most critical first Salvage & Debris Recovery — surveys the wreckage, classifies every pile by reuse value, and feeds recovered material directly into the rebuild supply Rebuild & Housing — sequences and assembles low-carbon modular homes, housing the most vulnerable families first, preferring salvaged material over new imports Restoration & Resilience — clears wildfire fuel load, replants trees, recovers waterways, and restores drainage so the rebuilt community survives the next disaster Sentinel — forecasts incoming hazards and demand surges so the operation builds resiliently, not just reactively Above them all sits the Commander — an orchestrator agent that arbitrates between competing priorities, translates plain-English human direction into coordinated fleet action, and continuously re-plans as the world changes.When a timber shortage hits mid-build, Haven doesn't stall — it switches to salvaged and recycled panels, re-sequences the build order so the most vulnerable families still get housed on time, and the carbon meter drops because the greener material was forced into play. A disruption becomes a sustainability win, live.

How we built it

Haven runs on a hybrid architecture — deterministic where reliability matters, LLM-powered where judgment matters.Simulation layer (deterministic): Robot movement and A* pathfinding, hazard spread (cellular fire/flood model), survivor and family state decay, material and carbon ledgers, and scoring all run deterministically every tick. No model in this loop — it's fast, predictable, and always on.Planning layer (LLM-in-the-loop): On each planning tick, the current world state is serialized into a compact context and sent to Claude via the Anthropic API. The model returns a structured JSON action plan — assign(unit, task), reprioritize(target), allocate_material(site, source), reroute(unit, path) — plus a one-line rationale that surfaces in the mission comms log. The deterministic layer validates and executes. A fallback policy ensures a slow or failed model call never breaks the run.Frontend: Three.js (React Three Fiber) with HDRI image-based lighting, PBR materials from Poly Haven, and a postprocessing pass (bloom, SSAO, ACES tone mapping, depth of field) for the cinematic look. Hazards glow, robots wear state-colored markers, and every agent decision is narrated live in the comms log so the AI's reasoning is always visible. Assets sourced from Quaternius and Kenney CC0 libraries — no hand-modeling.Agent coordination: All agents share a world-state blackboard. Specialists post tasks and resource requests; the Resource & Logistics agent flags contention; the Commander arbitrates and commits. Every decision publishes to a mission comms bus that drives the live UI narration.

Challenges we ran into

Keeping the LLM fast enough for a live demo. A planning tick that takes 3 seconds kills the illusion. We solved this by keeping the per-tick context minimal (only deltas, not full world state), caching stable context, and running the deterministic sim independently so the world keeps moving even while the model is thinking.Making the AI's reasoning visible without cluttering the scene. A photorealistic 3D world can completely hide what the agents are doing — which defeats the whole point. Getting the legibility layer right (state-colored unit markers, urgency glows on survivors, the comms log, the HUD) on top of the cinematic pass took real iteration.Arbitration under scarcity. When the Rescue agent and the Rebuild agent both want the same hauler robots, the Commander has to make a real call — and that call has to be explainable. Designing the multi-objective arbitration so it produces decisions a judge can follow (and agree with) was harder than expected.The salvage-to-rebuild pipeline. Wiring the Salvage agent's output directly into the Rebuild agent's material budget — so recovered debris actually changes build decisions in real time — required careful shared-state design to avoid race conditions and inventory drift.

Accomplishments that we're proud of

The recovery moment works. When the timber shortage hits mid-demo, the Commander announces it, the Rebuild agent switches materials, re-sequences the build for the most vulnerable families, and the carbon meter visibly drops — all without a human touching anything. That beat lands every time. The comms log makes the AI legible. Watching the agents narrate their own triage calls and trade-off decisions in plain English — in real time, in a world that looks real — is exactly what we set out to build. The circular economy loop is real, not simulated: salvaged material from the debris field actually enters the build supply and changes what gets built and at what carbon cost. And the whole thing runs in the browser, on unknown hardware, without a native build — which matters a lot at a hackathon.

What we learned

That legibility is a first-class design problem in agentic systems. It's not enough for the AI to make good decisions — it has to make them in a way that a room full of people can follow and trust. The comms log, the state markers, the narration, the HUD — all of that is the UX of the AI's reasoning, and it needs as much design attention as the agents themselves. That the hybrid deterministic/LLM split is the right architecture for demo-grade agentic systems. Trying to put the model in the physics loop is a mistake; keeping it at the planning layer and letting the sim run independently is what makes the whole thing feel responsive and alive. That scarcity is more interesting than abundance. The most compelling moments — the timber shortage, the medic bottleneck, the storm re-plan — all come from the agents running out of something and having to reason about trade-offs. Designing the scenarios around scarcity made the AI's intelligence visible in a way that abundance never would.

What's next for Haven

The Commander is deliberately decoupled from the units it commands — which means the same brain, in principle, drives real robots. The next step is connecting Haven to a physical drone and ground-robot testbed and running the same planning loop against real sensor data instead of a simulated world state. On the AI side: richer Sentinel forecasting (trained on real climate and displacement data), persistent memory across missions so the Commander learns from past disasters, and multi-commander coordination for large-scale events spanning multiple sites. On the sustainability side: a full lifecycle carbon model that accounts for transportation, operational energy, and end-of-life — not just embodied carbon in materials — and integration with real salvage and modular-home supply chains so the material decisions reflect actual availability and cost. The goal is a system that a real disaster-relief organization could deploy — not as a replacement for human judgment, but as the coordination layer that lets human commanders think at the level of strategy while the AI handles the complexity below.

Built With

Share this project:

Updates