CIRO AI (Crisis Intelligence & Response Orchestrator) is a world-class, multi-agent humanitarian emergency intelligence operating system engineered specifically for flood crisis coordination and tactical response management in Pakistan.
In extreme environmental crises, such as the devastating monsoon flash floods across Sindh, Punjab, and KPK, response timelines are crippled by fragmented communications, offline sectors, and static relief routing. CIRO AI acts as a unified cognitive bridge, synthesizing unstructured crisis inputs, satellite coordinates, dynamic weather telemetries, and localized multi-agent workflows into a responsive, mobile-first emergency dashboard.
- Cognitive Bridge: Transforms unstructured disaster inputs (e.g., raw SMS distress signals, distress radio feeds) into actionable structured emergency assets.
- Adaptive Relocalization: Synchronizes emergency workflows with a real-time Pakistan-wide database and localization layer supporting English, Urdu, Sindhi, Punjabi, Pashto, and Siraiki with native Right-to-Left (RTL) rendering.
- Resilient Infrastructure: Combines dynamic Live Web API endpoints (Gemini, OpenWeather, Firebase) with a robust offline local orchestration fallback, ensuring humanitarian operations remain fully functional during total cellular outages.
The CIRO AI demo simulates a localized disaster management and response grid under severe weather. The system ingests mock telemetry feeds, analyzes severity indexes, constructs optimized rescue pathways, and fires dynamic alerts. The entire workflow can be executed using the integrated developer macro 🚀 TRIGGER HACKATHON SECTOR FLOOD DEMO directly from the Home Dashboard.
[Injected Signal] ➡️ [Unified State Machine] ➡️ [8-Agent Orchestration Run] ➡️ [Mobile Dashboard Sync]
⬆️ │
└───────────────── [Adaptive Reevaluation Loop] <─────┘
- Ingestion: An unstructured emergency alert (e.g., SMS, radio transcription) is registered.
- Telemetry Sync: OpenWeather API retrieves the localized meteorological data for the sector.
- Specialized Pipeline execution: The 8 agents process the shared crisis state sequentially, evaluating risk, logistics, communication links, and medical hazards.
- Action Plan Generation: An optimized response matrix (dispatching boats/trucks, establishing HF radio nodes) is saved.
- Adaptive Reevaluation: The evaluationAgent continuously checks incoming weather updates. If precipitation limits are exceeded, it immediately triggers an emergency recalculation.
CIRO fuses 4 live signal sources before running the multi-agent pipeline:
| Source | Implementation | File |
|---|---|---|
| Weather API | OpenWeatherMap — live rainfall (mm/hr), wind speed, cloud cover | services/api.ts → getWeatherAlert() |
| YOLO Computer Vision | Gemini Vision API analyzes uploaded disaster images — returns severity, detected objects, flood type | services/gemini.ts → analyzeDisasterImage() |
| Emergency Calls | User-adjustable emergency call count fed into orchestration pipeline | hooks/useOrchestrationEngine.ts |
| Citizen SOS Reports | Rural SOS + Fire SOS forms with GPS coordinates, voice notes, and photo evidence | screens/RuralSOSReporting.tsx, FireSOSReporting.tsx |
The Ingestion Agent fuses all 4 sources before the Severity Agent calculates a composite confidence score. When signals conflict (e.g. weather shows heavy rain but a field report says "water main burst, not flooding"), the Severity Agent flags confidence as LOW and halts resource dispatch pending field verification.
- Multi-Agent Orchestration Engine: Manages the collaborative reasoning process of 8 specialized AI agents powered by the Gemini SDK.
- Dynamic Localization Framework: Built-in translation sheets for English, Urdu, Sindhi, Punjabi, Pashto, and Siraiki with full Right-to-Left (RTL) view flippers.
- Emergency Signal Ingestion: Transforms unstructured, panic-written distress texts into clean JSON telemetry objects with GPS extractions.
- Bilingual AI severity HUD: Highlights crisis severity (
CRITICAL,HIGH,MODERATE) with color-coded high-visibility styling based on real-time chat input scanning. - Interactive Offline FM Radio Tuner: Simulates a local receiver tuning from
87.5 MHzto108.0 MHzfeaturing static noise generators, active emergency channels, and real-time emergency override news alerts. - Dynamic Location Selector: Integrated Pakistan sectors modal matching coordinates dynamically across Karachi, Sukkur, Pir Jo Goth, Gilgit, Peshawar, Quetta, and Gwadar.
- Pure SVG Live Crisis Map: A super-lightweight vector map rendering evacuation grids, flooded zones, and real-time dispatch assets (boats, helicopters, logistics trucks) to conserve battery and bandwidth.
- YOLO Hazard Detection Portal: Integrated mock computer vision portal displaying active scanning lines and automated hazard bounding box matrices.
- Simulated Satellite SOS Dispatch: An animated satellite uplink panel simulating telemetry encryption, low-bandwidth handshakes, and contact notifications.
- Shared Crisis State Tracking: A centralized, state-machine schema displaying active execution traces in a clean JSON development console.
CIRO AI utilizes a modern decoupled Architecture separating a high-performance React Native client-side application from a localized Node.js Orchestrator API backend.
graph TD
App[React Native Mobile UI] --> |1. Select Location / SOS Trigger| State[User Context / Theme Context]
State --> |2. Execute Orchestration Request| API[services/api.ts]
API --> |3. POST /api/orchestrate| Express[Node.js Express Server]
subgraph Node.js Orchestrator API
Express --> |4. Load Base Telemetry| OpenWeather[OpenWeather API / Open-Meteo]
Express --> |5. Initiate Shared State| UnifiedState[(Unified Crisis State)]
UnifiedState --> |6. Run Agent Pipeline| Engine[8-Agent Pipeline Engine]
subgraph 8-Agent Pipeline Engine
ingestion[ingestionAgent] --> detection[detectionAgent]
detection --> severity[severityAgent]
severity --> rural[ruralRescueAgent]
rural --> planning[planningAgent]
planning --> notification[notificationAgent]
notification --> simulation[simulationAgent]
simulation --> evaluation[evaluationAgent]
end
Engine --> |7. Call LLM Layer| Gemini[Google Gemini API]
evaluation --> |8. Output final resolved JSON| Express
end
Express --> |9. Response Payload with Trace Logs| App
App --> |10. Animate Rings & Spliced Timeline| RenderUI[MultiAgentOrchestration / LiveCrisisMap]
When an operation is initiated, a single Unified Crisis State object is generated. Each agent acts as a specialized worker: it receives the current state, processes its reasoning against the Gemini LLM layer, appends its findings and suggested changes, and passes the updated state object to the next agent in the pipeline.
The cognitive core of CIRO AI is driven by 8 specialized AI agents coordinating their reasoning.
| Agent | Purpose | Reasoning Responsibilities | Inputs | Outputs | State Updates |
|---|---|---|---|---|---|
ingestionAgent |
Signal Normalization | Parses raw text alerts and normalizes GPS data, sector info, and hazard flags. | Unstructured SOS string. | Structured Ingestion JSON. | Populates crisisState.metadata and crisisState.location. |
detectionAgent |
Crisis Verification | Validates if the signal constitutes a real disaster scenario and maps the category. | Normalized metadata, weather. | Verification status, categories. | Sets crisisState.verified and crisisState.crisisType. |
severityAgent |
Risk Matrix Scoring | Evaluates medical conditions, age, and weather parameters to score risk limits. | User profile, local weather metrics. | Severity rank (CRITICAL, HIGH). |
Sets crisisState.severityScore. |
ruralRescueAgent |
Low-Bandwidth Routing | Identifies offline connectivity limits and selects satellite/radio nodes. | GPS coordinates, local sectors database. | Satellite node assignments. | Appends rural infrastructure flags. |
planningAgent |
Logistics Routing | Computes rescue asset requirements and assigns relief dispatch. | Active severity, geographic terrain. | Asset array (boats, trucks). | Populates crisisState.actionsPlan. |
notificationAgent |
Alert Routing | Prepares bilingual emergency notification payloads and target channels. | Verified assignments. | SMS/WhatsApp messaging bodies. | Appends outbound communication traces. |
simulationAgent |
Predictive Timeline | Simulates future state progression (e.g. rising water levels over 12 hours). | Weather forecasts, topographic slopes. | Simulated flood timeline array. | Populates predictive simulation logs. |
evaluationAgent |
Adaptive Reevaluation | Monitors thresholds. If metrics deteriorate, triggers a new plan calculation. | Final compiled plans, weather updates. | Reevaluation check (PASS/FAIL). |
Appends final execution approval flag. |
The unified orchestrator relies on a strict JSON schema that is updated sequentially across the 8-agent execution pipeline.
{
"crisisId": "CRISIS_2026_PK_091",
"status": "ORCHESTRATION_COMPLETED",
"metadata": {
"reporter": "Ahmed",
"timestamp": "2026-05-19T00:15:54Z",
"sourceChannel": "SOS_SMS_GATEWAY"
},
"location": {
"sectorName": "Sukkur Sector D",
"coordinates": {
"latitude": 27.7244,
"longitude": 68.8421
},
"terrainType": "Low-lying River basin"
},
"weatherDetails": {
"temperature": 28.4,
"precipitationRate": 42.5,
"windSpeed": 18.2,
"cloudCover": 98
},
"crisisVerification": {
"isRealDisaster": true,
"confidenceScore": 0.98,
"primaryHazard": "Riverine Flash Flood"
},
"severityMetrics": {
"level": "CRITICAL",
"score": 92,
"highRiskFactors": [
"Age: Elderly Resident",
"Medical: Pre-existing Asthma",
"Weather: Active Precipitation > 30mm/hr"
]
},
"infrastructureStatus": {
"cellularNetwork": "DOWN",
"primaryRoadAccess": "BLOCKED",
"suggestedCommChannel": "HF_RADIO_98.8_MHZ"
},
"actionsPlan": [
{
"actionId": "DISPATCH_BOAT_01",
"type": "EVACUATION",
"targetCoordinates": { "latitude": 27.7250, "longitude": 68.8430 },
"assignedAsset": "Zodiac Emergency Boat 03",
"etaMinutes": 25,
"status": "DISPATCHED"
},
{
"actionId": "ESTABLISH_COMM_NODE",
"type": "MESH_RADIO",
"targetFrequency": "98.8 MHz",
"assignedAsset": "Portable Solar FM Receiver Grid",
"etaMinutes": 10,
"status": "ACTIVE"
}
],
"notificationPayload": {
"targetPhone": "+923001234567",
"language": "ur",
"smsText": "🚨 ہنگامی الرٹ: سکھر سیکٹر ڈی میں سیلاب کی سطح بڑھ رہی ہے۔ ہنگامی انخلا کی کشتی روانہ کر دی گئی ہے۔ اندازاً وقت: 25 منٹ۔ ریڈیو 98.8 پر ٹیون کریں۔"
},
"predictiveTimeline": [
{ "hourOffset": 3, "predictedRainfall": 52.0, "estimatedFloodDepthMeters": 1.4 },
{ "hourOffset": 6, "predictedRainfall": 60.5, "estimatedFloodDepthMeters": 2.1 }
],
"evaluationCheck": {
"policyCompliant": true,
"requiresImmediateRecomputation": false,
"approvalSignature": "evaluationAgent::COMPLETED::PASS"
}
}{
"sosId": "SOS_982",
"profileData": {
"userName": "Ahmed",
"age": 62,
"bloodType": "O+",
"medicalConditions": "Asthma, Hypertension"
},
"gpsLock": {
"latitude": 27.3452,
"longitude": 68.9921
},
"alertTimestamp": "2026-05-19T00:15:54Z"
}{
"simulationId": "SIM_RUN_8812",
"targetSector": "Karachi Sector 3",
"simulations": [
{ "step": 1, "status": "Simulating rising monsoon runoff...", "criticality": "MODERATE" },
{ "step": 2, "status": "Urban storm drainage system saturation reached.", "criticality": "HIGH" },
{ "step": 3, "status": "Low-lying road crossings completely submerged.", "criticality": "CRITICAL" }
]
}- React Native Expo (v54.0.0): Cross-platform native mobile compilation.
- React Navigation: Highly responsive Stack navigation shell.
- Context API: Decentralized global state control for bilingual dictionaries and user medical profiles.
- React Native SVG: Zero-latency vector graphic rendering for local map telemetry.
- Node.js & Express: High-performance HTTP server managing the multi-agent pipeline routing.
- Localtunnel: Exposes local dev endpoints via a public proxy tunnel for on-device live testing.
- Google Gemini SDK: Core LLM driving cognitive agent evaluations.
- OpenWeather API: Live current weather and meteorological data querying.
- Firebase Authentication: Secure user login and emergency registration schemas.
In the CIRO AI architecture, specialized Google Antigravity multi-agent orchestration principles are applied to solve the challenging problem of coordinated, sequential cognitive reasoning during humanitarian crises:
- Agent Specialization: Instead of using a single complex prompt, we break down disaster management into 8 distinct agents. Each agent acts as a specialized system node with localized, high-fidelity system prompts tailored for their tasks (e.g. logistics, communication links, severity levels).
- Unified Shared State Machine: Antigravity concepts govern how state is securely maintained. The orchestrator locks the shared state JSON, preventing race conditions. Agents read from the shared state, process their reasoning, write their updates to the specific JSON path, and hand it off to the next processing ring.
- Orchestration Traces: To ensure complete transparency for emergency headquarters, the system maintains a running trace of reasoning paths. Every agent appends its strict execution logs and verification checks directly to the crisis payload, creating an auditable, step-by-step reasoning timeline.
To ensure high-fidelity realism during the hackathon demo, CIRO AI integrates both real-world production APIs and simulated local services:
- Google Gemini Developer API: Used to power the natural language crisis analysis, reasoning pipelines, and interactive AI emergency advisor.
- OpenWeather Current Weather API: Live, real-time meteorological metrics (temperature, precipitation rain rate in mm/hr, wind speed, and cloud cover).
- Firebase API Auth Services: Validates secure responder accounts.
In extreme flooding, actual cellular networks, NDMA dispatch grids, and localized traffic channels are completely destroyed or isolated. To emulate realistic behavior under these conditions, the server hosts local simulation engines:
- Flood Telemetry Engine: Computes synthetic topographic flood progression rates based on rainfall.
- Rural Connectivity Engine: Simulates offline satellite pings and HF radio mesh antenna connectivity states.
- Rescue Dispatch Engine: Tracks synthetic coordinates for rescue helicopters, evacuation boats, and supply trucks.
Follow this complete step-by-step sequence to run both the Node.js orchestrator API server and the React Native mobile client locally.
- Install Node.js (LTS Version 18+).
- Install Git.
- For Mobile Testing: Download the Expo Go app on your physical Android Device or open an Android Emulator.
- Open your terminal and navigate to the backend server directory:
cd c:/Users/Ahmed/CIRO_AI/server - Install the backend package dependencies:
npm install
- Expose your backend server to the internet using Localtunnel so your physical phone can talk to the backend over the air. In a separate terminal run:
(Keep this terminal running! Your server is now accessible globally at
npx localtunnel --port 3000 --subdomain ciro-emergency-os-dev
https://ciro-emergency-os-dev.loca.lt). - Start your Express backend server:
(Your backend is now actively listening on port 3000).
npm start
- Open a new terminal and navigate to the project root folder:
cd c:/Users/Ahmed/CIRO_AI - Install mobile dependencies:
npm install
- Open your .env file and ensure your keys are configured:
EXPO_PUBLIC_GEMINI_API_KEY=your_gemini_key_here EXPO_PUBLIC_WEATHER_KEY=your_weather_key_here EXPO_PUBLIC_GOOGLE_MAPS_KEY=your_maps_key_here
- Start the Expo development server in Local Host mode:
npx expo start --localhost --go
- Set up USB forwarding (highly recommended for zero-latency testing on physical phones):
adb reverse tcp:8081 tcp:8081
- Open Expo Go on your physical phone, and tap the active link:
👉
http://127.0.0.1:8081
To generate an installable Android .apk file for your hackathon submission:
- Install EAS CLI globally:
npm install -g eas-cli
- Configure your build profile:
eas build:configure
- Build the preview APK in the Expo cloud:
eas build --platform android --profile preview
Create a secure .env file in the root folder of the mobile project matching the structure below:
# Google Gemini Developer Key
EXPO_PUBLIC_GEMINI_API_KEY=AIzaSy...your_gemini_key_here
# OpenWeatherMap Key (Corrected Signature)
EXPO_PUBLIC_WEATHER_KEY=cc8f6fa435...your_weather_key_here
# Google Maps / Cloud Key (Corrected Signature)
EXPO_PUBLIC_GOOGLE_MAPS_KEY=AIzaSy...your_maps_key_here
# Backend Settings (Configured for local dev)
PORT=3000
LT_SUBDOMAIN=ciro-emergency-os-dev- Injected Signal: "Extremely heavy rain in Karachi Sector 3. Low-lying streets completely flooded. Water level rising fast. Local storm drainage has failed."
- Agent Logic:
detectionAgentverifies the urban flooding threat.severityAgentflags risk asHIGH.planningAgentreviews drainage bottlenecks and schedules logistics truck dispatches. - Adaptive Action: Spliced weather feeds alert urban residents of drainage blockages.
- Injected Signal: "Monsoon river surge has broken the Nowshera rural canal. Cell towers are down. Road access completely cut off. Need immediate rescue boat."
- Agent Logic:
ruralRescueAgentidentifies cellular failure and recommends immediate switch to satellite routing.severityAgentassigns aCRITICALrank.planningAgenttriggers an active search route on the SVG map. - Adaptive Action: Overrides FM radio tuner channel
98.8 MHzwith real-time audio wave notifications.
- Injected Signal: "Heavy rain continuing across multiple sectors in Sukkur and Gilgit. Mountainous mudslides blocking regional highway access."
- Agent Logic: The
evaluationAgentmonitors rainfall values. If the precipitation threshold exceeds 40mm/hr, it fails the validation, forces plan deletion, and triggers immediate recomputation.
CIRO AI features a customized, panic-friendly, mobile-first design built for stressful real-world conditions:
- Large Touch Targets: Action buttons and SOS selectors feature minimum dimensions of
64x64dpto prevent user mis-clicks during panic or rain-splattered screens. - High-Contrast Color HUDs: Text sizes and border colors utilize sharp, color-coded contrasts (Crimson, Amber, Emerald) indicating active severity states clearly in bright sunlight or low-light storm environments.
- Bilingual RTL Support: Perfect support for Perso-Arabic regional scripts (Urdu, Sindhi, Punjabi, Pashto, Siraiki) with complete view flips for natural navigation flow.
- Offline Mode Transitions: Seamless interface switches when network connections fail, utilizing locally stored mock telemetry blocks to avoid frozen screens.
- Synthetic Data ONLY: All citizen data, coordinates, phone numbers, and crisis reports shown inside the application are 100% synthetic. No real citizen identities or addresses are stored or processed.
- Simulation Disclaimer: CIRO AI is a functional hackathon prototype designed for educational demonstration purposes. It is NOT connected to live public emergency services (like NDMA, 1122, or Police) and should not be used as an active emergency distress system in real life.
- Mock Notifications: Simulated SMS and WhatsApp payloads are displayed locally inside the orchestration developer console rather than triggering real-world carrier SMS integrations.
- Average Execution Latency: Server-side 8-agent pipelines complete sequential execution in approximately 2.4 seconds when using the high-performance Gemini API model.
- Caching & Optimization: OpenWeather API responses are cached in-memory for 10 minutes to minimize API quota consumption.
- Mobile Framework Performance: Rendered SVG maps and animated UI transitions maintain a fluid, smooth 60 FPS refresh rate.
- Low-Cost Strategy: The entire backend architecture is ready to run on free-tier hosting (e.g. Render, Railway) combined with Google AI Studio's free-tier API quotas.
- Production NDMA Gateway Integration: Establish verified API integrations with the National Disaster Management Authority (NDMA) to map emergency alerts to real military and NGO responders.
- Drone Telemetry Mapping: Wire live drone video feeds directly into the computer vision YOLO screen for dynamic hazard analysis.
- Satellite LoRa Telemetry Mesh: Integrate physical hardware LoRa radio antennas (e.g. Meshtastic) for genuine, off-grid peer-to-peer data mesh networking.
- Multilingual Voice AI: Implement real-time voice-to-text translators for regional dialects, enabling rural citizens to voice their SOS signals in Sindhi or Pashto directly.
| Feature | Baseline Emergency Workflow | CIRO AI Orchestrated Workflow |
|---|---|---|
| Coordination Model | Manual phone calls, fragmented WhatsApp chats, paper checklists. | Unified, sequential 8-agent AI orchestrator. |
| Response Timelines | Hours or days due to slow information synthesis. | Sub-second structured triage and routing. |
| Connectivity | Complete blackout when cellular networks fail. | Resilient HF FM radio mesh tuner & satellite simulation. |
| Relief Allocation | Static, pre-planned routes with zero flexibility. | Dynamic dispatch (boats/trucks) based on real GPS metrics. |
| Crisis Tracking | Hand-written status logs, siloed records. | Unified JSON State with auditable pipeline trace logs. |
While highly functional, the CIRO AI prototype has the following technical limits:
- Synthetic Dispatching: The dispatch assets (boats, rescue teams) are simulated local entities, and are not mapped to real-world GPS trackers.
- Geospatial Boundaries: Live map routes utilize simplified coordinates bounding boxes rather than fully validated GIS terrain contours.
- Keystore Variables: Native Google Maps builds require standard Google API console registrations to compile beyond developer emulator devices.
Developed with passion by a dedicated engineering team for the Google AI Seekho 2026 Hackathon (Pakistan):
- Aadil Memon: Team Lead, Full Stack AI Developer & Agentic AI Developer
- Muskaan Fayyaz: AI Agentic Developer
- Afaq Ul Islam: Front End & React Native Developer
A special thanks to the Google AI Seekho team for providing the technical foundation to build humanitarian solutions utilizing the power of Gemini.
CIRO AI is designed as a humanitarian AI coordination prototype exploring how multi-agent orchestration systems can improve disaster intelligence, emergency communication, and adaptive rescue planning workflows in Pakistan. By bridging complex backend systems with highly accessible, localized mobile frontends, we aim to build a resilient grid for community safety during environmental crises. 🌊💚
If you find CIRO AI helpful, please consider showing your support:
- Star this repository ⭐ to help others discover it.
- Share the project with fellow developers or friends.
- Report bugs or request features 🐛 by opening a GitHub Issue.
- Buy Me a Coffee ☕ to support ongoing development!
