Skip to content

About

Autonomous 10-Agent AI Orchestrator for real-time disaster coordination — ingests distress feeds, scores survivor risk, allocates regional emergency assets & dispatches automated Twilio alerts via FastAPI & CrewAI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RescueNet AI - 3D Animated Banner
RescueNet AI Animated Terminal



Status Python Next.js FastAPI CrewAI

AWS Twilio Docker License


"Imagine 350mm of torrential rain paralyzing Hyderabad in under 12 hours. Streets turn into rivers. Power grids fail. Emergency hotlines receive 10,000+ unstructured panic calls. Inter-agency dispatch between Police, Fire, Hospitals, and NDRF stalls into critical bottlenecks.

RescueNet-AI autonomously ingests raw distress feeds, calculates survivor decay curves, matches real geo-tagged emergency assets, and generates a life-critical dispatch plan in under 45 seconds."


⚡ Live Execution Flow

┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│  RAW DISTRESS FEEDS (SMS / Phone Calls / WhatsApp / 112 Transcripts)                             │
└─────────────────────────────────┬────────────────────────────────────────────────────────────────┘
                                  ▼
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│  🤖 10-AGENT AUTONOMOUS DISASTER ORCHESTRATION PIPELINE (CrewAI + Pydantic v2)                   │
│                                                                                                  │
│  [01 Incident] ──▶ [02 Intel] ──▶ [03 Survivor] ──▶ [04 Triage] ──▶ [05 Priority]                │
│                                                                        │                         │
│  [10 Master Plan] ◀── [09 Alert] ◀── [08 Risk] ◀── [07 Hospital] ◀─────┴──▶ [06 Resource]       │
└─────────────────────────────────┬────────────────────────────────────────────────────────────────┘
                                  ▼
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│  TELANGANA EMERGENCY INFRASTRUCTURE GROUNDING                                                    │
│  • 100+ Hospitals & ICU Beds   • 108 Ambulance Units   • NDRF Battalions   • Fire Depots         │
└─────────────────────────────────┬────────────────────────────────────────────────────────────────┘
                                  ▼
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│  AUTONOMOUS MULTI-CHANNEL DISPATCH (<45 Seconds)                                                 │
│  📲 Automated Twilio SMS  •  📞 Synthetic IVR Voice Calls  •  🗺️ Live Geospatial Command Map   │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘

🏗️ 3D Interactive System Architecture

flowchart TD
    classDef input fill:#1e293b,stroke:#64748b,stroke-width:2px,color:#f8fafc;
    classDef agent fill:#0f172a,stroke:#ef4444,stroke-width:2px,color:#f8fafc;
    classDef data fill:#1e1e38,stroke:#3b82f6,stroke-width:2px,color:#f8fafc;
    classDef output fill:#064e3b,stroke:#10b981,stroke-width:2px,color:#f8fafc;

    IN1[Distress Calls / SMS / Audio]:::input --> API[FastAPI Ingestion Gateway]:::input
    API --> ORCH[CrewAI Orchestrator Engine]:::agent

    subgraph AgentPipeline ["🤖 10-Agent Swarm Execution Sequence"]
        direction TB
        A1["01. Incident Understanding<br/><i>Extracts coordinates, victims, hazard</i>"]:::agent
        A2["02. Disaster Intelligence<br/><i>Calculates flood velocity & infrastructure risks</i>"]:::agent
        A3["03. Survivor Probability<br/><i>Evaluates time-decay exposure curves</i>"]:::agent
        A4["04. Medical Triage<br/><i>Assigns RED / YELLOW / GREEN triage tags</i>"]:::agent
        A5["05. Priority Scoring<br/><i>Calculates composite life-threat index</i>"]:::agent
        A6["06. Resource Allocation<br/><i>Matches nearest boat & ambulance depots</i>"]:::agent
        A7["07. Hospital Coordination<br/><i>Reserves ICU beds & blood bank units</i>"]:::agent
        A8["08. Risk Prediction<br/><i>Identifies submerged roads & route hazards</i>"]:::agent
        A9["09. Alert Communication<br/><i>Synthesizes localized emergency broadcasts</i>"]:::agent
        A10["10. Command Orchestrator<br/><i>Synthesizes immutable master dispatch plan</i>"]:::agent

        A1 --> A2 --> A3 --> A4 --> A5 --> A6 --> A7 --> A8 --> A9 --> A10
    end

    ORCH --> AgentPipeline

    subgraph TelanganaGIS ["🗺️ Real Regional Emergency Assets"]
        HOSP[(100+ Hospitals & Trauma Units)]:::data
        AMB[(108 Ambulance Hubs)]:::data
        NDRF[(NDRF Flood Rescue Units)]:::data
        FIRE[(Regional Fire Stations)]:::data
    end

    TelanganaGIS -.-> A6
    TelanganaGIS -.-> A7

    subgraph DispatchOut ["🚀 Autonomous Action Outputs"]
        SMS[Twilio SMS Alerts to First Responders]:::output
        VOICE[Synthetic Voice Phone Calls]:::output
        DASH[Live Incident Command Geospatial Map]:::output
    end

    A10 ==> SMS
    A10 ==> VOICE
    A10 ==> DASH
