An AI-powered Emergency Operations Copilot built with Snowflake CoCo CLI that assists disaster response agencies in assessing risks, recommending actionable directives, and reliably notifying affected communities through an audited Job Execution Engine.
Sentinel AI is an enterprise decision-support platform engineered for Emergency Operations Centers (EOCs) and Local Disaster Risk Reduction and Management Offices (LDRRMOs).
Instead of operating as a simple alerting interface, Sentinel AI acts as an AI Copilot that ingests real-time disaster telemetry, evaluates flood risks against official Standard Operating Procedures (SOPs), calculates population impact radii, recommends tactical resource deployments, and dispatches audited multi-channel public warnings via a resilient Job Execution Engine.
[ Data Ingestion ] βββΊ [ Risk Assessment ] βββΊ [ Impact Analysis ]
Weather, Sensors CoCo CLI & Cortex Barangays, Census
β
βΌ
[ Dispatch Engine ] βββ [ Tiered Guardrail ] βββ [ Recommendation ]
Automated Fast-Path Automated vs. Manual Tactical Directives
During natural disasters (typhoons, flash floods, monsoon surges), disaster commanders operate under tight time constraints. Emergency response teams face critical bottlenecks:
- Fragmented Data Silos: Meteorological forecasts, river sensor levels, census databases, and shelter capacity lists are scattered across isolated systems.
- Manual Assessment Delays: Officers spend precious time manually collating data before issuing evacuation warnings.
- Inconsistent Alert Quality: Broadcast advisories lack standardized local dialect translation or clear action directives.
- Unreliable Notification Delivery: Generic messaging channels lack delivery tracking, retry mechanisms, or progress status.
Sentinel AI integrates domain-specific data and decision patterns into a unified operational canvas:
- Real-World Operational Grounding: Built directly around official disaster response SOPs and incident management workflows.
-
Automated Fast-Path Telemetry Breach Alerts: When telemetry breaches critical thresholds (river level
$\ge 8.0\text{m}$ or rainfall$\ge 150\text{mm}$ ), the system automatically queries Snowflake Cortex Search, cites matching SOP sections, and dispatches public advisories & responder staging alerts. - Tiered Operator Guardrail Architecture: Distinguishes zero physical risk automated warnings (Fast-Path) from physical asset deployments (Guardrailed Manual Directives requiring 1-click commander validation).
- End-to-End Decision Support: Manages the complete lifecycle from data collection to AI reasoning, human-in-the-loop approval, multi-channel dispatch, idempotency locking, worker retries, and audit logging.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Live Telemetry Ingestion β
β (Open-Meteo Weather, River Sensors, Barangays, Census) β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Snowflake DB Platform β
β (river_sensors, weather_data, SENTINEL_SOPS) β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FastAPI Backend Service β
β β
β 1. Telemetry Breach Check: (water_level >= 8.0m or rainfall >= 150mm) β
β Trigger Automated Fast-Path SOP RAG Auto-Drafting & Auto-Dispatch β
β β
β 2. Retrieve SOP Context via Cortex Search: β
β SELECT SNOWFLAKE.CORTEX.SEARCH_PREVIEW('SENTINEL_SOP_SEARCH_SERVICE', %s) β
β β
β 3. Generate Grounded AI Advisory: β
β SELECT SNOWFLAKE.CORTEX.AI_COMPLETE('claude-3-5-sonnet', %s) β
ββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Tiered Operator Guardrail UI β
β β‘ Fast-Path Automated (Zero Physical Risk) β
β π‘οΈ Guardrailed Manual (Physical Asset Deployment) β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Multi-Channel Job Execution Engine β
β β’ Single-Request Idempotency Locks (HTTP 409) β
β β’ Exponential Backoff Retries & Jitter β
β β’ Live WebSocket Streaming to Notification Console β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The copilot's intelligence and domain workflows are configured in coco/agent.yaml using the Snowflake CoCo CLI specification:
name: SentinelAI
description: AI-powered Emergency Operations Copilot helping disaster response agencies assess risks, recommend actions, and reliably notify affected communities.| Skill Name | Purpose | Domain Inputs | Output Metrics & Directives |
|---|---|---|---|
weather_intelligence |
Retrieves active precipitation, wind speed, & forecasts. | location, date |
Rainfall (mm), PAGASA storm classification, meteorological forecast narrative. |
flood_risk_assessment |
Computes real-time flood alert level (Red/Orange/Yellow/Normal). | rainfall, river_level, historical_flooding |
Alert level, statistical confidence score, threshold explanation. |
population_impact |
Aggregates impacted demographic metrics across barangays. | barangays |
Estimated residents, households, and vulnerable sectors requiring evacuation. |
resource_recommendation |
Recommends tactical deployment assets based on risk level. | risk_level, affected_population |
Recommended swift-water rescue teams, inflatable boats, ambulances, & shelters. |
alert_generator |
Crafts localized multi-channel advisories in English & Tagalog. | alert_level, recommended_actions, affected_areas |
160-char SMS copy, formal HTML email advisory, and public press statement. |
notification_dispatcher |
Launches multi-channel alert campaign via Job Execution Engine. | messages, channels, recipients_filter |
Tracking job_id, initial queue status, and audit execution log. |
The platform relies on a centralized operational data warehouse schema in Snowflake (SENTINEL_AI_DB.PUBLIC):
SENTINEL_AI_DB.PUBLIC
βββ weather_data (timestamp, location, rainfall, wind_speed, storm_name, forecast)
βββ flood_history (barangay, date, severity, water_level)
βββ river_sensors (sensor_id, barangay, water_level, timestamp, latitude, longitude)
βββ barangays (barangay, city, population, latitude, longitude)
βββ evacuation_centers (name, capacity, current_occupancy, barangay, latitude, longitude)
βββ hospitals (hospital, beds_available, barangay, latitude, longitude)
βββ citizen_contacts (phone, email, barangay)
βββ audit_logs (event, event_type, timestamp)
βββ execution_jobs (job_id, status, messages, channels, recipients_filter, logs, counts)
βββ execution_tasks (task_id, job_id, type, payload, status, retry_count)
βββ chat_history (id, session_id, role, content, metadata, created_at)
- Schema Definition:
snowflake/setup_1_schema.sql - Seed Telemetry:
snowflake/setup_2_seed.sql(pre-loaded with realistic Zamboanga City disaster telemetry) - Cortex Search Service:
snowflake/setup_3_cortex_search.sql(SOP reference table & vector search) - Cortex Semantic View:
snowflake/setup_4_semantic_view.sql(Cortex Analyst Text-to-SQL view) - Cortex Agent Creation:
snowflake/setup_5_cortex_agent.sql(Agent specification, orchestration, and staged skills) - PAT Authentication:
snowflake/pat_auth.sql(Optional Cortex CLI auth policy & PAT token setup) - Analytical Verification:
snowflake/select.sql(Verification & query checks)
-
Telemetry Breach Detection: Automatically triggers when updated river sensor level
$\ge 8.0\text{m}$ or rainfall$\ge 150.0\text{mm}$ . -
SOP RAG Auto-Drafting: Queries Snowflake Cortex Search (
SENTINEL_SOP_SEARCH_SERVICE) and feeds context to Cortex AI (claude-3-5-sonnet) to generate:- Localized Public Advisory SMS (<160 chars) + HTML Email.
- Technical First Responder Staging Alert ("STAND BY & GEAR UP: Deploy crews to staging stations in Tumaga / Sta. Maria").
- Cited SOP rule section (logged to
audit_logswith event typefast_path_execution).
- Auto-Dispatch: Automatically dispatches warning jobs without waiting for manual commander input.
- β‘ Fast-Path Automated Directives (Zero Physical Risk): Displays Public Multi-Channel Warnings & Responder Staging Notifications as
β‘ AUTO-EXECUTED & STAGEDwith live timestamp. - π‘οΈ Guardrailed Manual Directives (Physical Asset Deployment): Displays physical commitment directives (e.g., "Deploy 6 Inflatable Rescue Boats to Sector 3", "Open Evacuation Gymnasiums") requiring explicit 1-Click Approve & Deploy commander validation.
- Anti-Duplicate Protection: Central request lock cache checking
Idempotency-Keyheaders or payload hashes (recipients_filter+messages). Rejects duplicate submissions withHTTP 409 Conflict. - Atomic Database Persistence: Enforces atomic state transitions in
_persist_job_state. - Exponential Backoff Retries: Wraps SMS and Email dispatchers with max 3 retries, 2s base delay, and random jitter, streaming retry logs over WebSockets.
- Ask free-form operational questions or use quick-action prompt buttons ("What is the flood risk?", "What should we do?", "Notify affected residents").
- Grounded responses powered by Snowflake Cortex LLM with SOP Search RAG over official disaster guidelines.
- Session transcript history stored in Snowflake
chat_history.
- Rendered using MapLibre GL with dark/light EOC theme options.
- Dynamic Risk Zone Polygons: Computed dynamically on the backend (
map.py) based on active high-risk river sensors and barangay spatial coordinates. - Interactive map layers: Flood Risk Zones, Evacuation Centers, Hospitals, and River Sensor Stations with real-time WebSocket telemetry updates.
- Persists all AI risk assessments, fast-path SOP executions, human directive approvals, and broadcast job dispatches to Snowflake
audit_logs. - One-click JSON Incident Report Exporter for post-disaster agency debriefs.
- Typhoon Surge: Severe precipitation triggers 185mm rainfall and river sensor
ZAM-TUMAGA-01reaches 8.5m (exceeding 8.0m Critical Threshold). - Fast-Path Auto Trigger: Sentinel AI automatically cites
SOP-FL-04 Section 3.2, logs afast_path_executionaudit event, and dispatches public SMS/Email advisories and responder staging notifications. - Operator Overview: Commander reviews the Tiered Guardrail UI:
- β‘ Fast-Path Section: Shows public warnings and responder staging as
β‘ AUTO-EXECUTED & STAGED. - π‘οΈ Guardrailed Section: Displays physical deployment directives ("Deploy 6 Inflatable Rescue Boats to Sector 3").
- β‘ Fast-Path Section: Shows public warnings and responder staging as
- Human Approval & Dispatch Execution: Commander clicks "Approve & Deploy" -> The Job Execution Engine locks request idempotency, dispatches worker jobs with exponential backoff retries, and streams live delivery progress to the console.
| Layer | Technology | Key Capabilities |
|---|---|---|
| AI Copilot Orchestration | Snowflake CoCo CLI | Agent Skills specification (agent.yaml), domain constraints, and workflow routing. |
| LLM & Search Platform | Snowflake Cortex | SNOWFLAKE.CORTEX.AI_COMPLETE, AGENT_RUN, and Cortex Search for SOP RAG retrieval. |
| Data Platform | Snowflake DB | Centralized operational telemetry, census data, spatial coordinates, and audit logs. |
| Backend API | FastAPI (Python 3.12) | Asynchronous REST endpoints, WebSockets, Structlog, and Pydantic validation. |
| Background Processing | Celery & Redis | Asynchronous weather ingestion worker tasks with fast-path triggers & retry protection. |
| Frontend UI | React.js (TypeScript) | Modern EOC layout, Tailwind CSS design tokens, MapLibre GL, Recharts analytics. |
| Real-Time Streaming | WebSockets | Live stream of river sensor updates and job dispatch execution logs. |
| Notification Engine | Job Execution Engine | Multi-channel SMS & Email worker dispatcher with idempotency locks & exponential retries. |
| Authentication & Security | Firebase Auth & FastAPI Dependency | Google OAuth 2.0 Sign-In, Firebase Bearer Token verification, and protected FastAPI endpoints. |
sentinel/
βββ README.md # Product documentation & setup guide
βββ .cortex/
β βββ agents/
β βββ SentinelAI.yaml # Snowflake Cortex / CoCo CLI Agent & Skills specification
βββ snowflake/
β βββ setup.sh # Automated Snowflake setup shell script
β βββ setup_1_schema.sql # Step 1: Database schema DDL setup
β βββ setup_2_seed.sql # Step 2: Initial telemetry & census seed data
β βββ setup_3_cortex_search.sql # Step 3: SOP table & Cortex Search Service setup
β βββ setup_4_semantic_view.sql # Step 4: Semantic View DDL for Cortex Analyst Text-to-SQL
β βββ setup_5_cortex_agent.sql # Step 5: Cortex Agent DDL with staged skills & tool specifications
β βββ pat_auth.sql # Snowflake PAT authentication policy & token setup
β βββ select.sql # Verification & validation SQL queries
β βββ skills/ # Individual SKILL.md definition directories
βββ backend/
β βββ pyproject.toml # Python dependencies (managed via uv)
β βββ tests/ # Pytest suite (test_jobs, test_main, test_rate_limit)
β βββ app/
β βββ main.py # FastAPI application entrypoint
β βββ api/ # REST & WebSocket endpoints (copilot, map, jobs, audit, ingestion)
β βββ core/ # Configuration & Celery app initialization
β βββ services/ # Copilot Service, Job Execution Service, Audit Service
β βββ tasks/ # Celery background ingestion worker tasks
βββ frontend/
βββ package.json # Node dependencies
βββ vite.config.ts # Vite build configuration
βββ src/
βββ App.tsx # EOC Shell with Dark/Light theme toggle & navigation bar
βββ components/ # Dashboard components (ChatInterface, DisasterMap, RecommendationPanel, etc.)
βββ hooks/ # Custom React hooks (useTelemetryWebSocket)
- Python:
3.12+withuvinstalled - Node.js:
v18+andnpm - Snowflake Account: (Optional for production Cortex LLM execution; offline mock fallback is included out of the box)
Execute the setup scripts in sequential order inside your Snowflake Worksheets / Dashboard, or run the automated shell script via SnowSQL CLI:
./snowflake/setup.shManual Execution Order (Snowsight Worksheets):
- Schema Setup: Run
snowflake/setup_1_schema.sqlto initializeSENTINEL_AI_DBdatabase, schema, and operational tables. - Seed Data: Run
snowflake/setup_2_seed.sqlto populate initial telemetry, barangay census metrics, evacuation centers, and hospital beds. - PAT Authentication Setup: Run
snowflake/pat_auth.sqlto configure authentication policy (pat_auth_policy) and generate Programmatic Access Tokens for Cortex CLI. - Cortex Search: Run
snowflake/setup_3_cortex_search.sqlto set up SOP reference tables and createSENTINEL_SOP_SEARCH_SERVICE. - Semantic View: Run
snowflake/setup_4_semantic_view.sqlto createSENTINEL_SEMANTIC_VIEWfor Cortex Analyst Text-to-SQL querying. - Cortex Agent: Run
snowflake/setup_5_cortex_agent.sqlto stage skills and create theSentinelAICortex Agent. - Verify Installation: Run
snowflake/select.sqlto test telemetry, RAG search preview, and Cortex Agent execution.
-
Navigate to the backend directory:
cd backend -
Install Python dependencies using
uv:uv sync
-
Configure environment variables (
.env):DEFAULT_JURISDICTION_CITY=Zamboanga City DEFAULT_JURISDICTION_REGION=Zamboanga Peninsula DEFAULT_MAP_LATITUDE=6.9214 DEFAULT_MAP_LONGITUDE=122.0790 # Optional Snowflake Credentials (falls back gracefully to offline mock if placeholder) SNOWFLAKE_USER=placeholder_user SNOWFLAKE_PASSWORD=placeholder_password SNOWFLAKE_ACCOUNT=placeholder_account SNOWFLAKE_DATABASE=SENTINEL_AI_DB SNOWFLAKE_SCHEMA=PUBLIC
-
Run the FastAPI development server:
uv run fastapi dev
The backend API will run on
http://localhost:8000. -
Run test suite:
uv run pytest
To run asynchronous weather ingestion workers:
cd backend
uv run celery -A app.core.celery_app worker --loglevel=info(You can also trigger manual Celery telemetry syncs directly from the dashboard header button).
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install Node dependencies:
npm install
- Configure environment variables in
frontend/.env(refer tofrontend/.env.example):VITE_FIREBASE_API_KEY=your_firebase_api_key VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id VITE_FIREBASE_APP_ID=your_app_id
- Run the development server:
npm run dev
- Access the Sentinel AI Platform at
http://localhost:5173.- Unauthenticated Users: View the interactive 1-way scroll landing page and EOC Workflow Simulator with zero backend database queries.
- Authenticated Commanders: Click "SIGN IN WITH GOOGLE" to authenticate and access the live Command Center Dashboard.
The custom agent definition is configured in .cortex/agents/SentinelAI.yaml (and ~/.snowflake/cortex/agents/SentinelAI.yaml).
To run the Cortex Agent with the SentinelAI custom specification:
cortex --agent SentinelAIΒ© 2026 Sentinel AI. Built with Snowflake CoCo CLI, Snowflake Cortex, FastAPI, and React.