An AI-driven multi-agent emergency management system designed to collect real-time disaster information, assess impact, allocate emergency resources, plan evacuation and response routes, and generate standardized emergency alerts.
The system integrates multiple specialized agents into a unified pipeline and provides the results through a web-based dashboard.
The emergency response pipeline consists of the following agents:
Collects disaster-related information from multiple data sources.
The collected information can include:
- Disaster location
- Disaster type
- Earthquake magnitude and depth
- Latitude and longitude
- Temperature
- Humidity
- Atmospheric pressure
- Wind speed
- Weather conditions
- Rainfall
- Water level
- Social media reports
- Emergency calls
The output of this agent is passed to the Damage Assessment Agent.
Analyzes the collected disaster information and estimates the potential impact of the event.
Outputs include:
- Damage score
- Severity level
- Estimated affected population
- Geographic impact zones
The severity levels are categorized based on the calculated damage score.
Determines the emergency resources required based on the damage assessment.
Resources may include:
- Ambulances
- Medical teams
- Fire trucks
- Police units
- Helicopters
- Emergency shelters
The agent also estimates the number of people that can be supported by the allocated resources.
Generates a standardized Common Alerting Protocol (CAP) XML alert using information produced by the previous agents.
The CAP alert contains information such as:
- Disaster type
- Location
- Severity
- Damage assessment
- Affected population
- Impact zones
- Emergency instructions
Generated CAP alerts are saved for further distribution and processing.
Determines recommended routes to nearby emergency facilities using OpenStreetMap road network data.
The agent uses OSMnx and NetworkX to:
- Download nearby road networks
- Discover hospitals, schools, and community centres
- Calculate shortest paths
- Estimate route distance
- Estimate travel time
- Rank available facilities
- Generate a recommended route
- Provide alternative routes
If no suitable road network or emergency facilities are available near a remote disaster location, the agent gracefully returns an empty route result without stopping the entire emergency pipeline.
Generates an Emergency Data Exchange Language (EDXL) message for emergency information exchange.
The EDXL message includes information such as:
- Disaster location
- Disaster type
- Severity
- Affected population
- Damage score
- Allocated emergency resources
- Recommended evacuation routes
This allows emergency information to be represented using standardized emergency data exchange formats.
The overall pipeline is:
Data Collection → Damage Assessment → Resource Allocation → Route Planning → CAP Alert Generation → EDXL Message Generation
The FastAPI backend exposes the complete pipeline through:
POST /pipeline
The pipeline returns:
- Input disaster data
- Damage assessment
- Resource allocation
- Route planning results
- CAP XML alert
- EDXL XML message
- Python
- FastAPI
- Uvicorn
- OSMnx
- NetworkX
- Pandas
- GeoPy
- Machine Learning models
- React
- Vite
- Axios
- Leaflet
The system can integrate information from:
- USGS earthquake data
- Weather services
- OpenStreetMap
- PeopleSense occupancy data
Navigate to the backend directory:
cd backend
Start the FastAPI server:
uvicorn main:app --reload
The backend will run at:
http://127.0.0.1:8000
FastAPI API documentation is available at:
http://127.0.0.1:8000/docs
Navigate to the frontend directory:
cd frontend
Install dependencies if required:
npm install
Start the development server:
npm run dev
Open the local URL displayed by Vite in the terminal.
Runs the complete multi-agent emergency response pipeline.
Retrieves weather information collected by the Data Collection Agent.
Runs disaster data collection and damage assessment.
Retrieves raw occupancy data from the PeopleSense integration.
Retrieves summarized occupancy information from the PeopleSense integration.
The Route Planning Agent dynamically searches for nearby road networks and emergency facilities.
To prevent the pipeline from failing for remote locations:
- Road network searches use progressively larger search radii.
- Road network data is cached when available.
- Facility data is cached by location.
- Missing OpenStreetMap facilities are handled gracefully.
- The pipeline continues even when no recommended route can be generated.
Emergency-AI-System/
|
├── backend/
| ├── agents/
| | ├── alert_agent/
| | ├── damage_assesment/
| | ├── datacollection/
| | ├── edxl_agent/
| | ├── resource_allocation/
| | └── route_planning/
| |
| ├── api/
| ├── services/
| ├── main.py
| └── test_pipeline.py
|
├── frontend/
| └── src/
|
└── README.md
The multi-agent emergency response pipeline integrates data collection, AI-based damage assessment, resource allocation, route planning, CAP alert generation, and EDXL emergency message generation.
The backend is integrated with the React dashboard through the FastAPI /pipeline endpoint.