Loading

🤖 The 10-Agent Swarm: Roles & Output Contracts

Each agent is governed by deterministic Pydantic v2 schemas, eliminating hallucination in life-critical decision pathways:

# Agent Operational Responsibility Schema Contract / Output
01 Incident Understanding Extracts structured geo-coordinates, disaster taxonomy, and victim counts from chaotic distress messages. hazard_type, latitude, longitude, casualty_estimate
02 Disaster Intelligence Models rainfall rates, flood propagation speed, and structural integrity of surrounding bridges and power grids. flood_velocity_index, structural_hazard_score
03 Survivor Probability Applies mathematical survival decay functions based on water level, exposure duration, hypothermia, and age. survival_probability_score (0-100), critical_rescue_window_minutes
04 Medical Triage Applies standard START mass-casualty triage protocols across reported casualties. triage_category (RED | YELLOW | GREEN | BLACK)
05 Priority Scoring Computes a composite multi-factor rescue priority weighting. composite_priority_index (1-100)
06 Resource Allocation Calculates geodesic distances to dispatch nearest available flood rescue boats, ambulances, and NDRF teams. assigned_units, depot_id, estimated_eta_mins
07 Hospital Coordination Queries live hospital registries across Telangana to reserve ICU beds, burn units, and matching blood units. target_hospital_id, icu_bed_reserved, blood_bank_match
08 Risk Prediction Evaluates route access constraints (inundated underpasses, fallen electric poles) and recommends safe detours. impassable_roads, recommended_safe_corridor
09 Alert Communication Generates dynamic emergency SMS messages and synthesized speech scripts in Telugu, Hindi, and English. sms_payload, voice_ivr_script, target_recipients
10 Command Orchestrator Synthesizes all individual agent outputs into an immutable, verifiable, and auditable Master Dispatch Plan. master_rescue_plan_id, execution_log, audit_trail

📊 Terminal Simulation Preview

$ python trigger_demo.py --incident hyd-flood-001

[10:42:01] INGESTION: Distress Signal #hyd-flood-001 (Begumpet, Hyderabad | Water Level: 5.2ft)
[10:42:05] [Agent 01] Incident Understanding   :: Parsed 14 victims trapped on single-story roof. Lat: 17.444, Lon: 78.468.
[10:42:11] [Agent 02] Disaster Intelligence    :: Inundation rate +0.4 ft/hr. Drainage canal overflow detected.
[10:42:16] [Agent 03] Survivor Probability     :: Survival Probability: 78% | Critical window: 42 mins.
[10:42:20] [Agent 04] Medical Triage           :: 3 RED (Elderly hypothermia + Infant), 8 YELLOW, 3 GREEN.
[10:42:24] [Agent 05] Priority Scoring         :: Priority Index: 94/100 [CRITICAL EMERGENCY].
[10:42:29] [Agent 06] Resource Allocation      :: Dispatched NDRF Unit #03 (Sanathnagar) + 2 Advanced Life Support Ambulances.
[10:42:33] [Agent 07] Hospital Coordination    :: Reserved 3 ICU Beds at Gandhi Hospital (ETA: 11 mins).
[10:42:37] [Agent 08] Risk Prediction          :: Begumpet flyover underpass SUBMERGED. Routing via Prakash Nagar.
[10:42:41] [Agent 09] Alert Communication      :: Twilio SMS dispatched to NDRF Team Lead & 108 Base.
[10:42:44] [Agent 10] Command Orchestrator     :: ✅ Master Dispatch Plan #RP-9921 committed in 43.2 seconds.

