Inspiration
Emergency response coordination is a critical challenge that affects every community. During the Southern California wildfires earlier this year and recent campus emergencies at UC Berkeley, we witnessed firsthand how fragmented communication and slow decision-making can cost precious time when lives are at stake. We were inspired by the potential to combine cutting-edge AI with immersive 3D visualization to transform how cities respond to emergencies. Our team envisioned a future where AI agents could instantly analyze disaster scenarios, optimize resource allocation, and coordinate multi-agency responses; all while emergency managers watch it unfold in stunning photorealistic 3D.
What it does
AI-Powered Decision Making: Google Gemini LLM analyzes emergency events in real-time, considering severity, location, resource availability, and Berkeley-specific factors to make intelligent dispatch decisions.
Immersive 3D Visualization: Using Google to render Berkeley's buildings and terrain with stunning detail, allowing emergency managers to see exactly where events occur and track vehicle movements in real-time.
Multi-Agent Coordination: CrewAI agents work as a specialized team - a Triage Agent assesses threats, Resource Allocation Agent optimizes vehicle deployment, and Dispatch Agent coordinates responses.
Hardware Integration: ESP32 touch-screen interfaces deployed throughout Berkeley allow field personnel to trigger emergencies instantly, bridging the physical-digital gap.
Smart Vehicle Dispatch: The system automatically selects optimal emergency vehicles (ambulances, fire trucks, police) and calculates realistic routes using Google Maps' emergency routing.
How we built it
Frontend Architecture:
JavaScript ES6+ with Google Maps JavaScript API v3.55
Google 3D Maps API (maps3d) for photorealistic visualization
AI Backend:
Python FastAPI serving the core intelligence system
Google Gemini 2.0 Flash as the primary LLM for emergency analysis
CrewAI v0.28.8 for multi-agent coordination and workflow
Fetch.ai uAgents for decentralized agent communication
Hardware Layer:
ESP32 microcontrollers with 4.0" TFT touch displays
Challenges we ran into
One issue we faced early on was synchronizing Google Maps routing with vehicle movement animations while maintaining realistic speeds. Handling route calculation failures also proved technically challenging. This was a core functionality for simulating emergency responses in real time. Similarly, ensuring that the Gemini LLM provided consistent and logical emergency responses across different event types, severities, and sources required extensive prompt engineering and testing. Finally, balancing CrewAI's powerful capabilities with real-time performance requirements meant developing both full and simplified agent versions that could adapt dynamically to system load.
Accomplishments that we're proud of
Given it was our first time using Agentic AI, we were able to adapt quickly while exposing ourselves to new technologies. We persevered through numerous challenges and created a system that has a real-world impact on a lot of people. In addition, we achieved sub-5-second emergency event processing from hardware trigger to AI analysis to vehicle dispatch visualization, which simulates the real-life effectiveness.
What we learned
Through this project, we learned how to bring together diverse technologies, AI, real-time simulation, embedded hardware, and geospatial data, into a unified, mission-critical system. We developed a deeper appreciation for designing user-centric tools that are both intelligent and responsive under pressure. Working with large language models and agent-based systems taught us the importance of adaptability, prompt design, and clear coordination. Above all, we learned how to turn a bold idea into a tangible, impactful solution through collaboration, iteration, and resilience.
What's next for UrbanResponse AI
Multi-City Expansion: Extend beyond Berkeley to San Francisco, Oakland, and eventually any city with emergency response needs.
Hospital Integration: Connect with Berkeley's hospital systems for real-time bed availability and specialized care routing.
Public Alert System: Add civilian notification capabilities with evacuation routing and safety instructions.
Multi-Agent Decision Making Process
flowchart TD
START([Emergency Event Detected]) --> VALIDATE{Event Validation}
VALIDATE -->|Valid| STORE[Store in Event Database<br/>Coordinator Layer]
VALIDATE -->|Invalid| REJECT[Reject Event]
STORE --> CREW_START[Initialize CrewAI Workflow]
subgraph "Agent Collaboration"
CREW_START --> TRIAGE_START[Triage Agent Analysis]
subgraph "Triage Agent Process"
TRIAGE_START --> GEMINI_PROMPT[Create Berkeley-Specific Prompt]
GEMINI_PROMPT --> GEMINI_CALL[Gemini Flash 2.5 Analysis]
GEMINI_CALL --> PARSE_RESPONSE[Parse AI Response]
PARSE_RESPONSE --> TRIAGE_RESULT[Priority + Resource Assessment]
end
TRIAGE_RESULT --> RESOURCE_START[Resource Agent Planning]
subgraph "Resource Agent Process"
RESOURCE_START --> QUERY_DB[Query Berkeley Emergency DB]
QUERY_DB --> DISTANCE_CALC[Calculate Distances<br/>Haversine Formula]
DISTANCE_CALC --> FILTER_AVAILABLE[Filter Available Units]
FILTER_AVAILABLE --> OPTIMIZE[Optimize Selection<br/>Distance + Capability]
OPTIMIZE --> RESOURCE_RESULT[Selected Units]
end
RESOURCE_RESULT --> DISPATCH_START[Dispatch Agent Coordination]
subgraph "Dispatch Agent Process"
DISPATCH_START --> CREATE_ORDERS[Create Dispatch Orders]
CREATE_ORDERS --> CALC_ETA[Calculate Traffic-Aware ETAs]
CALC_ETA --> UPDATE_STATUS[Update Unit Statuses]
UPDATE_STATUS --> DISPATCH_RESULT[Final Dispatch Orders]
end
end
DISPATCH_RESULT --> COORD_RESPONSE[Coordinator Response]
COORD_RESPONSE --> VIZ_UPDATE[Update 3D Visualization]
VIZ_UPDATE --> MONITOR[Human Monitoring]
MONITOR --> ADJUST{Human Adjustments?}
ADJUST -->|Yes| CREW_START
ADJUST -->|No| END([Response Complete])
REJECT --> END
style TRIAGE_START fill:#f9f,stroke:#333,stroke-width:4px
style RESOURCE_START fill:#bbf,stroke:#333,stroke-width:4px
style DISPATCH_START fill:#bfb,stroke:#333,stroke-width:4px
style GEMINI_CALL fill:#e8f5e8,stroke:#333,stroke-width:2px
Built With
- crewai
- css3
- fastapi
- fetch.ai
- gemini
- google-maps
- html5
- javascript
- python
Log in or sign up for Devpost to join the conversation.