Inspiration
A crew usually learns a building at the front door. Which floors have people on them. Where the nearest hydrant is. Whether an elevator fits a stretcher.
That information already exists. It sits in property records, 3D scans and aerial photos that were made for leasing and insurance, not for someone in a moving truck.
We wanted to put it in the one place a crew will look on the way: a text message.
What it does
A dispatcher picks the building, the floor and the kind of emergency. Primesight texts the crew a briefing of eight lines or fewer, with a floor map and an aerial map of the approach.
The briefing changes with the emergency. A fire gets the people on and above the floor, the nearest hydrants and which way the wind carries smoke. A cardiac arrest gets the elevator that fits a stretcher, who is on the floor and who can meet the crew at the door. A gas leak gets what the tenants may store, the wind and an open lot to stage in.
Every briefing ends with a NOT KNOWN line. If the data does not say where the stairs are, the text says so.
The crew can text back. MORE sends the rest of what we know. A question gets an answer about that building. NOTE saves what the crew found, and the next briefing for that building leads with it.
There is no app to install. It works over iMessage and SMS.
The same data also trains dispatchers, in a game. A caller, played by an AI, reports an emergency. You question them, pick the right building from aerial photos, pull the facts that matter from its records and floor plan, and write the text to the crew yourself. Your message is graded, then shown next to the one Primesight wrote for the same call.
How we built it
Primesight joins three kinds of data on one address. Building records from CoStar give the floors, tenants, headcounts, elevators, sprinklers and contacts. 3D interior scans from Matterport show the floor itself. A vision model, SAM 3, finds exit signs and fire alarm pulls in the panoramas, and we place each one on the floor plan. Aerial imagery from Vexcel gives the approach map, the roof and open lots near the building. City hydrant maps and live wind fill in the street.
Headcounts come from the tenant records. An employee count is sometimes for the whole company, so we cap it by the space the tenant leases:
$$\text{people} = \min\left(\text{employees}, \frac{\text{leased square feet}}{100}\right)$$
An agent built with deepagents and Claude does the work:
- It reads the call and finds the building.
- It opens a playbook for that kind of emergency.
- It pulls the data and hands parts of the job to helpers that run at the same time. One checks the tenants for hazards. One drafts a heads-up for the property manager. One reads the floor scan. One checks the street.
- It writes the briefing.
- A second model grades the draft against fixed rules: short, nothing invented, facts and not orders. A draft that fails is rewritten.
- Photon delivers the text to the phone, and the agent saves a note on the building for next time.
The dispatcher's page shows each of these steps as it happens, next to a mirror of the crew's phone.
The game is graded two ways. Code checks what cannot be argued with: the address, the floor and the facts that emergency needs. A team of agents then checks every claim against the building's data and coaches the delivery.
$$\text{score} = \text{code checks (70)} + \text{agent review (30)}$$
The rest is Python, plain HTML and JavaScript, a MapLibre 3D map, Vercel and Supabase.
Challenges we ran into
Too much information. Our first briefings held everything we knew. Nobody can read that in a truck. We read what responders say they need on the way and cut each briefing to what that kind of emergency needs first.
An agent that fills gaps. Early drafts named stairwells and AED locations that no data supported. We added the grader and the NOT KNOWN line. We also tried to find AEDs in the scans, but the model kept marking ordinary wall cabinets, so AEDs stay not known. A wrong AED is worse than none.
Scans cover some floors, not all. The page only offers floors that have a scan, so a briefing never describes the wrong floor.
Reaching a real phone. The text line cannot message a phone first. The phone has to text the line once before it can receive a briefing.
Accomplishments that we're proud of
A real briefing lands on a real phone in about a minute. Every line in it traces back to a source, and nothing is a guess written as a fact.
The grader caught a real mistake. One draft said no tenants were flagged when a helper had flagged one. The grader sent it back, and it was fixed before the text went out.
The same building gives a different briefing for a fire and for a cardiac arrest. It also gets better with use, because what one crew reports is the first thing the next crew reads.
In the game, a person and the AI are graded by the same rules, side by side.
What we learned
For someone on the way to an emergency, less is more. Choosing what to leave out took longer than gathering the data.
An AI that writes for people walking into danger needs a second check, and it needs to say what it does not know.
The three datasets are worth more joined than apart. The records say who is on the floor. The scan shows the floor. The aerial shows how to reach it.
What's next for Primesight
First, connect to a real dispatch system, so the briefing goes out with the call and nobody picks from a list. Then put it in front of working crews and let them tell us what to cut.
We also want to find more in the scans, starting with stairs, standpipes and extinguishers. And we want a department to be able to load its own district into the game, so new dispatchers train on the buildings they will send crews to.
Built With
- langchain