Relay-4 — Every Second Matters
Inspiration
In an emergency, every second counts. Yet communicating critical information during a crisis can be difficult. Callers may be panicked, locations may be unclear, and dispatchers must gather essential details while making time-sensitive decisions.
We asked ourselves a simple question: What if AI could handle the initial information-gathering process so dispatchers could focus on making critical decisions?
That question inspired Relay-4, an AI-powered emergency intake and dispatch assistance platform designed to bridge the gap between emergency callers and human dispatchers.
Our goal wasn't to replace emergency responders or dispatchers. It was to explore how conversational AI could make emergency information more structured, accessible, and actionable.
What It Does
Relay-4 uses an AI voice assistant named REMY, powered by ElevenLabs, to communicate with callers and collect critical incident details.
REMY asks focused questions to understand:
- Location: Where is the emergency happening?
- Incident type: Is it a fire, medical emergency, accident, or another situation?
- Hazards: Are there immediate dangers?
- People involved: How many people are affected, and are there injuries?
As the conversation progresses, Relay-4 converts the collected information into structured incident records through our FastAPI backend.
These records appear in a dispatcher dashboard, where an operator can review incidents, assign available responder units, and record response updates such as Assigned, En Route, On Scene, Assisting, and Resolved.
Relay-4 also maintains incident correction history, helping preserve information as details change.
Our core principle is simple: AI collects the information; humans make the dispatch decisions.
Relay-4 is currently a simulated emergency response platform and does not contact real emergency services.
How We Built It
We designed Relay-4 around three main components: conversational AI, a structured backend, and a dispatcher interface.
1. Conversational AI — ElevenLabs
We integrated ElevenLabs Conversational AI to power REMY, our voice-based emergency intake assistant.
REMY is designed to ask short, direct questions, capture essential information, and send structured updates to our backend through authenticated webhook tools.
2. Backend — Python, FastAPI, and SQLite
Our backend uses:
- Python and FastAPI to build REST API endpoints.
- Pydantic to validate and normalize incoming incident data.
- SQLAlchemy and SQLite to persist incident records, evidence, corrections, assignments, and response events.
- Authenticated webhooks to connect ElevenLabs with the backend.
- API-key authentication to protect dispatcher operations.
- Pytest to test incident processing, authentication, and dispatch rules.
We implemented idempotent webhook processing using unique event IDs, preventing repeated requests from creating duplicate incident updates.
We also separated the voice intake system from dispatcher operations, ensuring the AI cannot independently assign responder units.
3. Dispatcher Dashboard — React
We built a web-based dispatcher console to present incoming incidents in a centralized interface.
Operators can review emergency details, manage responder units, assign units to incidents, and follow recorded response statuses.
The frontend communicates with our FastAPI backend through REST APIs, keeping the interface and business logic separate.
Challenges We Faced
One of our biggest challenges was connecting real-time conversational AI with a structured backend.
Voice conversations are naturally unpredictable. Callers may provide incomplete information, correct previous statements, or describe several details at once. We needed a system that could accept incremental updates without creating duplicate incidents.
Another challenge was configuring ElevenLabs webhook authentication and connecting cloud-hosted services to our local development environment. We worked through API schemas, secure headers, and tunneling to establish communication between the voice agent and backend.
We also had to think carefully about AI safety and dispatch authority. Allowing an AI to collect emergency information is very different from allowing it to make operational decisions. We addressed this by enforcing a backend boundary that reserves responder assignments for authenticated human operators.
Finally, designing incident status tracking required us to distinguish between an incident being recorded, a responder being assigned, and an actual response status being reported. We built an event-based approach rather than automatically advancing statuses based on time.
What We Learned
Building Relay-4 taught us that integrating AI into a real-world workflow involves much more than connecting an LLM to an API.
We gained hands-on experience with:
- ElevenLabs Conversational AI and webhook tools.
- FastAPI architecture and REST API development.
- Database modeling, validation, and persistent state.
- Idempotency and reliable event processing.
- Authentication and separation of system permissions.
- Designing human-in-the-loop AI workflows.
- Connecting frontend, backend, and external AI services.
Most importantly, we learned that a useful AI system isn't just about generating intelligent responses. It's about turning those responses into reliable, structured actions while keeping humans in control.
What's Next for Relay-4
Our vision is to evolve Relay-4 from a hackathon prototype into a more capable emergency coordination simulation.
Future improvements include:
Real-time communication: Replace dashboard polling with WebSockets for immediate incident updates. Intelligent responder recommendations: Suggest appropriate responder units based on incident type, location, and availability, subject to dispatcher approval. Geospatial integration: Visualize incident locations and responder positions on interactive maps. Conversation playback: Connect incident records with voice recordings and transcripts for dispatcher review. Advanced incident prioritization:** Explore AI-assisted severity assessment and incident triage. Scalable infrastructure:** Move toward PostgreSQL and a production-oriented deployment architecture.
Final Thoughts
Relay-4 started with one question: How can we use AI to make the first moments of an emergency more organized?
What we built is a step toward answering that question.
We believe the future of emergency coordination isn't about replacing human judgment with artificial intelligence. It's about giving people better information, faster, so they can make better decisions. Relay-4 — Every Second Matters.
Built With
- agenticai
- elevanlab
- fasapi
- geocoder
- python
- react
- typescript
Log in or sign up for Devpost to join the conversation.