An AI-powered application that predicts migraine risk 6-24 hours ahead by analyzing your sleep patterns, vital signs, calendar events, and weather conditions.
Migraines are unpredictable and debilitating. People need:
- Early warnings to take preventive action before an attack
- Understanding of what triggers their migraines and why
- Personalized insights based on their unique health patterns
- Actionable recommendations to reduce risk
Current solutions don't intelligently combine multiple data sources or explain the physiological mechanisms behind risk predictions.
This system uses specialized AI agents to analyze your health data and provide:
- Risk Prediction - A 0-100 risk score with low/medium/high classification
- Multi-Domain Analysis - Combines sleep, vitals, calendar, and weather data
- Scientific Explanations - Explains WHY you might get a migraine (not just that you might)
- Personalized Recommendations - Actionable advice tailored to your profile and triggers
- Early Warning System - Watchdog alerts when risk factors are detected
- AI Assistant During Migraines - When you have a migraine, an AI agent calls you to help with tasks you can't do yourself
- Sleep Agent: Analyzes sleep duration, efficiency, stages, and awakenings
- Vitals Agent: Monitors heart rate, HRV, blood pressure, and SpO2
- Calendar Agent: Identifies stressful events and busy periods
- Weather Agent: Assesses environmental factors (barometric pressure, etc.)
- Coordinator Agent: Synthesizes all insights into a holistic risk assessment
- User Profiles: Default, sensitive, and resilient profiles with different risk thresholds
- Baseline Learning: Learns your personal baselines from historical data
- Trigger Tracking: Remembers your known migraine triggers
- Adaptive Thresholds: Adjusts warnings based on your sensitivity level
- Real-time Risk Dashboard: Live risk score with agent-by-agent breakdown
- Calendar Warnings: Upcoming stressful events with risk explanations
- Health Chatbot: Ask questions about your health data and get personalized answers
- Voice Onboarding: ElevenLabs-powered conversational setup
- History Dashboard: View trends and patterns over time with interactive charts
- Watchdog Status: Alert system (OK, Alert, Happening, Passed) with popup controls
- Email to GP: Pre-drafted email to share your risk assessment with healthcare providers
- Migraine Feedback: Log actual migraine events to improve predictions
When you have a migraine, the AI calls you to help with tasks you can't do yourself:
When a migraine strikes, you're often unable to handle everyday tasks. The AI assistant will call you and help with:
- Cancelling or rescheduling events - Meetings, appointments, social plans
- Ordering comfort food - Food delivery, groceries, or medications
- Messaging contacts - Quick texts to let people know you're unavailable
- Calling loved ones - Reaching out to family or friends for support
- Arranging transportation - Getting rides if needed
- Any other assistance - Whatever you need help with during the attack
No more struggling to cancel meetings or order food while dealing with a migraine. The AI handles it for you.
- Research-Backed: Analysis based on peer-reviewed migraine research
- Mechanistic Explanations: Explains physiological pathways (neurochemistry, vascular reactivity)
- Compound Risk Modeling: Understands that multiple factors multiply risk (not just add)
- Prodromal Recognition: Identifies 24-72 hour warning signs before attacks
# Install dependencies
cd backend
pip install -r requirements.txt
# Create .env file
echo "OPENAI_API_KEY=your_key_here" > .env
# Run the server
python app.pyBackend runs on http://localhost:5001
# Install dependencies
cd frontend
npm install
# Create .env.local file
echo "NEXT_PUBLIC_API_URL=http://localhost:5001" > .env.local
echo "NEXT_PUBLIC_ELEVENLABS_AGENT_ID=your_agent_id" >> .env.local
# Run the development server
npm run devFrontend runs on http://localhost:3000
- Backend: Python 3.11+, Flask, LangChain, OpenAI GPT-4o-mini
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- Voice: ElevenLabs Conversational AI
- Storage: Local JSON files (easily migratable to database)