Inspiration
In Lahaina in 2023, the sirens never sounded. In the January 2025 Los Angeles fires, evacuation alerts reached parts of Altadena hours late. Wildfire evacuations keep failing the same way. Warnings don't reach everyone, people don't know which way is safe, and responders can't tell who got out and who is still home.
Everyone already has a phone, and every responder already has a radio. We wanted one agent that sits between them: it texts and calls residents, talks to firefighters, and keeps one picture of who is safe.
What it does
Relay is one AI agent with a real phone number.
- Residents get a text when a fire is near them. Relay gives them a route to the nearest open shelter that avoids the fire, and tells them the compass direction that leads straight away from it. They can reply in plain language, in English, Spanish, Chinese, Gujarati or Hindi.
- No reply? Relay calls, and walks you out. If someone doesn't answer the text, Relay phones them. On the call it follows their live location as they move and tells them whether they're heading toward the shelter or the wrong way.
- Then it calls the people who can help. If the resident doesn't pick up, or the call goes to voicemail, Relay calls their family contact. If that call fails too, it calls the nearest responder unit. Relay never dials 911 on its own. A person makes every emergency call.
- SOS marks a person as needing help right away and flags them for a human.
- Firefighters talk to Relay over GMRS radio patched into a phone call. They can ask "Relay, who's still unconfirmed?" and get a spoken answer.
- Volunteers register by text, and Relay matches them to people who need a ride. Anyone can report a blocked road, and every route after that avoids it.
- One live map shows every resident's status (safe, unconfirmed, SOS, en route), the fire, shelters, road blocks, and where the fire is expected to be in 30, 60 and 120 minutes.
- Real data: live NASA FIRMS satellite fire detections and National Weather Service wind, each with its own spread forecast.
How we built it
Here is how one SOS moves through the system, step by step:

| STEP | COMPONENT | WHAT HAPPENS |
|---|---|---|
| 1 | Resident | Texts SOS from their iPhone |
| 2 | Text messages (Photon) | Replies within 2 seconds and finds where they are using Find My |
| 3 | Instant check | Spots the word SOS right away, with no waiting on the AI |
| 4 | The brain (Gemini AI) | Decides what to do, texts their family in their own language, and starts the check-in timers |
| 5 | Live map | Their dot turns red for everyone to see, refreshed every 2 seconds |
| 6 | Responder | A person reviews it and presses Confirm. Relay never calls 911 on its own |
| 7 | Phone calls (Photon and ElevenLabs) | After a person confirms, Relay calls the stand-in emergency phone with a briefing |
Behind the scenes, NASA FIRMS satellite data and the Weather Service feed the fire picture, OSRM plans safe roads, and OpenStreetMap supplies shelters.
Predicting fire spread
We didn't want to draw a circle and call it a forecast. Relay uses the Rothermel (1972) surface fire spread model, the model behind the US Forest Service's BehavePlus:
$$ R = \frac{I_R \, \xi \, (1 + \phi_w + \phi_s)}{\rho_b \, \varepsilon \, Q_{ig}} $$
In this equation, I_R is the reaction intensity, ξ the propagating flux ratio, φ_w and φ_s the wind and slope factors, and ρ_b · ε · Q_ig the heat needed to ignite the fuel ahead. We include Albini's 1976 extensions and the 53 standard fuel models.
Wind stretches a fire into an ellipse. Anderson's (1983) length-to-width ratio sets its shape from the midflame wind speed U in mph:
$$ \frac{L}{W} = 0.936\,e^{0.1147U} + 0.461\,e^{-0.0692U} - 0.397 $$
The spread rate at angle θ from the head of the fire is:
$$ R(\theta) = R\,\frac{1-e}{1-e\cos\theta} $$
We grow the current fire's edge outward by that ellipse (a Huygens wavelet / Minkowski sum). The same geometry gives each resident an exact estimated arrival time:
$$ t^* = \max_{\mathbf{n}} \frac{\mathbf{p}\cdot\mathbf{n} - r}{h_E(\mathbf{n})} $$
Here p is the person's position, r the current fire radius, and h_E the support function of the one-hour spread ellipse.
We checked our implementation against the published BehavePlus engine's own test cases, and it matches them. The whole system has over 900 automated tests.
Challenges we ran into
- Latency on the radio. A radio conversation can't wait 8 seconds. Free-tier LLM rate limits caused random spikes, so we added a fallback chain across models with a time limit on each one, and a keyword fast path for the words that must never wait (SOS, STOP).
- Filling the silence. On a phone call, 4 seconds of silence sounds like a dropped line. When the model is slow, Relay says "One moment" instead of going quiet.
- Wake words over radio. Speech-to-text often heard "Relay" as "Really". We tuned the wake rule so the agent answers when it's clearly being addressed and stays silent otherwise.
- Live location without an app. We used location sharing residents already have on their phone, and sent each new point to Relay so the next spoken direction uses where they are now, not where they were.
- Knowing when to escalate. Calling a family member while the resident is already talking to Relay would cause panic. Relay escalates only on a missed pickup or voicemail, with a short wait between each step.
- Four people, one system. Most of our bugs lived at the seams between lanes, such as ports, URLs and message shapes. Writing the contracts down first, then auditing every link end to end, is what made it work.
- Small details that break everything. Node resolved
localhostto IPv6 while our Python server listened on IPv4. The weather API dropped bursts of requests. BehavePlus measures wind direction as "from" in one mode and "toward" in another. - Real data vs. a reliable demo. Live fires don't show up on cue. We run a staged fire near Harvard for the demo, with real NASA fires and their forecasts shown on the same map. The live fires can never trigger alerts.
Accomplishments that we're proud of
- A fire spread model that matches the Forest Service's reference engine, not a guess.
- Text, phone calls and radio all running through one agent and one shared state.
- Relay tells every resident which way to go, in their own language, and corrects them live if they head the wrong way.
- The escalation chain (resident, then family, then responder) runs automatically, and a human always makes the final emergency call.
What we learned
- Agree on interfaces before writing code, especially with four people working in parallel.
- In an emergency tool, latency is a safety feature. The fast path matters as much as the smart path.
- Fire science is surprisingly well documented and public. The hard part is the units and conventions.
What's next for Relay
- Real fuel and terrain maps (LANDFIRE) in place of an assumed fuel type, so forecasts reflect the actual landscape.
- Spread that follows terrain and roads, not just a single ellipse.
- A pilot with a county emergency office, connected to their existing alert systems.
- More languages, and accessibility for people who can't text.
Built With
- behaveplus
- css
- elevenlabs
- express.js
- gemini
- gmrs
- grpc
- html
- imessage
- javascript
- leaflet.js
- nasa-firms
- national-weather-service
- node.js
- openstreetmap
- osrm
- overpass-api
- photon
- python
- rothermel
- sip
- tsx
- typescript
- vitest
- zod
Log in or sign up for Devpost to join the conversation.