🗺️ Telangana Emergency Infrastructure Datasets

RescueNet-AI is grounded in vetted, regional geospatial datasets:

  • 🏥 Hospitals & Trauma Units: Curated registry of 100+ public and private hospitals across Telangana with ICU bed quotas, burn units, and ventilator status.
  • 🩸 Blood Banks: Real-time regional blood bank registry with blood component inventory tracking.
  • 🚒 Fire Stations: Coordinates and equipment rosters of regional fire control stations equipped with high-capacity dewatering pumps.
  • 🚑 108 Emergency Response Ambulances: Geographic coordinates of primary ambulance staging points.
  • 🛡️ NDRF & SDRF Units: Battalion locations of specialized disaster and flood rescue squads.

Source datasets are normalized in database/emergency_assets_master.csv and seeded directly via database/emergency_assets.sql.


💻 Tech Stack & Engineering Specs

Languages & Core:      Python 3.11+, TypeScript, SQL, Bash
Agent Orchestration:   CrewAI, LangChain, Amazon Bedrock (Llama 3 / Claude 3)
Backend REST API:      FastAPI, Pydantic v2, SQLAlchemy, Uvicorn
Database:              PostgreSQL 15 (Production) / SQLite (Local Test Mode)
Telephony & Alerts:    Twilio API (Programmable SMS, Voice IVR, WhatsApp)
Geospatial Frontend:   Next.js 14, Tailwind CSS, Leaflet.js
Containerization & CI: Docker, Docker Compose, GitHub Actions, AWS EC2, AWS Amplify

🚀 Quickstart & Local Execution

1. Clone & Set Up Environment

git clone https://github.com/Vikram30069/RescueNet-AI.git
cd RescueNet-AI

2. Run with Docker Compose (Recommended)

docker-compose up --build
  • Interactive OpenAPI Swagger Docs: http://localhost:8000/docs
  • Service Health Status: http://localhost:8000/health

3. Local Python Execution

cd backend
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp ../.env.example .env
uvicorn app.main:app --reload --port 8000

(Default configuration runs in offline mock mode; no paid API keys required for testing).


🧪 Automated Testing

RescueNet-AI includes a comprehensive automated test suite verifying agent execution, health, and triage schema contracts:

cd backend
pytest tests/ -v
tests/test_health.py::test_health_check PASSED                        [ 14%]
tests/test_health.py::test_list_incidents_returns_seed_data PASSED     [ 28%]
tests/test_health.py::test_create_incident_success PASSED              [ 42%]
tests/test_health.py::test_agent_execute_with_seed_incident PASSED     [ 57%]
tests/test_health.py::test_list_hospitals_filter_by_city PASSED        [ 71%]
tests/test_health.py::test_list_resources_returns_seed_data PASSED     [ 85%]
tests/test_health.py::test_agent_log_populated_after_execute PASSED   [100%]
============================== 15 passed in 2.14s ==============================

📜 License

This project is licensed under the MIT License — see the LICENSE file for details.


RescueNet-AI • Architected by Vikram Banerjee • LinkedIn

About

Autonomous 10-Agent AI Orchestrator for real-time disaster coordination — ingests distress feeds, scores survivor risk, allocates regional emergency assets & dispatches automated Twilio alerts via FastAPI & CrewAI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages