Sanjit Misra

Resilio

demo2026

AI coaching for cardiac recovery between clinic visits, with clinical safety that doesn't depend on the model.

Next.js · Deno · Supabase · Claude

Safety layers
3, one fails closed
Emergency path
no LLM
Invariants
8
Data
synthetic only
Model
Claude: coach and judge
A medication question; the boundary guard blocks the unsafe draft
A patient asks about skipping a dose. The unsafe draft never reaches them, and the trace shows why.
A question routed to the care team with a templated reply
Anything clinical gets routed to the care team. The reply is a template, not free generation.

Cardiac rehab works, and most patients drop out between visits. Resilio is an agent that keeps them engaged with daily check-ins, exercise coaching, and symptom and medication tracking, while exercise physiologists supervise from a dashboard.

The engineering problem is the boundary. The agent can be warm and conversational about engagement. Everything clinical runs through deterministic gates.

Three layers between the model and a cardiac patient

Every reply

  1. Draft

    Claude, warm and conversational

  2. Lexicon guard

    medication, dosing and diagnosis terms

  3. Judge

    Claude again; when unsure, it blocks

  4. Patient
  5. After the fact

    a classifier re-reads what was sent

An emergency

  1. Warning signs
  2. Escalation

    plain code, no model anywhere on this path

  3. Care team

Memory

  1. What it learns

    timing, channel, framing

  2. Fence

    enforced where data is read; clinical thresholds are off limits

  3. Audit log

    every change, including the rejected ones

  • a model
  • deterministic code
  • a person
  • data
  • Three layers. A lexicon guard, then a Claude judge that fails closed, then a classifier that checks what was actually sent.
  • Emergencies skip the model. The top escalation tier is plain code.
  • Memory has a fence. The agent can learn how a patient likes to be talked to: timing, channel, framing. It can't touch a clinical threshold. That's enforced where the data is read, not in the prompt, and every memory change is logged, including the rejected ones.

Built as a demo on synthetic data only, with a live pipeline trace so a clinician can see exactly why the agent said what it said.