Inspiration

The inspiration behind PHAROS came from when my sister and nephew in Canada were amidst an active fire near their community; by the time they received any communication from officials, it was already too late. That day she got lucky, but a lot of others didn't, as they didn't get the plan at the right time, and it wasn't in the native language that they understood. The bottleneck in modern crisis response isn't a lack of data; it's the fragmentation of it. When a wildfire breaks out, emergency operators lose critical time cross-referencing active fire perimeters (NIFC), weather shifts (NWS), and the demographic makeup of a threatened district just to draft an evacuation strategy that people will actually understand.

What it does

PHAROS is an agent-driven response sandbox. At its core, it acts as a standalone MCP server that feeds live, spatial intelligence directly into AI workflows. On the front end, it provides a human-in-the-loop dashboard where operators can view live environmental threats, select vulnerable municipalities, and draft highly targeted alerts.

Instead of guessing which languages are needed, PHAROS uses real US Census (ACS) data to automatically recommend languages based on the selected district's demographics. It generates drafts using safe, human-authored templates and flags them for native-speaker review before anything is relayed.

How we built it

We built PHAROS with an agent-first architecture, splitting the stack between a lightweight frontend and a heavy-lifting backend.

The Backend (Python / FastAPI): The core engine is a standalone MCP server that runs over stdio or Streamable HTTP. It exposes eight live retrieval tools to an LLM via AWS Bedrock.

The Frontend (Vanilla JS / MapLibre): We deliberately avoided heavy frontend frameworks, using vanilla JavaScript and MapLibre GL JS to render a fully functional dark basemap. It pulls real US Census TIGERweb polygons and updates demographic language recommendations dynamically for each of the counties/districts.

Live Open-Data Adapters: We wrote keyless adapters to ingest real-time data from NASA FIRMS (satellite), Open-Meteo, OSRM (routing), NWS (fire-weather alerts), and NIFC/WFIGS (fire perimeters).

Safety Constraints: Because this is an emergency tool, the agent operates in a strict sandbox. All drafts require a named human reviewer, and any changes to the map hazard automatically invalidate pending drafts.

Challenges we ran into

  • Deterministic vs. Probabilistic Spatial Logic: You cannot trust an LLM to accurately determine if a fire perimeter intersects an evacuation route. We had to build deterministic segment-circle intersection checks into the Python backend. For example, calculating the perpendicular distance \(d\) from a point \((x_0, y_0)\) to a road segment line \(Ax + By + C = 0\) to ensure the route falls outside the hazard radius \(r\):

$$ d = \frac{|A x_0 + B y_0 + C|}{\sqrt{A^2 + B^2}} > r $$ These concrete facts are calculated deterministically before being passed back to the agent.

Accomplishments that we're proud of

We successfully bridged the gap between raw, messy government open data and modern agentic frameworks. Building a functional, read-only MCP server from scratch that securely exposes eight distinct data streams to an AWS Bedrock LLM all while maintaining a highly responsive MapLibre geospatial frontend proved that AI can be safely integrated into emergency tech when placed behind strict, deterministic guardrails.

What we learned

Deep dive into MCP: We learned how to properly implement the Model Context Protocol to cleanly expose external APIs and local Python functions as tools, transforming a standard LLM into a highly contextual retrieval agent.

Geospatial Data Wrangling: Rendering massive GeoJSON payloads (like live interagency fire perimeters) smoothly in the browser taught us a lot about spatial data optimization.

Human-in-the-Loop AI: In high-stakes environments, AI should not be an autonomous decider. Using it strictly for data retrieval, translation assistance, and drafting gated by rigid human review is the safest way to deploy LLMs.

What's next for PHAROS

Moving forward, I plan to run actual local inference for smoke detection on held-out data. I also want to implement model-based translation with automated back-translation and fuse the live NWS/WFIGS layers with OSRM routing geometry to check evacuation paths against verified road closures in real time.

Built With

Share this project:

Updates

Submission history