🔗 Try it live: https://aegis-beta-nine.vercel.app

💡 Inspiration

🔥 In January 2025 the Eaton Fire tore through Altadena. Nearly 20 people died, most of them in west Altadena, where evacuation alerts arrived hours after the fire. 🏚️ At a senior living community, residents who couldn't walk out on their own were left behind. None of this was a forecasting failure. People simply didn't know, building by building, who needed help first.

🏛️ State Farm asked: when a disaster hits thousands of people at once, how can AI identify those with the most urgent needs, coordinate help, and make sure no one is overlooked? We think the answer starts before the fire. 💸 The cheapest claim is the one that never happens, and the hardest rescue is the one nobody planned for.

🛡️ What it does

Aegis is an AI coach for property managers 🏢 and the insurers behind them. It runs on a live, shared simulation of a neighborhood hit by an Eaton-like fire.

🧰 Before the fire: prevention

  • 📊 Every building gets a risk score from a model trained on real CAL FIRE damage inspections. Aegis turns that into an expected insurance claim:

$$\mathbb{E}[\text{claim}] = V \times P(\text{fire reaches it}) \times P(\text{destroyed} \mid \text{reached})$$

  • 🧠 The coach ranks fixes: residents who need help getting out come first, then claims avoided per dollar (🏠 Class A roof, 🌬️ ember-resistant vents, 🌿 defensible space, 🚐 a second evacuation van). ✅ One tap approves the plan.
  • 📋 Each approved fix is also documented against California's Safer from Wildfires checklist, the list insurers use for premium discounts.

🚨 During the fire: people first

  • 📱 Every resident gets a check-in. 🤖 Claude reads free-text replies in any language, so "my oxygen is almost empty" becomes an urgent task for staff. 🔕 Residents who stay silent are escalated automatically.
  • 🧭 The coach says what to do now and why: 👩‍🚒 send staff to these residents (one tap), 🏃 evacuate this building ("fire arrives in 1h 24m, getting 38 people out takes 1h 35m"), 🚒 send an engine ahead of the fire.
  • 🔴 Every building on the map shows a live alert ("3 need help", "2 no reply"), and staff get a task board grouped by building.

📈 After the fire: proof

⚖️ Aegis compares the outcome with the same fire without Aegis. On the demo map that's ✅ 260/260 residents safe vs 250/260, 🏢 one fewer building lost, and 💰 about $24M less damage. Averaged over 40 fires: 8.4 more people safe and $17.3M less damage.

🎲 Not hard-coded

Press New scenario and the server generates a new world in a fraction of a second: 🌬️ new wind, 🔥 a new fire start, 🏗️ new construction for every building, and 👥 new residents' needs. The real model re-scores everything and the coach re-plans. 🎯 You can also click anywhere on the map to start the fire there.

🔧 How we built it

  • 🐍 Data and models (Python, scikit-learn, pandas).
    • CAL FIRE's damage inspection database: 132,522 structures. We trained a logistic regression on 35,062 complete records from 41 fires, with fire × neighborhood fixed effects. It scores 0.944 AUC on held-out homes, and we recalibrated it to the Eaton Fire's 49.7% destruction rate.
    • 🛰️ NASA FIRMS satellite detections gave us Eaton's real front speed (1.92 km/h). 🌬️ Burbank airport wind records (IEM ASOS) gave us the wind replay.
    • 🐯 The time-series analysis runs in Tiger Data (TimescaleDB hypertables with time_bucket).
  • 🔥 Fire engine (TypeScript). A cellular-automaton fire with ember spotting, calibrated to Eaton over 1,000 simulated fires. 🎲 Monte Carlo forecasts predict when the fire reaches each building and how likely it is to reach it at all.
  • ⚡ SpacetimeDB is the backend (hosted on Maincloud). The world lives in tables, and every action is a transactional reducer: approve a fix, evacuate, claim a rescue (🔒 atomic, so two staff can't claim the same person), dispatch an engine, generate a scenario. ⏱️ A scheduled reducer advances the fire every second, and every connected screen stays in sync.
  • 🖥️ Web app (React, Vite, TypeScript, on Vercel). An isometric town with 🎨 Blender-rendered sprites and SVG 🔥 fire, 💨 smoke, 🌬️ wind and 🚒 fire trucks. It has the coach on a 📱 phone, on-map building cards and alerts, and resident and staff views with illustrated portraits.
  • 🤖 AI worker (Node + Claude). A separate SpacetimeDB client calls Claude through the Anthropic API with structured JSON outputs to triage replies and write plain-language building instructions.

🧗 Challenges we ran into

  • 🙃 The data was biased. In fire-damage records, a burned-away fence shows up as "unknown." That made some safety features look dangerous, and the first model was backwards. We dropped those features, used complete records only, and added neighborhood fixed effects.
  • ⚖️ A fair comparison was harder than it looked. Fires are chaotic. The first time we compared runs, preparing a building could make the same fire worse, because one building not igniting changed every random draw after it. 🧮 We fixed this with a monotone coupling. Each spread link and each building gets one random threshold for the whole fire \(E \sim \text{Exp}(1)\), and fires once its accumulated hazard crosses it, with \(h = -\ln(1-p)\) per burning step:

$$P(\text{fires within } a \text{ steps}) = 1 - (1-p)^a$$

The odds per step are unchanged, so the calibration holds. But a fix, a lower risk or an engine on scene can now only delay or prevent a burn. ✅ Across 40 random worlds, following Aegis's plan is never worse on damage, buildings lost or people.

  • 🔢 Keeping the AI honest. The language model never produces numbers. Every evacuation time and dollar figure comes from the model and the simulation, and notes that contain digits are rejected.
  • ⏱️ Real-time at scale. Fire, people, engines and alerts all update every second for every screen, so the simulation runs inside the database as a scheduled reducer, and clients receive only the rows that changed.

Built With

Share this project:

Updates

Submission history