💡 Inspiration Half of all cardiac rehab patients drop out before finishing — most of them around Week 8, when the initial fear fades and the long grind sets in. They're not failing because they don't care. They're failing because they feel alone.
Cardiac recovery is one of the most vulnerable experiences a person can go through. Yet between clinical visits, patients are largely on their own — no one checking in, no one celebrating small wins, no one to call at 2am when anxiety spikes. We wanted to change that. HeartPath was built on a simple belief: recovery is a relationship, not a checklist.
❤️ What It Does HeartPath is a 24/7 AI cardiac rehabilitation companion that guides patients through their full 12-week recovery journey. At its heart is Compass — a warm, conversational AI that remembers your story, adapts to your emotional state, and is always there when your care team isn't.
Key capabilities include:
Real-time safety monitoring — Compass detects red-flag symptoms (chest pain, dizziness, shortness of breath) and instantly alerts the care team, while guiding the patient to stop, rest, and call for help Vital tracking with auto-alerts — logs heart rate, blood pressure, and oxygen saturation, triggering clinical alerts when thresholds are crossed Voice conversations — powered by Gemini Live for patients who prefer talking over typing The Heart Journey — a 7-stage visual milestone system that makes progress feel real and celebratory Proactive check-ins — Compass reaches out first, suggests weather-aware activities, and remembers what matters to each patient Care team dashboard — real-time vitals, mood trends, and critical alerts in one view for clinicians 🛠️ How We Built It HeartPath is built on a modern full-stack architecture designed for both performance and safety:
Frontend: Next.js 16 App Router with React 19 and Tailwind CSS v4, animated with Framer Motion for physics-based UI transitions AI Companion: GPT-4o-mini via the OpenAI API, with a carefully engineered system prompt that gives Compass its personality, boundaries, and autonomous tool-use rules Voice: Google Gemini Live for real-time bidirectional audio conversations Agent Tools: A suite of callable tools — logVitals, flagAlert, addAgentNote, sendFamilyUpdate, and more — that let Compass take meaningful clinical actions mid-conversation State Management: React Context with localStorage persistence to maintain patient history across sessions Components: shadcn/ui design system for accessible, consistent UI The safety protocol was architected as the highest-priority layer — no matter what else Compass is doing, symptom detection always wins.
🧱 Challenges We Ran Into Designing AI autonomy with clinical guardrails was our biggest challenge. Compass needed to be warm and conversational, yet also act immediately and precisely in safety-critical moments. Getting that balance right — knowing when to act vs. when to ask — required many iterations of the system prompt and tool-use rules.
Gemini Live integration for real-time voice was technically complex. Streaming bidirectional audio while simultaneously surfacing agent notes and maintaining session context pushed the limits of what we could wire together at hackathon pace.
The "Week 8 problem" was also a design challenge — building engagement features (streaks, milestone cards, grace days) that feel genuinely motivating without feeling trivial or game-ified in a medical context. The line between delightful and inappropriate is thin in healthcare UX.
🏆 Accomplishments That We're Proud Of A safety protocol that actually works end-to-end: symptom detection → patient guidance → automatic care team alert → dashboard notification, all in a single conversation turn An AI companion that feels human — Compass doesn't respond like a chatbot; it responds like someone who knows you and cares about your recovery The Heart Journey visualization — watching an animated heart grow stronger across 7 stages is something patients genuinely respond to emotionally Building a full dual-interface product — both the patient-facing app and the clinical care team dashboard — in hackathon time A transparent agent notes system that shows patients exactly what Compass is documenting, building trust through visibility rather than hiding the AI's work 📚 What We Learned Safety and warmth are not opposites. The most effective design decision we made was treating the safety protocol not as a warning system, but as an act of care. Compass doesn't alarm patients — it guides them. Agentic AI in healthcare requires humility. There's a meaningful difference between a tool that acts and a tool that decides. We learned to be very deliberate about where Compass stops and the clinician begins — Compass logs, alerts, and supports; it never diagnoses. Engagement is emotional, not just behavioral. Streaks and points matter, but what really keeps people coming back is feeling seen. The hardest part of this build wasn't the code — it was designing empathy at scale. 🚀 What's Next for HeartPath Real wearable integration — pulling live heart rate and SpO₂ data from Apple Watch and Fitbit to remove manual vital entry Clinician customization — letting care teams set patient-specific vital thresholds and milestone targets Family companion mode — a lightweight view for caregivers to follow progress and send encouragement Longitudinal insights — surfacing patterns across the full 12 weeks to help clinicians intervene before dropout, not after Clinical validation study — partnering with a cardiac rehab program to measure whether HeartPath actually moves the 50% dropout number
Built With
- vercel
Log in or sign up for Devpost to join the conversation.