Sentinel - Emergency Action Planner

Sentinel is an AI-driven emergency action planner that evaluates critical situations and provides clear, actionable safety guidance in real time.


💡 Inspiration

Emergency situations are inherently chaotic. When faced with a fire, medical emergency, or natural disaster, people often freeze or make poor decisions due to panic and information overload. The inspiration came from a simple but powerful question: "What if everyone had an emergency response expert in their pocket?"

I wanted to create something that could:

  • Reduce panic through calm, AI-generated guidance
  • Provide structure when chaos reigns
  • Democratize emergency response knowledge - making expert-level safety planning accessible to everyone
  • Leverage AI for good - using Amazon Nova's reasoning capabilities to analyze situations and generate contextual safety plans

With Amazon Nova's advanced language understanding and reasoning, this vision became NovaSafe - an AI companion that helps people navigate their most critical moments with confidence and clarity.


🎯 What it does

Sentinel is an AI-powered emergency response planner that transforms chaotic situations into structured action plans. Here's how it works:

User Input:

  • Location (where the emergency is happening)
  • Situation description (what's going on)
  • Optional photo context (visual details)

Sentinel Analyzes and Provides:

  1. Risk Level Assessment - Categorizes as LOW, MODERATE, HIGH, or CRITICAL
  2. Risk Summary - Brief, clear explanation of the situation
  3. Step-by-Step Action Plan - Prioritized steps with time estimates
    • Each step tagged as CRITICAL, HIGH, or MEDIUM priority
    • Clear time estimates (Immediate, 30 seconds, 1-2 minutes, etc.)
  4. Calming Message - Reassuring guidance to reduce panic
  5. Emergency Resources - Relevant contact numbers and support services

Key Features:

  • Real-time AI analysis using Amazon Nova Pro
  • Contextual responses based on situation keywords (fire, medical, etc.)
  • Color-coded risk levels for quick visual assessment
  • Clean, calming UI designed for people under stress
  • Mock mode for demos without AWS costs

🛠️ How we built it

Architecture

User Input → FastAPI Backend → Amazon Nova (Bedrock) → Structured Response → Next.js UI

Tech Stack

Backend (Python):

  • FastAPI for REST API
  • Boto3 for AWS Bedrock integration
  • Pydantic for data validation
  • Custom prompt engineering for emergency contexts

Frontend (JavaScript):

  • Next.js 14 with React
  • Component-based architecture
  • Inline CSS for simplicity
  • Responsive design

AI Integration:

  • Amazon Nova Pro v1:0 via Bedrock
  • Converse API for natural interactions
  • Temperature: 0.3 (for consistent safety advice)
  • Structured JSON output parsing

Development Process

  1. Initial Concept - Started with a complex decision simulator
  2. Pivot - Simplified to focused emergency planner (70% less code!)
  3. Prompt Engineering - Iterated 10+ times to get reliable, structured responses
  4. UI Design - Focused on calming colors and clear hierarchy
  5. Mock Mode - Added intelligent fallbacks for demos
  6. Testing - Verified Nova integration and response quality

Key Implementation Details

Smart Prompt Construction:

def _build_emergency_prompt(location, situation, photo_description):
    # Guides Nova to provide:
    # - Risk assessment
    # - Prioritized action steps
    # - Calming guidance
    # - Emergency resources
    # All in structured JSON format

Contextual Mock Responses:

  • Keywords trigger appropriate responses (fire → evacuation plan)
  • Risk levels adapt to situation severity
  • Realistic action plans for common emergencies

🚧 Challenges we ran into

Challenge 1: AWS Bedrock Configuration

Problem: Initial 500 errors when calling Nova API. Credentials were configured but requests were failing.

Solution:

  • Implemented comprehensive error handling
  • Added mock data mode for development without AWS
  • Created test script (test_nova.py) to verify connection
  • Documented clear setup instructions

Challenge 2: Prompt Engineering for Safety

Problem: Early prompts generated inconsistent responses - sometimes too technical, sometimes missing critical information, occasionally not in proper JSON format.

Solution:

  • Lowered temperature to 0.3 for more consistent outputs
  • Added explicit JSON structure requirements in prompt
  • Included "calm message" field to reduce panic
  • Iterated on prompt structure 10+ times
  • Tested with various emergency scenarios

Challenge 3: UI Design for Crisis Situations

Problem: Initial design used aggressive red colors that increased anxiety rather than reducing it.

Solution:

  • Switched to calming purple/blue gradient background
  • Used color-coding strategically (green → yellow → orange → red for risk levels)
  • Prioritized readability and clear visual hierarchy
  • Added prominent calming messages
  • Used emoji icons for friendly, approachable feel

Challenge 4: Scope Management

Problem: Started building a complex multi-step decision simulator with too many features and navigation flows.

Solution:

  • Pivoted to focused emergency planner
  • Removed unnecessary complexity
  • Result: Simpler codebase, clearer purpose, more demo-able
  • "Do one thing and do it well" philosophy

Challenge 5: Balancing AI with Responsibility

Problem: How to provide helpful AI guidance without replacing professional emergency services?

Solution:

  • Added clear disclaimers about calling 911 for life-threatening situations
  • Included emergency contact resources in every response
  • Designed prompts to encourage professional help when needed
  • Positioned as "guidance" not "instructions"

🏆 Accomplishments that we're proud of

  1. Real-World Impact Potential - Built something that could genuinely help people in crisis situations

  2. Successful Nova Integration - Leveraged Amazon Nova's reasoning capabilities to generate contextual, structured emergency responses

  3. Thoughtful UX Design - Created a calming interface specifically designed for people under stress

  4. Rapid Pivot - Recognized scope issues early and successfully simplified to a more powerful concept

  5. Responsible AI Implementation - Balanced AI capabilities with appropriate disclaimers and professional resource recommendations

  6. Clean Architecture - Built a maintainable, scalable system with clear separation of concerns

  7. Demo-Ready - Implemented mock mode so the app can be demonstrated without AWS costs

  8. Complete Documentation - Comprehensive README, setup instructions, and project story


🎓 What we learned

Technical Learnings

About Amazon Nova:

  • Nova Pro's reasoning abilities excel at structured problem-solving
  • Lower temperature settings (0.3) produce more consistent, reliable outputs
  • The Converse API provides clean, conversational interactions
  • Structured JSON output requires explicit prompt engineering

About Prompt Engineering:

  • Specificity matters - vague prompts get vague responses
  • Including output format examples dramatically improves consistency
  • Temperature significantly affects response reliability
  • Iterative refinement is essential

About Full-Stack Development:

  • FastAPI makes Python backend development incredibly fast
  • Next.js simplifies React development with great defaults
  • CORS configuration is critical for local development
  • Environment-based configuration enables flexible deployment

Design Learnings

UI/UX for Crisis Situations:

  • Color psychology is powerful - blues calm, reds alarm
  • Information hierarchy is critical when users are stressed
  • Visual clarity trumps aesthetic complexity
  • Calming messages should be prominent, not hidden

Product Development:

  • Simplification often leads to better products
  • "Do one thing well" beats "do many things poorly"
  • Early pivots save time and improve outcomes
  • Demo-ability matters for hackathons

AI Ethics

  • AI should augment, not replace, professional services
  • Clear disclaimers are essential for safety-critical applications
  • Responsible AI means knowing when to defer to humans
  • Accessibility and clarity matter more than sophistication

🚀 What's next for Sentinel

Immediate Enhancements

  1. Image Analysis - Use Nova's vision capabilities to analyze emergency photos

    • Assess fire severity from images
    • Identify hazards in photos
    • Provide visual context to action plans
  2. Multi-language Support - Emergency guidance in user's native language

    • Critical for diverse communities
    • Leverage Nova's multilingual capabilities
  3. Location Services - Auto-detect location and provide local emergency numbers

    • GPS integration
    • Local resource recommendations
    • Region-specific guidance

Medium-Term Goals

  1. Voice Interface - Hands-free operation during emergencies

    • Voice input for situation description
    • Audio readback of action plans
    • Critical for accessibility
  2. Offline Mode - Cached common emergency responses

    • Works without internet connection
    • Pre-loaded action plans for common scenarios
    • Essential for disaster situations
  3. Follow-up Guidance - Post-emergency recovery steps

    • Insurance claim guidance
    • Trauma support resources
    • Recovery checklists

Long-Term Vision

  1. Community Features - Share anonymized emergency experiences

    • Learn from real situations
    • Improve AI responses over time
    • Build community resilience
  2. Integration with Emergency Services - Direct connection to 911/local services

    • Automatic location sharing
    • Situation pre-briefing for responders
    • Faster, more informed response
  3. Wearable Integration - Apple Watch, Fitbit, etc.

    • Quick access during emergencies
    • Health data integration for medical emergencies
    • Fall detection triggers
  4. Enterprise Version - For businesses and organizations

    • Custom emergency protocols
    • Workplace-specific guidance
    • Compliance with safety regulations

Research & Development

  • Continuous Learning - Improve responses based on real usage
  • Expert Validation - Partner with emergency response professionals
  • Clinical Studies - Measure impact on emergency outcomes
  • Accessibility - Ensure usability for people with disabilities

📊 Impact Potential

Target Users: Everyone with a smartphone
Use Cases: Home emergencies, workplace incidents, natural disasters, medical situations
Social Impact: Democratizes emergency response expertise
Scalability: Cloud-native architecture ready for millions of users

Built With

Share this project:

Updates