• 5 min read

Integrating AI into critical systems without making it critical

Table of Contents

Project HERMES is a disaster response coordination system that bridges the gap between how people naturally report incidents and how responders need to process information.

It uses AI to help transform informal chat messages into structured incident data, but the system is designed so that AI remains a helper rather than a dependency.


Play

Why we built it

Emergency reports rarely arrive in a clean format. During a disaster, people don’t fill out structured forms, they send messages the way they normally communicate:

“May baha na dito sa amin, mataas na yung tubig.”

Responders need that same message to become something actionable: location, incident type, severity. HERMES bridges the two so residents can communicate naturally while responders still get structured information.

Handing the whole interaction to an AI chatbot was the obvious move, but risky for a critical system since models can misread messages or behave inconsistently. So AI only handles what it’s good at, understanding messy language and extracting information. Everything else stays controlled and validated by humans.

How it turned out

HERMES became a chat-based incident reporting system connected to a responder control center.

Chat-based reporting

Residents submit reports through Telegram or Messenger, either as a freeform message in their own words or through a guided flow that collects information step by step. Either way, reports end up in the same incident management workflow.

Reading intent before reacting to it

A free-text message first goes through a small classification step: is this an incident report, a status check, a settings change, or none of those? Unclear cases, greetings, small talk, get a plain command hint instead of a guess, and a wrong or failed read just falls back to that hint instead of breaking anything.

When a message does read as an incident report, the same model call pulls out what it can: incident type, severity, description, rough location, none of it final. It pre-fills the guided reporting flow and skips straight to whatever wasn’t already answered.

AI-assisted information extraction

The AI pipeline converts unstructured messages into structured data, so residents describe what happened instead of learning a form. AI doesn’t make operational decisions. It doesn’t decide if an incident is valid, assign resources, or close reports. It just reduces the manual work of interpreting messages. Decisions stay with responders.

Human validation as part of the workflow

Bad data has real consequences here, so every AI-generated result stays editable and reviewable before it becomes part of the official record. If the extraction is wrong, responders correct it and the workflow continues. A critical system shouldn’t fail because one AI component makes a mistake.

Incident management dashboard

Responders monitor incoming reports through a centralized dashboard: original conversation history, extracted information, status, all in one place, reviewable and editable. A feed view handles fast triage; table and kanban views handle larger volumes. Both update live through Supabase Realtime, so a new report shows up for every responder watching without a refresh.

Staying usable when the connection drops

Disaster response is exactly when a connection gets shaky. HERMES is installable as a PWA, and a service worker caches the app shell and recent incident data so it still renders offline, read-only. Submitting or updating a report still needs a connection.

Mapping and communication

HERMES plots incidents on a map and can send advisories back to residents through the same messaging platforms, making it a two-way channel.

How we built it

Technologies we used

Frontend Next.js + Tailwind CSS + shadcn/ui
Backend Next.js API routes + Supabase (PostgreSQL + Auth + Realtime)
Chat Integration Vercel Chat SDK
AI Integration Vercel AI SDK
Maps Integration MapLibre GL
Offline Support Service worker + Web App Manifest (installable PWA)
Deployment Vercel

Designing AI boundaries

The most important decision was where AI belongs. Predictable interactions like onboarding and guided reporting run on deterministic logic, since they need to behave the same way every time. AI only comes in where flexibility matters, interpreting natural language. That hybrid gives the system AI’s benefits without making every interaction dependent on a model response.

What I learned

HERMES changed how I approach AI integration. It’s easy to slap an LLM onto an app and call it an AI product. The harder problem is knowing where AI actually adds value and where it just adds risk. For critical systems, reliability matters more than automation. Sometimes the better design gives the model a smaller, clearly defined role inside a larger workflow, one where the outputs stay useful, verifiable, and safe.