About the project
Inspiration
Tens of millions of Americans are impacted by natural disasters each year, and challenges including electrical outages and lack of access to resources and medicine can make conditions for them fatal. Particularly, our team feels that the electrical grid, which can be vital to persisting after weather events and for residents requiring extra support, is impacted by many different conditions that can make proper and timely decisions for avoiding electrical fires and widespread outages difficult.
During severe weather, the leading cause of US power outages, grid operators decide which lines to reroute or shut off using many sources of data, including 2D maps of various weather data, power usage, and news coverage. They must also consider environmental changes like a hot line sagging or wind swinging it into trees. The 2003 Northeast blackout started with lines sagging into trees and left about 50 million people without power.
There are tools that currently help to digest data sources, but each covers limited sources: Neara builds physics simulations of utility lines, Technosylva scores wildfire risk for shutoffs, and research labs are prototyping control-room agents. They also run on private utility data at prices small co-ops can't pay. Rewire synthesizes the data in one place and produces metrics for risk, an actionable plan, a physics simulation for scoping danger, and identifying areas that should and shouldn’t lose power based on the factors it collects.
What it does
Rewire is an operator co-pilot for the real Los Angeles grid (829 power lines, 66 kV and up).
- Live and replay. Live streams of data plus a 72-hour forecast, and replay past storms (Eaton & Hurst 2025, Woolsey 2018) with hour-by-hour scrubbing.
- Risk map. Each line is scored from wind, humidity, wire temperature, sag, wind sway and clearance to the real vegetation below.
- Physics-based Agents An orchestrator picks which specialists to call (fire, storm damage, heat, brownout, buildings). Each writes its findings to a shared virtual file system, and the orchestrator plans from those files. The operator always makes the final call.
- Effects of power loss CoStar commercial property data shows what is powered by each substation: apartment homes, senior and student communities, offices and their tenants by industry. Combined with OpenStreetMap hospitals and water plants, a Buildings agent ranks which outages hurt most.
- Live agent graph showing every agent call, file write and read.
- Study mode for what-ifs (raise the wind, cut a line) without touching the real state, and text alerts to the operator for very high risk.
How we built it
13 public sources (OpenStreetMap, HIFLD, USGS, LANDFIRE, Open-Meteo, EIA, EAGLE-I, CPUC, NWS, Census) feed a Python physics engine: PTDF power flow, then wire temperature from the IEEE 738 heat balance, $$ q_c(T_c) + q_r(T_c) = q_s + I^2 R(T_c) $$
then sag, wind blowout and clearance at 13,671 towers. One full-grid simulation takes 0.07 s. Fire-risk, storm-damage and demand models were fit only on training storms. Agents use LangChain deepagents with Gemini, choose only from pre-checked real actions, and never write a number shown on screen. A rule-based planner runs in parallel as a fallback. FastAPI, React, Three.js, Twilio through LangChain. We also utilize CoStar and Vexcel data for the mapping and for building context.
Challenges we ran into
- UX for industry. It was very difficult balancing visuals for all concurrent processes with keeping the interface simple to understand. We often found information boxes cutting each other off or paragraphs of text overloading the user, but without the vital information, the interface becomes a fancy map. We settled on having the number of safe lines always present and all other widgets hidable through dropdowns.
- Matching the visuals to the real data. Getting the 3D map to show the true grid was harder than expected: line coordinates came in a different order than we assumed, towers and terrain didn't line up, and the risk counts on the map, the status box and the agents disagreed until we tied them all to one source.
- Aligning the agents with the physics. The agents' reasoning and the physics engine didn't always agree. An agent would flag a line or propose a move the simulation said was unsafe or pointless. Determining which variables to include in the models was also non-trivial as models with fewer variables sometimes performed better
Accomplishments that we're proud of
- Depth with ground truth behind everything. Every layer has several supports to ensure it can be trusted. All of the information given to the agents is public infrastructure data, the agents compute using physics models, and these models are trained using historical data. Furthermore, we really heavily considered all must-haves an electrical grid company would have before taking on such a product, such as human-in-the-loop, proof the agents can control physical hardware, conservation of compute, and phone alerts for affected consumers.
- Results that hold up. From the forecast issued the day before the 2025 storm, the lines nearest the Eaton and Hurst fire starts ranked top 6% and 3% of 829, and 95% of flagged line-hours fell inside NWS Red Flag Warnings. We publish where we lose too.
- UX an operator could actually use. One map and one clock for live and past storms. Click a line to turn it off or cap it and see the physics result instantly. For what-ifs, there is an implementation for study mode, a live graph of what the agents are doing, plans you can preview on the map before approving, and text alerts when it matters.
What we learned
- A manager agent orchestrating focused subagents beats one large LLM controlling everything.
- Agents need ground truth: the file system allows them to follow their plan more closely and our physics engine binds them to real-world constraints.
- UI/UX is more challenging than it looks. Especially with a project with many functionalities, it's very hard to fit everything onto a screen without creating a button salad.
What's next for Rewire
- Distribution lines with utility data, where most utility fires start.
- First responder contacts: an approved shutoff automatically alerts fire stations, 911 dispatch and affected hospitals with which lines are live or off.
- Study mode as an RL training ground: train larger reinforcement learning agents on thousands of simulated storms, rewarded for cutting fire risk while keeping people powered, and test whether they generalize to new storms and regions, moving toward more autonomous control with the physics check and operator still in the loop.
Built With
- census
- costar
- css
- deepagents
- fastapi
- google-gemini
- hifld
- landfire
- langchain
- langgraph
- open-meteo
- openstreetmap
- pydantic
- pytest
- python
- react
- three.js
- typescript
- vexcel
- vite
