An AI-powered, multi-agent emergency response system that detects medical anomalies in real time and delivers reliable alerts across multiple channels, designed with real-world healthcare constraints in mind.
Medical emergencies such as severe tachycardia, hypoxia, or sudden vitals deterioration often go unnoticed until it is too late. Existing systems are typically:
- Reactive instead of proactive
- Dependent on a single notification channel
- Fragile under real-world constraints (telecom regulations, network failures, regional restrictions)
Goal: Build a reliable, intelligent, and explainable emergency-response companion that can detect anomalies early and ensure alerts reach caregivers without a single point of failure.
We propose an AI-driven, multi-agent healthcare companion that:
- Continuously monitors patient vitals (simulated / real-time)
- Detects anomalies using intelligent agents
- Performs medical severity classification (triage)
- Identifies nearby hospitals and estimates ETA
- Sends alerts via redundant notification channels
- Gracefully handles real-world failures (SMS blocking, auth issues, missing channels)
Reliability is treated as a first-class design constraint, not an afterthought.
Vitals Stream
↓
Vital Monitor Agent
↓
Medical Agent (Risk + Triage)
↓
Orchestrator Agent
↓
Routing Agent ──→ Nearest Hospital + ETA
↓
Notification Agent
↓
SMS | WhatsApp | Push | Webhook
Each agent is loosely coupled, independently testable, and replaceable.
- Continuously processes vitals (HR, SpO₂, etc.)
- Detects deviations from patient baseline
- Performs medical triage and severity classification
- Generates explainable medical reasoning using an LLM
- Central decision-maker
- Coordinates agents and ensures fail-safe execution
- Identifies nearest medical facilities
- Estimates ETA based on location
- Sends alerts across multiple channels
- Implements graceful fallback logic
- SMS (Twilio – demo only)
- WhatsApp (Twilio – demo only)
- Push Notifications (planned)
- Webhooks (supported)
In many regions (e.g. India), SMS delivery is regulated (DLT) and may fail silently.
Our system:
- Differentiates “SMS sent” vs “SMS delivered”
- Treats SMS as best-effort, not guaranteed
- Is designed to fall back to other channels automatically
This reflects real-world deployment readiness, not idealized assumptions.
Twilio is used temporarily for demonstration and testing purposes only.
-
SMS / WhatsApp delivery may be restricted by regional regulations
-
Phone numbers must be verified on Twilio (trial accounts)
-
In real-world deployments, this module would be replaced with:
- Government-compliant SMS gateways
- Hospital paging systems
- Secure push notification services
The system architecture is provider-agnostic — Twilio is not a hard dependency.
- Python
- FastAPI
- Uvicorn
- SQLite (local auth DB)
- Twilio API (temporary demo integration)
- Ollama (local LLM inference)
- React
- Vite
- Modular component-based architecture
-
Ollama (local inference)
-
Used for:
- Medical reasoning
- Triage explanation
- Decision justification
-
Vitals cross a critical threshold
-
System detects anomaly
-
Medical agent classifies severity (e.g. Severe Tachycardia – High Risk)
-
Routing agent identifies nearest hospital + ETA
-
Alerts are dispatched via:
- Webhooks
- SMS / WhatsApp (best-effort, demo only)
-
All actions are logged and visible on the dashboard
Create a .env file in the project root:
TWILIO_SID=ACxxxxxxxxxxxxxxxxxxxx
TWILIO_TOKEN=xxxxxxxxxxxxxxxxxxxx
TWILIO_NUMBER=+1xxxxxxxxxx
EMERGENCY_PHONE=+91xxxxxxxxxx🔹 Notes
.envis not committed to the repository- Twilio credentials are optional if SMS is not required
- The system will continue functioning even if SMS is disabled
Ollama must be running in the background:
ollama serveEnsure your required model is available:
ollama pull llama3llama run phi3From the project root:
pip install -r requirements.txt
uvicorn backend.main:app --reload --port 8000cd frontend
npm install
npm run devFrontend runs at:
http://localhost:5173
| Service | Purpose |
|---|---|
| Ollama | LLM inference for medical reasoning |
| FastAPI backend | Core logic & agents |
| Frontend (Vite) | Dashboard & visualization |
| Twilio (optional) | Demo SMS / WhatsApp |
- Multi-agent intelligence (not a monolith)
- Reliability-first system design
- Explainable medical reasoning
- Graceful degradation under failures
- Designed for real-world healthcare constraints
Nihar Sagar G
Seepana Rishita
Emergency AI Healthcare Companion
- Interdisciplinary collaboration across AI, systems, and frontend
- Built with scalability, ethics, and reliability in mind
Healthcare systems must function when conditions are worst.
This project is not just a prototype — it is a resilient, thoughtful blueprint for intelligent emergency response systems.
Thank you for your time and consideration.