Inspiration
Recently, I have often come across reports of natural disasters and everyday accidents, which made me wonder whether AI could help reduce some of the risks associated with these situations.
The goal is to give people the opportunity to practice and respond as correctly as possible before they ever face a real emergency.
My long-term vision for Relay is to develop it into an accessible emergency simulation and training platform covering many different types of incidents. For this competition, I chose one of the most common scenarios—a building fire drill—to help both building management teams and the general public improve their emergency preparedness.
I hope that practicing in advance can ultimately help people make safer decisions during real crises and improve their chances of survival and self-rescue.
I chose a building fire because it is a scenario that most people can immediately understand, while also clearly demonstrating how important timely decision-making, clear communication, and coordination can be during an emergency.
What Relay Does
Relay is an adaptive emergency training prototype.
During the exercise, the learner continuously makes decisions, while their own AI Agent participates in and directs the simulation through WebMCP.
The system does not follow a fixed, pre-written sequence of questions. The AI Agent observes the learner’s actions, introduces rule-validated complications based on the current situation, plays different roles within the scenario, and records key evidence throughout the exercise for post-simulation review and assessment.
How I Built It
Relay’s interface was built with React and TypeScript, with Three.js used to create the interactive building environment.
WebMCP allows the learner’s AI Agent to directly access a set of structured tools, including:
- Observing the current state of the exercise
- Introducing new complications
- Delivering messages from different scenario roles
- Recording assessment evidence
The simulation combines pre-authored rules with adaptive AI direction.
The code controls scenario state transitions and validates whether each tool call is allowed under the current conditions. The AI Agent then decides which eligible intervention is most appropriate for the situation.
Role messages can only reference facts that have been authorized within the scenario, and assessments must be grounded in decisions the learner actually made.
This architecture keeps the simulation flexible while maintaining a clear and traceable relationship between learner actions, scenario events, and final feedback.
Challenges I Ran Into
The first major challenge was controlling the scope of the project.
At one point, I tried to create a more dramatic hostage-taking scenario, but this type of situation involves a large amount of specialized knowledge and highly complex operational procedures. It was difficult to build something that was both accessible and credible within the available time—and I spent a lot of time exploring that direction.
Eventually, I returned to the building fire scenario and focused on creating a first version with a more complete structure and a clearer experience.
Another technical challenge was keeping the AI Agent responsive throughout a continuous exercise.
Initially, I had the browser wait indefinitely for a pending event request, but this exceeded the browser connection’s time limit.
I later designed a renewable event-waiting mechanism.
Each time the waiting connection is renewed, the system preserves the relevant event state, so learner actions and events that occur during reconnection are not lost.
The visual design also went through many iterations.
I experimented with more complex and visually dramatic 3D interfaces, but eventually realized that richer 3D visuals do not automatically make information easier to understand.
What I Learned
AI has been incredibly helpful throughout the development process.
I also learned that the most important part of an emergency simulator goes far beyond dramatic visuals.
Learners need to clearly understand:
what role they are playing, what information they currently have, and how their decisions affect the overall situation.
Meaningful AI integration requires AI to participate directly in the application’s workflow.
In Relay, the AI Agent interacts with the application through explicit tools, permissions, and boundaries, while the learner always retains control over the final decisions.
What’s Next
If I have more time—or enough reason to continue developing the project—I would like to improve:
- The onboarding experience
- The interaction design for coordination tasks
- The presentation of information during exercises, including more detailed scenario feedback
I would also like to gradually develop additional scenarios, including:
industrial accidents, coastal emergencies, and natural disasters.
Before expanding the platform further, I hope to collaborate with qualified emergency-management professionals to review the scenario assumptions, decision logic, and evaluation criteria.
At the moment, Relay is still a synthetic training prototype. It is not intended for real-world emergency command and cannot replace formal training provided by professional organizations.
If Relay could eventually recreate and simulate real environments and real-world scenarios, I believe that could become one of its most powerful capabilities.
Ultimately, the problem I want to solve is simple:
to give more people unlimited opportunities to practice difficult decisions before those decisions ever become real.
Built With
- react
- three.js
- typescript
- vite
- webmcp
Log in or sign up for Devpost to join the conversation.