Inspiration
Danish's family lives in Sugarland, Texas. When Winter Storm Uri hit, the power went out, then the water. They did what any family would do, which was sleep at a friend's house until it came back.
While they were gone, a pipe burst in the attic. A neighbor called to say water was coming out of the house. By the time they got back, it had reached the main floors. Three months and more than twenty thousand dollars later, the house was theirs again.
They aren't an outlier. During Uri, more than 415,000 Texas families filed insurance claims for pipe-burst damage, and insurers paid out $7.38 billion. The average incurred residential claim that year was $17,800. A single frozen pipe is a house-shaped hole in a family's savings.
What went wrong for them wasn't the warning. The warning was city-wide, and the risk was house-by-house. Utilities find out which homes were fragile when the phones start ringing, which is after the water is already in the walls.
And the obvious fix has a cost nobody advertises. If a whole city drips its faucets at once, pressure falls. Below 20 psi, Texas requires a boil-water notice, and a zone loses water for everyone, including the homes that did everything right. A utility can't just text "everyone drip." It has to decide which homes, and defend that choice.
That's the whole product: know which houses are about to break, before the freeze, and protect them without taking the water away from anyone else.
What it does
FreezeLine is an agent for water utilities that runs before and during a hard freeze.
Risk survey: Some days before the storm, the agent calls every enrolled household and asks the questions a form never gets answered. Can you reach your main shut-off valve, do you have pipes on an exterior wall or up in the attic, is anyone home who can't move quickly, do you have somewhere to go. The answers become a risk score for that house, and a home that would need help is flagged for a crew before anything freezes. Households sign themselves up at /register, and nobody is called who didn't opt in.
Pressure plan: Each zone has a pressure budget, so the planner assigns drips to the highest-risk homes only and stops when the zone would fall below 20 psi plus a safety reserve. The console shows all three futures side by side for every hour of the storm: no drips, our plan, and the blanket "everyone drip" message, which is the one that quietly pushes a zone under the line.
Texts: High risk gets the full checklist, with the single tap worth dripping, the cabinet doors, and where the shut-off is. Low risk gets told to leave the taps alone, because their zone needs the pressure more. Every word of that lives in data/messages.json in English and Spanish, so nothing a family reads is invented at the last minute.
Re-planning: Conditions change during a storm. A county loses power, the temperature drops another five degrees, a zone's margin thins. Homes in the affected area get a new text, and if a zone is heading for 20 psi, FreezeLine proposes a Stage 2 alert that names the specific homes which should stop dripping. A human operator has to approve that alert before it goes anywhere.
Burst: When a pipe goes anyway, the homeowner texts BURST. The agent tells them to shut off the main valve and offers HELP if they can't reach it, and the report lands in a dispatcher's queue ranked by risk score, vacancy, whether the owner can reach the shut-off, and whether anyone inside has limited mobility. A crew is proposed for the nearest match and a dispatcher approves it with one click.
The honesty rule: The agent may not tell anyone a crew is coming, or that a text was sent, unless the system has a record that it was. That rule sits in code around what the agent is allowed to say, rather than in a prompt asking it to be careful, because a family waiting on a van that was never dispatched is worse off than a family that was told the truth and started moving.
How we built it
The console is Next.js and React over a MapLibre map, one cookie-gated screen for utility staff. Households never see it; they get calls and texts and a sign-up page. The demo replays Winter Storm Uri hour by hour from February 14 to 18, 2021.
The data is split between real and simulated, and the console says which is which. Home locations and street geometry are real OpenStreetMap building footprints for four Houston neighborhoods, and the weather is the real Open-Meteo archive for those dates. Everything about a household, from the year the house was built to who lives in it, is simulated sample data. We ship the OSM extracts in the repo instead of fetching them, so the console renders straight from files and opens without a database behind it.
The pressure math. For a zone with base pressure (P_{\text{base}}), freeze exposure (e \in [0,1]) and (T) dripping taps across (n) homes, the pressure the zone has left is
$$ P_{\text{zone}} = P_{\text{base}} - 10e - 15\frac{T}{n} $$
and the number of homes we may ask to drip, keeping a reserve (r) above the 20 psi boil-water line, is
$$ B = \min\left(n,\ \max\left(0,\ \left\lfloor \frac{P_{\text{base}} - 10e - (20 + r)}{15}\,n \right\rfloor\right)\right) $$
with (r) between 5 and 10 psi. The constants, 10 psi of freeze demand and 15 psi if every home dripped one tap, are calibrated assumptions rather than a model of Houston's pipe network, and the panel says so in plain language. A real deployment swaps in the utility's own pressure sensors; the arithmetic that decides how many homes stop dripping stays the same. (src/lib/pressure.ts, src/lib/planner.ts)
The dispatch queue. Burst reports are not handled first come, first served. Every home carries a sort key and the queue is ordered lexicographically, so the dangerous home outranks the inconvenient one before any weighting happens:
$$ \text{key}(h) = \left( s_h,\ v_h,\ \neg a_h,\ m_h \right) $$
Here (s_h) is the risk score, (v_h) flags a vacant home, (a_h) says the owner can reach the shut-off, and (m_h) flags anyone inside with limited mobility, with ties broken on distance to the nearest crew. We used an ordered tuple instead of a weighted sum because weights are a policy decision a utility should own, and an ordering is something a dispatcher can explain on a radio.
The agent. Six tools: publish the drip plan, queue outreach by area and risk level, simulate outreach, propose a crew, propose a Stage 2 alert, and log an event. With ANTHROPIC_API_KEY set, Claude picks the order and writes the reason beside each step; with no key at all, a deterministic rules engine makes the same moves from the same data (src/lib/agentRules.ts). The run streams into the console as server-sent events, so the decision trace fills in while it is happening and every line in it is a tool call against real state rather than a script we replay.
The voice. A FastAPI agent answers Twilio's call, asks the pre-survey questions turn by turn, and writes down what it heard. Getting a survey out of a real person turns out to be mostly failure handling, because people answer the first half of a question with "no", ask what "heated" means, give an address that half-matches three houses, or describe their neighbor's pipes instead of their own. The agent retries three times, apologizes, records the fact as unknown, and moves on, on the theory that a missing answer costs less than an invented one. Transcripts and the filled record land in voice_calls.
Messaging goes through one sendSms() interface with two providers behind it now, Twilio and Photon for iMessage (src/lib/sms.ts). A third, an Android phone acting as an SMS gateway, worked long enough to prove the idea and was retired the night Photon came up.
How we use our sponsors
- Photon: Texting is where this product actually reaches people, and Photon is what made it free and instant. Setting
SMS_PROVIDER=photonsends the whole freeze sequence as iMessage bubbles on a real iPhone, through the free shared number, with SMS fallback for anyone not on an Apple device. The recipient texts the line once to open the thread, and after that every message lands in the same place a person already looks. - Twilio: Every phone call runs through Twilio, driven by our own agent over TwiML instead of a hosted voice product, because the survey has to end in a structured record rather than a summary. Twilio also carries SMS in the fallback case.
- Anthropic: Claude writes the reason beside each step the agent takes, so a dispatcher reads a sentence instead of a JSON blob. What the agent is allowed to promise is decided by our code, not by the model. (
src/lib/agentRules.ts,src/lib/agentNotify.ts) - Gemini: Our second model provider, and not an official sponsor, but it earned the slot. Same six tools, same trace, one variable (
LLM_PROVIDER). Two providers is why the agent never depends on one vendor being reachable during a demo, and it made comparing explanations as simple as flipping a flag. - Amazon: Where the pilot runs. Nothing in the stack is tied to a host, so a water department can run the console and the voice server inside its own AWS account with its own data instead of on four laptops.
- Supabase: Enrolled households, consent, text history and call records. The console reads it and the agent writes to it.
Challenges we ran into
Twilio's trial tier took away the part we needed. A trial account strips <Stream> out of the TwiML, so the version of our agent that listens while the caller is talking simply does not run, and custom SMS bodies come back with "Invalid template name," which is a confusing thing to read when you are trying to send a stranger the words "drip your kitchen tap." We looked at the paid tier more than once and kept closing the tab, mostly because we could not be sure it would fix the thing that was actually broken.
Photon settled it in an evening. Photon is one of the sponsors, and it turned out to be the most useful thing we touched all weekend. We swapped the SMS layer behind an interface we had already written, kept Twilio for voice, and the messages started arriving as iMessage on a real phone for free. The Android gateway we had been running, a spare phone on a desk sending through its own SIM, went in the bin, and we never did pay for the Twilio upgrade.
The survey read "no" as a missing valve. "No, I know where it is, I just can't reach it" was recorded as does not know where the shut-off is, which is the opposite of what the person said and would have quietly raised their risk score, the exact input that decides whether a crew is sent. Corrections like that became rules with tests beside them, in both languages, and the retry-then-apologize behavior came out of the same calls.
Two clocks in one demo. We replay February 2021 in 2026, so the console has a replay clock and the phone has a real one, and every text, call and log line has to agree about which it means. When they disagreed, messages arrived stamped six years in the past, which reads as a broken product rather than a broken demo. The conversion now lives in one place (freezeClock.ts) and everything else goes through it.
Addresses don't match themselves. "1407 Harvard," "1407 Harvard Street" and "Harvard St" all have to land on the same house, and "Harvard" on its own matches dozens. We match exact, then normalized, then fuzzy with a threshold, and we only dial a home when the result is unambiguous, because the failure mode here is calling someone about a burst pipe they do not have.
A promise has to be a row, not a sentence. Stage 2 alerts stop and wait for a dispatcher. Crew assignment is a proposal someone approves. The trace reports what a tool returned and nothing else, so there is no line in the product claiming help is on the way when no record says it is. We wrote that as a rule first, then moved it into code, on the theory that a rule in a prompt is a suggestion.
The demo has to survive venue wifi. The rules engine produces the same plan and the same trace with zero network calls, and the console reads from files in the repo rather than a live database, so the version we show is the version that works with the network off.
Accomplishments that we're proud of
The interface is the piece we are proudest of. You can hand the console to someone who has never seen it and they will find Run agent, scrub the storm backwards, and follow what the agent did without being taught, because the map, the pressure panel and the trace all describe the same hour in plain English. For a homeowner it is even simpler: one text, one instruction, no app to install and no account to remember.
Pressing Run agent sets off the whole chain the way it would in a real storm. It reads the forecast for every area, scores the homes, and starts contacting the households that opted in using the answers they gave when they signed up, which means a phone rings, a transcript appears, and a record fills in. That took far more prompting and guard code than we expected, and the version in the demo is the one we trust.
Every zone and hour has three pressures calculated for it, no drips, our plan, and the blanket message, and the third number is usually the uncomfortable one. It is also the entire argument for making this decision house by house instead of city-wide.
The data behind the demo is real where it counts:
| Neighborhood | Real OSM footprints | Weather hours | Zone series |
|---|---|---|---|
| Heights | 2,310 | 168 | 1 |
| Montrose | 2,275 | 168 | 1 |
| Third Ward | 1,898 | 168 | 1 |
| Meyerland | 1,551 | 168 | 1 |
| Total | 8,034 | 168 each | 4 |
The tests sit where the bugs actually were, 217 cases across 27 files, and the ones we wrote first were pressure budgets, risk bands, the survey classifiers, address matching, the replay clock and the message templates. The agent also runs end to end with no API key, so the trace on stage comes from the same code path the tests run.
What we learned
The constraint is the product. "Everyone drip" is the easy answer, it is popular, and it can cost a zone its water. Being the tool that says not this house is less lovable and considerably more useful.
Promises belong in code. Every claim the agent can make maps to a row in a database, and the Stage 2 and crew steps stop for a human on purpose, because we stopped trusting wording and started trusting state.
A survey is a failure-handling problem. The model was never the hard part. Negations, half-answers and three houses with the same street name were, and retrying, apologizing and recording an unknown beats guessing every single time.
Real buildings, invented families. Using real footprints made the demo honest about place and forced us to say out loud what is simulated. "Is this real?" is the first question every judge asks, and a crisp answer is worth more than another feature.
Vendors are interfaces, not dependencies. Photon was one file behind an interface we had already written, and a second model provider is one variable. The stack that ports is the stack that survives a weekend.
FAQ
Does this replace 911? No. It makes the calls a utility has no staff to make, before anything is on fire. When someone reports water coming through a ceiling, the agent tells them to shut off the main and flags the home for a crew, and a person still decides.
Why not just tell everyone to drip? Because pressure is shared. If every home opens a tap, the zone can fall under 20 psi, Texas requires a boil-water notice, and everybody loses water. Protecting the highest-risk homes means telling some lower-risk homes to leave their taps alone.
Who is allowed to get called? Only households that opted in at /register, or a utility's own customer list that it is calling under its own authority. A real deployment would rely on the TCPA's emergency exception, and agency counsel would confirm that before a single call goes out.
Is the map real? The footprints and streets are real OpenStreetMap data, the weather is the real Uri archive, and every household attribute is simulated. The console says so, and the data files are in the repo.
Is the pressure model real? No. It is a simplified model with its assumptions in one config file, and the panel labels it that way. A utility's own sensors replace the readings; the math that decides who stops dripping does not change.
Would it have saved Danish's house? We can't say that. It would have called his family before they left, asked whether anyone could reach the shut-off, and told them to drip the kitchen tap and leave the cabinets open. That is the honest version of the claim, and it is still the difference between coming home to a dry house and coming home to a ceiling on the floor.
What's next for FreezeLine
Drills: A tabletop exercise with a utility's own dispatchers, then a replay of a night like Uri with their people in the room, so the plan gets argued about by the people who would have to defend it.
Shadow mode, then a pilot: Run beside real dispatchers during real freeze warnings, recommending and never sending, until the utility has watched it agree with them for a season. Then run on their customer list under their authority, with their sensors replacing our model and their data deleted when the season closes.
Texts that answer back: We assume today that some homes drip more than they are told. Real replies turn that assumption into a measured number, and A2P 10DLC registration is what lets those replies come from the utility's own number at scale instead of a shared line.
Beyond freezes: Calls, pressure and dispatch already work the same for hurricanes, ice storms and boil-water events. Only the hazard model changes.
A freeze warning today is a broadcast. We want the next one to be a conversation.
Try it at our table
Scan the QR code, sign up with your phone number, and our agent will call you. You get the same survey a real household gets, and then a text with your own freeze plan.
Built with
next.js · react · typescript · tailwindcss · maplibre · supabase · twilio · photon · anthropic · claude · gemini · python · fastapi · openstreetmap · open-meteo · zod
Built With
- delivery.com
- javascript
- photon
- python
- reactbit
- sails.js
- supabase
- three.js
- twilio
- vercel