MEDUSA

Medical Emergency Dispatch & Unified Support Architecture

An Ambient Alexa+ Voice Assistant with Autonomous Emergency Protocol Orchestration


💡 Inspiration: The Fatal Mistake in Medical Emergencies

In India—especially in villages, towns, and suburban areas—big multi-specialty hospitals are not everywhere.

When a sudden emergency like a heart attack strikes at 2:00 AM, panic takes over. The family doesn't think—they quickly put the patient into an auto-rickshaw or car and rush to the nearest local clinic or nursing home.

But when they arrive 15 minutes later, the clinic tells them:
"We don't have a heart specialist or ICU here tonight. You have to take him to the city hospital 20 km away."

In that moment of blind guessing, the "Golden Hour" is lost.


The Real Problem: Going Fast to the WRONG Hospital

In emergency medicine, the first 60 minutes—known as the Golden Hour—decide whether a patient lives or dies. With a heart attack or stroke, every 10 minutes of delay causes permanent damage.

The biggest killer in an emergency is not just speed; it is blindly rushing to a hospital that cannot treat the patient.

Why Existing Systems Fail in Panic

When your father collapses in front of you, your hands shake. You cannot:

  • Search Google Maps while trying to read which clinic has an open Cath Lab or ICU.
  • Remember his exact diabetes or blood pressure medications.
  • Call family members one by one to tell them what happened.
  • Guide CPR while holding a phone.

The Big Question

We looked at the Amazon Echo already sitting in millions of homes and asked:

What if Alexa wasn't just for playing music and setting timers? What if the moment you scream *"Alexa, Dad collapsed!"*, she instantly knows his medical profile, speaks calm first-aid steps, alerts your entire family, and routes you to a hospital that actually has the right equipment ready?

That is why we built MEDUSA.


🎙️ What MEDUSA Does: From Everyday Companion to Life-Saving "Protocol"

An Amazon Echo in your home shouldn't feel like a scary hospital terminal. During everyday life, it should just be Alexa—playing your music, telling jokes, giving weather updates, and keeping your family company.

MEDUSA turns Alexa into an ambient guardian with two distinct modes:


Mode 1: Friendly Everyday Companion (Zero False Alarms)

  • Speaks with Alexa's warm, natural conversational personality.
  • Uses an Ambient Intent Classifier to ensure everyday expressions like "I'm bored to death" or "I had a killer workout" never trigger false alarms.
  • The Echo light ring stays calm cyan.

Mode 2: Emergency "Protocol 0" (Instant Autonomous Action)

The instant someone screams "Alexa, Dad collapsed, he's clutching his chest!", Alexa immediately transforms into a calm, authoritative medical director. Her light ring pulses amber/red, and an autonomous multi-agent swarm executes in seconds:

  1. Instant Kinship & Patient Lookup (Amazon DynamoDB):
    Alexa resolves "Dad" into his actual medical records in under 50ms: Rajesh Kumar, age 58, known hypertension, diabetic, takes Metformin.

  2. Real-Time First Aid Guidance:
    Alexa asks if he is breathing and conscious. She gives immediate spoken CPR and airway instructions ("Keep him flat on his back, gently tilt his head back, do not give water").

  3. Guaranteed Family Broadcast (AWS SNS):
    Simultaneously sends emergency SMS alerts with verified GPS coordinates to all family emergency contacts ("Rajesh Kumar has collapsed. Responders dispatched.").

  4. Live Hospital Discovery (SerpAPI + Google Maps):
    Bypasses closed clinics and static lists. Scans real-time driving traffic and confirms which nearby hospital actually has an open 24/7 Cardiac ICU and Cath Lab.

  5. Ambulance Dispatch & Pre-Arrival Handoff (Amazon S3):
    Dispatches an ambulance and uploads a digital Clinical Handoff Document to Amazon S3, alerting the receiving emergency room doctors before the patient even arrives.


🎙️ The Journey: Bringing the Future of Alexa+ to Life

Why We Built MEDUSA

We named our system MEDUSA (Medical Emergency Dispatch & Unified Support Architecture). In mythology, Medusa is recognized for her multi-tentacled reach—similarly, in our system, a single spoken prompt to Alexa unleashes multiple autonomous agent arms executing in parallel: clinical triage, real-time hospital discovery, family SMS alerts, ambulance dispatch, and smart home automation.


