Inspiration
Hurricane Harvey flooded 154,170 homes in Harris County, and most were outside the mapped 100-year floodplain. A flood map answers one question: is this building in the zone? It can't say what is inside or what would be lost. Flood maps stop at the front door.
What it does
Waterline takes the water inside. For a commercial building, an AI agent:
- Finds where water gets in from Vexcel aerial imagery and ground elevation.
- Walks the Matterport 3D scan, lists what a flood would damage, and measures each item's height above the floor from the 3D model.
- Prices the loss at any water depth using CoStar's building data, as a median with an 80% range.
- Shows it: drag a depth gauge and water rises inside the real scan while the figure updates.
- Acts: ranks fixes by loss avoided, drafts a pre-storm playbook, and waits for a person to approve before anything is sent.
On eight real Houston buildings, water gets inside 3 of 8 at FEMA's 1% flood level, and 7 of 8 if the water is two feet higher.
How I built it
- Data: CoStar property records, Matterport scans and meshes, Vexcel aerial imagery, FEMA flood data and USGS ground elevation.
- Measurement: a vision model finds items in each panorama, and we ray-cast those pixels onto the scan's mesh. 74% of 337 item heights are measured this way, to about 5 cm.
- Loss model: a simulation over item values and heights gives a median and an 80% range. For one building at 1 ft, that cut the spread between low and high from 8.8 times to 1.6 times.
- Elevation: each depth is tied to an outside water level. We estimate the floor from USGS elevation and compare it with FEMA's 1% flood level.
- Agent: built on LangChain's deepagents, with an orchestrator and six sub-agents, a file dossier per building, skills loaded on demand, memory of human corrections, and human approval before sending. A full run takes about 50 seconds.
- Stack: Python, FastAPI, Next.js, three.js and Gemini. We built it with help from AI coding tools.
Challenges we ran into
- CoStar engineers told us our first loss range was too wide to be useful and asked how land elevation fit in. We rebuilt both overnight.
- A cheaper model invented dollar figures when summarising. Sub-agents now return exact tool results, and a guard removes any figure the tools did not produce.
- We tested whether the agent could survey fewer scan positions and still find most of the value. It did no better than random, so it reads every position.
Accomplishments that we're proud of
- Heights measured from the scan, not guessed.
- The agent cross-checks the layers: on one building the aerial imagery shows three drive-in doors and CoStar records four, and it flags the gap.
- On the same items, our estimate is about twice the standard FEMA Hazus method's, because that warehouse keeps nearly everything on the floor.
What we learned
Honest ranges beat confident numbers. Ranking buildings at the same flood level, not the same depth, reordered the whole list: the building that ranked first at equal depth ranked last once its floor elevation was counted.
Limits
Waterline does not forecast floods or simulate how water arrives. Losses cover the scanned area only. Item values and fix costs are our own assumed ranges, labelled and editable. Public elevation data is accurate to about 1.7 ft.
What's next for Waterline
Real contents schedules from owners and lenders, surveyed floor elevations, and more hazards on the same pipeline.
Built With
- costar
- deepagents
- fastapi
- gemini
- langchain
- matterport
- next.js
- python
- react
- three.js
- typescript
- vexcel