Inspiration
In a cardiac arrest, survival chances drop 7-10% every minute. When emergencies strike, seconds save lives. We were inspired by the need to reclaim this critical time.
Current 911 systems, while heroic, are slowed by human bottlenecks in call processing, dispatch decisions, and vehicle routing. FireFly was built to eliminate these delays. We use autonomous AI agents to automate the entire response pipeline, turning saved seconds directly into more lives saved.
What it does
FireFly replaces the traditional, manual 911 dispatch process with a high-speed, autonomous pipeline of specialized AI agents. Here’s how it works from the moment a call is placed:
Information Collection: A fine-tuned agent instantly engages with the call, structuring the critical details of the emergency.
Intelligent Vehicle Scoring: This data is broadcast to agents running on each emergency vehicle. These Vehicle Agents assess their own status—location, traffic, personnel, equipment—and generate a real-time suitability score for the incident.
Autonomous Dispatch: A central Dispatch Agent analyzes the scores from all vehicles and makes an optimal, data-driven decision, dispatching the best possible unit in seconds.
Continuous Logging: A Logging Agent works in the background, meticulously recording every action, decision, and timestamp throughout the entire process for transparency and analysis.
System Reflection: After the incident concludes, a Reflection Agent analyzes the pipeline's performance, evaluates the effectiveness of the decisions made, and saves these insights to a database, allowing the entire system to learn and improve over time.
How We Built It
Our system is a collection of specialized, autonomous agents built on a modern tech stack. Here’s a breakdown of the key components.
Overall Architecture

Agents in our system 🤖
- Intake Agent: Built with Fetch.ai uAgents, this agent uses the Vapi API for real-time conversational AI and Redis to place new incidents into the processing queue.
Agentverse: Intake agent

- Router Agent: A core uAgent that implements our decentralized bidding system. It uses Redis for pub/sub messaging and the Haversine algorithm for geographic distance calculations. Agentverse: Router Agent
- Unit Agents (Police, Fire, EMS): These intelligent uAgents use LangChain with OpenAI Embeddings and the Google Gemini API to make context-aware decisions. They also poll Redis GEO for nearby incidents and use MCPs to integrate with the Waze API for traffic data. Agentverse: Unit Agent Hospital Agent Police Agent EMS Agent Fire Agent
- Comms Agent: This uAgent handles outbound communication, using the Vapi API for SMS notifications and the Supabase API for writing final logs to the database. Agentverse: Comms Agent
- Kubernetes Orchestrator: A Python script using the official Kubernetes client library to monitor Redis queues and auto-scale the agent fleet based on workload.
Agentverse: Kubernetes Orchestrator

- Evaluator Agent: This learning-focused uAgent uses LangChain and the Google Gemini API to analyze completed incidents from Supabase, generating insights that are stored back into the pgvector knowledge base.
Agentverse: Evaluator Agent

Some agents are in Google Docs because we reached the agentverse limit.

External APIs & Services 🌐
- Vapi API: The backbone of our communication, handling real-time voice-to-text, call management, and SMS notifications.
- Google Gemini API: Provides the core reasoning and strategic analysis capabilities for our intelligent agents.
- OpenAI Embeddings API: Used to convert text from incident logs into vector embeddings for our RAG system.
- Waze for Cities API: Integrated to provide real-time traffic and hazard data for optimal routing.
Databases 🗄️
- Redis: Serves as our high-speed data bus. We use it for pub/sub messaging between agents, as an incident queue, and for fast geographic queries with its GEO indexing features.
- Supabase (PostgreSQL): Our system for persistent data storage. It holds all historical incident logs and houses our strategic knowledge base, using the pgvector extension for efficient AI-powered similarity searches.
Core AI Libraries 🧠
- Fetch.ai uAgents: The fundamental framework enabling us to build a decentralized, multi-agent system where agents can discover and transact with each other.
- LangChain: The orchestrator for our AI logic, connecting LLMs (like Gemini) with our data sources (Supabase) to create the RAG system that allows our agents to learn.
Challenges we ran into
One of our biggest challenges was the sheer complexity of simulating a real-world emergency ecosystem. A core part of our pipeline depends on dynamic, real-time data from vehicles, hospitals, and live incidents. Mocking this interconnected web of data for a true end-to-end test proved incredibly difficult.
Additionally, our dashboard is designed to be stat and button-heavy, providing full transparency into the agentic backend. Creating the APIs to connect this complex frontend to our system was a significant undertaking. As a result, much of the data flow in our current demonstration is simulated to prove the concept, and bridging that gap remains a key challenge.
Accomplishments that we're proud of
Building a Truly Autonomous Agentic Pipeline: We're incredibly proud of creating a decentralized system where each agent is more than just a simple API call. Each agent has its own logic, state, and purpose, collaborating to form a complex, intelligent system.
Creating an Interactive Map Visualization: We learned how to use Mapbox from the ground up to build a compelling, interactive map. This frontend brings our backend to life, allowing users to visualize the agents' real-time decisions and understand the system's inner workings at a glance.
Achieving Deep System Complexity: We successfully designed and implemented a system with multiple layers of complexity—from the conversational AI intake and the decentralized bidding process to the RAG-based learning mechanism.
What we learned
Beyond the technical skills, we learned a great deal about designing and debugging complex, multi-agent systems. Ensuring reliable communication and managing the emergent behaviors of multiple autonomous actors was a profound challenge and a key takeaway.
On a personal level, we learned that after 24 hours of focused, caffeine-fueled development, a small team can achieve a state of superhuman productivity and build something truly remarkable.
What's next for FireFly
We have a comprehensive roadmap to continue developing this project:
Enhanced Agent Intelligence: We plan to make the agents even smarter. The Intake Agent could be fine-tuned to detect emotional distress in a caller's voice, while Vehicle Agents could integrate on-board audio processing to automatically detect signs of danger and call for backup.
High-Fidelity Simulation Environment: A top priority is to build a robust simulation sandbox. By feeding the system realistic, generated data, we can allow our Evaluator Agent to learn and refine dispatch strategies continuously in a safe environment.
Real-World Data Integration: The ultimate goal is to partner with emergency services to begin testing FireFly with anonymized historical data, validating its effectiveness and moving it one step closer to real-world deployment.
Built With
- fetch.ai
- gemini
- kubernetes
- langchain
- openai
- pgvector
- python
- redis
- supabase
- vapi
- waze

Log in or sign up for Devpost to join the conversation.