Our Access Journey: Choosing Innovation Over Giving Up

When the Amazon Developer Hackathon kicked off, our first goal was to build a native Alexa+ Add-on using the new Model Context Protocol (MCP) toolkit. We eagerly applied for developer private preview access through Amazon Developer Support (Support Case #25757568).

When we learned that the developer console is currently marked "Coming Soon" while access is rolled out to early enterprise partners, we faced a choice: wait on the sidelines, or build the future ourselves.

Amazon Support Case 25757568 Figure 1: Our application for the Alexa+ developer preview (Support Case #25757568).

Alexa Developer Console Coming Soon Figure 2: The Alexa+ Add-on Developer Console ("Coming Soon" for general access).

We chose to build. We embraced the hackathon's Simulated Alexa+ Experience path to demonstrate exactly how autonomous agents will transform everyday smart homes when the Alexa+ platform opens publicly.


⚡ What We Created

Instead of cutting corners, we built the entire end-to-end architecture:

  1. A Production-Spec Self-Hosted MCP Server:
    Built strictly to the 2025-11-25 MCP Specification, running over Streamable HTTP (SSE) at /mcp. It exposes 38 production tools that any frontier LLM or future Alexa+ add-on runtime can connect to today.

  2. A Simulated Multi-Modal Alexa+ Console:
    A full-duplex React 19 + TypeScript web experience featuring hands-free speech recognition (STT), Alexa speech synthesis (TTS), an animated Echo light ring that dynamically reflects ambient vs. emergency states, and a real-time visualizer of the AI agent swarm's thoughts and actions.


⚙️ How We Built It: Architecture & Stack

MEDUSA System Architecture

The Technology Stack Behind MEDUSA:

  • Model Context Protocol (MCP Spec 2025-11-25): Self-hosted over Streamable HTTP (SSE) via FastAPI, exposing 38 production tools across 10 operational domains.

  • AWS Serverless Infrastructure:

    • Amazon DynamoDB: Sub-10ms persistence for patient medical history and active incident state machines.
    • AWS SNS: Instant multi-target SMS broadcast with verified GPS markers sent to all family ICE contacts.
    • Amazon EventBridge & CloudWatch: Decoupled asynchronous event pipeline and immutable clinical audit logs.
    • Amazon S3: Encrypted storage for structured Clinical Handoff payloads with 15-minute expiring presigned URLs.
    • AWS Amplify: Global edge CDN hosting for the React 19 + TypeScript Command Center.
  • SerpAPI (Google Maps Engine): Live hospital discovery verifying 24/7 operating status, active Cath Labs, and real-time driving traffic.

  • Groq Inference Engine: Sub-second reasoning loop powered by Qwen-3.8-27B for instant voice triage responses.


🛠️ The 38 Production MCP Tools (Spec 2025-11-25)

Our self-hosted Model Context Protocol server runs over Streamable HTTP (SSE) at /mcp, exposing 38 production tools across 10 operational domains:

Domain & Service Tools Autonomous Capability
1. Patient Memory (Amazon DynamoDB) resolve_kinship
get_patient_context
get_emergency_contacts
get_important_location
analyze_drug_interactions
Resolves natural voice utterances ("Dad") into EHR profiles; flags fatal drug contraindications (e.g. Aspirin vs. bleed risk).
2. Clinical Triage (Medical Engine) assign_triage_priority
calculate_gcs_score
stream_biometric_vitals
record_observation
Assesses clinical urgency (CRITICAL), computes Glasgow Coma Scale (3–15), and ingests live wearable vitals (HR, SpO2, ECG).
3. Incident State Machine (DynamoDB) create_incident
get_incident_status
update_incident
update_clinical_state
get_incident_timeline
close_incident
Drives atomic state transitions across the crisis lifecycle with sub-10ms cloud persistence.
4. Care Intelligence (SerpAPI Google Maps) search_care_resources
recommend_care_resource
verify_cath_lab_availability
query_trauma_blood_inventory
reserve_emergency_bed
Bypasses closed clinics to verify open 24/7 cardiac ICUs and Cath Labs, reserving beds prior to arrival.
5. Transport & Corridors (Logistics) coordinate_transport
calculate_route_traffic_delta
request_green_corridor_signal
Dispatches emergency ambulances with live ETA countdowns and requests municipal traffic signal preemption (Green Wave).
6. Smart Home IoT (Ring & Echo) unlock_smart_door_for_ems
broadcast_household_intercom
silence_ambient_appliances
Unlocks smart deadbolts for first responders, broadcasts alerts across household Echoes, and mutes TVs for acoustic clarity.
7. Communications (AWS SNS) notify_emergency_contacts
trigger_voice_call
get_notification_status
Blasts automated emergency SMS alerts with verified GPS coordinates to all designated ICE contacts simultaneously.
8. Community Responders (Good Samaritan) find_nearby_helpers
request_helper_assistance
get_helper_status
Alerts nearby CPR-certified neighbors or off-duty nurses to start chest compressions before the ambulance arrives.
9. Clinical Handoff (Amazon S3) generate_handoff
get_handoff
share_handoff
export_handoff
export_audit_telemetry
Compiles pre-arrival physician handoff documents and generates tamper-evident, cryptographically hashed (SHA-256) audit trails.
10. Operations Command (Tactical Telemetry) get_incident_activity Streams live responder coordinates, tool execution feeds, and swarm state to the operator command center.

🚧 Challenges We Faced

  1. The Alexa+ Private Preview Barrier:
    When we learned that the official Alexa+ Add-on Developer Console was marked "Coming Soon" and restricted to enterprise partners (Support Case #25757568), we had to pivot quickly. Instead of abandoning the track, we embraced the official Simulated Alexa+ Experience path, engineering a full-duplex voice console paired with an uncompromising, spec-compliant remote MCP server.

  2. Bidirectional Streaming Over HTTP in Web Browsers:
    Native browser EventSource is strictly unidirectional GET. To handle client-to-server responses during multi-turn agent conversations without dropped frames, we engineered a dedicated FastAPI streaming bridge (/api/trigger-emergency) that cleanly synchronizes SSE events with backend MCP tool executions.

  3. Inaccurate Static Hospital Registries:
    Initial tests with static government registries showed fatal flaws: facilities listed as "Hospitals" were often outpatient clinics with no nighttime cardiac catheterization labs. We solved this by integrating SerpAPI's Google Maps engine directly into MCP tools, querying real-world 24/7 operating status, active specialties, and real-time driving traffic.


🏅 Accomplishments We're Proud Of

  • 38 Production MCP Tools: Built and validated according to the official 2025-11-25 Model Context Protocol specification, running over Streamable HTTP.
  • Dual-Mode Ambient Intent Router: Achieved zero false positives on everyday casual complaints ("I'm bored to death", "I feel exhausted"), while guaranteeing instant Protocol 0 escalation on genuine clinical danger.
  • Sub-Second AWS Architecture: Sub-10ms reads and writes in Amazon DynamoDB, and automated AWS SNS SMS alerts received on personal mobile phones within 1.2 seconds of tool invocation.
  • 100% Open Source: Fully licensed under the permissive MIT License with comprehensive setup documentation for complete reproducibility.

📚 What We Learned

  • Model Context Protocol (MCP) in Practice: How to design clean, deterministic tool interfaces where autonomous LLM swarms can execute real-world actions safely without hallucination.
  • Ambient Voice UX Design: Emergency systems cannot be terrifying, cold medical devices. They must live as warm, natural home companions during 99.9% of everyday life—and instantly step up with calm authority during the 0.1% crisis.
  • Resilient State Machine Orchestration: Coordinating distributed state across fast-moving voice interactions using Amazon DynamoDB, EventBridge, and CloudWatch.

🚀 What's Next for MEDUSA

  • Official Alexa+ Store Add-on: Packaging and submitting MEDUSA as an official Alexa+ add-on the moment public developer access opens.
  • Smart City Traffic Integration: Partnering with municipal traffic management systems to deploy real-world Green Wave preemption for dispatched ambulances.
  • Ambient Sensor Ingestion: Connecting with wearable ECGs and ambient room radar (e.g., Echo acoustic fall detection) to trigger Protocol 0 autonomously even when a patient is alone and unable to speak.

Built With

Share this project:

Updates

Submission history