Project Info
Inspiration
Our motivation for creating Cadence came from personal experience and loss. Members in our team have family and friends who have experienced pregnancy with complications, as well as pregnancies that turned into tragedy. At the time (and even now) we didn't know every clinical detail, any early warning signs were, and what could have been caught or acted on sooner. What we do know all too well is what came after: not only physical recovery, but emotional impact that the family and us carry to this day. From our research, we realized that this situation isn't all that rare. In the US, roughly 1 in 5 pregnancies involves a complication like preeclampsia, gestational diabetes, or preterm birth, and an estimated 6–8% are formally classified as high-risk - which translates to around 30,000 to 50,000 women a year. For every death related to pregnancy, there are 70 to 80 more women who survive a near-death event tied to pregnancy complications. This is the population we decided to build Cadence for because such an event is not a rare tragedy. If science, data, and intelligence can but a structural blind spot affecting hundreds of thousands of families a year. The pattern is almost always the same: the warning signs were there: rising blood pressure, recurring headaches, sudden swelling; but a high-risk patient sees her OB once every two weeks and has nothing in between. No structured check-in. No one watching. That 10–14 day silence is where preventable harm happens.
What it does
Cadence is a proactive AI companion that watches high-risk pregnancies in the gap between doctor visits—catching complications before they become emergencies, and handing doctors a complete picture before they walk in. Our one engine is able to face both the patient and their OB team, allowing for more informed check ins and a wholistic view of the pregnancy process. For the patient, Cadence is a warm, daily check-in which avoids the stereotypical sterile and anxiety inducing medical dashboard. Our patient reports her blood pressure, symptoms, and how she's feeling in plain conversation. Cadence shows her a personalized "Things to Watch For" card pulled specifically from her own care plan, her symptom history so far ("9 check-ins completed, no red flags"), and a "Take to Your Appointment" summary she can walk in with to better address any concerns a pregnant mother may forget out of stress. If something crosses a threshold, she's never shown a scary alert, but a notification that her doctor has been notified. For the OB, Cadence is a briefing tool that turns a 15-minute appointment into one where the doctor already knows what has happened. A risk-ranked patient panel surfaces the 3 patients out of 50 who need attention right now. Pattern detection will flag trends a human might miss across a long dialogue of messages. For example: "BP trending up over 4 days, headaches mentioned 3 of the last 9, increasing frequency." Every risk score comes with a plain-English rationale and suggestions for discussion, so that before the doctor even opens their charts, Cadence suggests conversation starters like "Ask about headache severity. Consider a 24-hour urine protein test." When a real red flag appears, Cadence generates a structured clinical summary and pushes a zero-PHI alert straight to the clinician's browser. This kind of support would usually take 12 days, but now it can come to fruition in the same night.
How we built it
Our team built one engine, two faces, with three people. Claude (Anthropic) is the brain of Cadence: it ingests a care plan from a photo or PDF using vision and turns it into structured protocol JSON, runs the daily check-in conversation through a tool-use loop, classifies risk against a clinical rubric, detects multi-day patterns, and generates both the patient- and clinician-facing visit summaries. Redis holds everything stateful: session history, symptom logs, the risk timeline, and a RAG vector store over each patient's specific care plan—so every answer Cadence gives is grounded in her document, not a generic guess. Arize Phoenix traces every single agent decision, and an LLM-as-judge eval runs on every escalation, scoring whether it was clinically appropriate—so nothing about the system is a black box. FastAPI + Pydantic power the backend; Vite + React + TanStack Router + Tailwind power two distinct frontends—a warm, wellness-app-style patient experience and a clean, clinical dashboard for the OB. Web Push delivers the escalation alert to the clinician's browser with zero protected health information in the payload. Before writing a line of code, we agreed on every data schema and API endpoint as a team, then split the work by layer rather than by feature—one person owned the AI brain (prompts, condition packs, risk logic, evals), one owned backend infrastructure (FastAPI, Redis, the agent loop), and one owned both frontends and demo execution. That meant nobody was ever blocked waiting on someone else.
Challenges we ran into
We spent a lot of time thinking through catching issues vs. calming patients. The patient can never see a scary alert which would cause unnecessary anxiety, but the clinician can never miss a real signal. This kind of tension is exacerbated by the fact that it's the exact same underlying data informing both of these 'types' of actions we have to take. We had to design two completely different emotional treatments of one risk score. We also aren't 100% health experts. We know that we aren't allowed to directly diagnose patients, which is a complicated ask of a medical support platform. We decided upon the process that Cadence prepares and collects data, but that ultimately the doctor decides. We hard-blocked diagnostic language at the system-prompt level and kept a licensed clinician as the only one who makes the actual call, even when the AI flags something serious. Making a non-deterministic system demo-able. Live LLM calls don't always say the same thing twice, which is a problem on a stage with a clock running. We built a "golden path" of pre-cached responses so our core demo flow is fast and reliable every single time, with live calls still running underneath for everything outside that path. Saying no to our own roadmap. The platform vision is large—more condition packs, voice check-ins, EHR integration. We had to keep cutting back to one condition, one check-in loop, one escalation flow, and two views, and trust that a focused demo beats a broad one.
Accomplishments we're proud of
A full closed loop, start to finish: a care plan goes in as a photo, a patient has a real conversation, a risk is detected, a clinician gets a structured alert, and a doctor walks into the room already briefed — all on real data, no mocks. An AI system that's auditable, not a black box: every agent decision is traced in Arize, and every escalation is independently scored by a second model call before a human ever sees it. A product that treats two very different users with two very different needs—without duplicating the underlying intelligence that powers both. Getting the emotional tone right. "Things to Watch For" reads like care, not a warning label. The patient sees support; the doctor sees signal. Doing the homework to ground this in reality rather than vibes—the billing pathway (Medicaid RPM CPT codes), the market precedent (Babyscripts), and the actual prevalence numbers behind "high-risk pregnancy" all shaped the product, not just the pitch.
What we learned
The hardest part of building in healthcare isn't model capability — it's restraint. A system that can catch real danger without ever frightening the person it's monitoring takes more careful prompt design than raw intelligence. Grounding beats cleverness. RAG over a patient's own care plan made every Cadence response traceable to a real source, and that traceability is what actually makes a system trustworthy to a clinician. Trust has to be built, not claimed. Saying "you can audit this" means nothing without an actual audit trail—that's what pushed us to wire up tracing and an LLM-as-judge eval on every single escalation rather than just describing the idea. A surprising share of the work was non-technical: understanding what "high-risk pregnancy" actually means clinically, learning the real prevalence numbers instead of assuming, and figuring out what an OB needs to see in the first 15 seconds of an appointment.
What's next
A second condition pack on gestational diabetes to prove the platform generalizes beyond one diagnosis to any structured care plan. This would allow generalizability across the many different possible cases in healthcare. A real voice check-in option which takes place in the form of a friendly phone call, for older patients who'd rather talk than type. Direct EHR integration so a care plan never has to be manually uploaded. Clinical validation with a real OB or maternal health practice, moving from synthetic demo data to a pilot with real (consented, BAA-covered) patients. Expansion beyond pregnancy entirely—the same architecture (care plan in, daily companion out, clinician briefing on the other end) applies to any condition where the danger lives in the silence between appointments.
Cadence
A proactive AI health companion for high-risk pregnancy — and the OB who cares for her.
Cadence turns any OB care plan into a daily AI companion for the patient and a full-picture briefing tool for the clinician. It lives in the silent 7–14 day gap between prenatal appointments — where dangerous symptoms (rising blood pressure, recurring headaches, sudden swelling) build undetected — catching problems early, never causing panic, and handing the doctor a complete, traceable story before the conversation even starts.
System Overview
Cadence is two experiences sharing one engine. A warm, mobile-first Patient PWA runs a daily conversational check-in grounded in the patient's specific care plan; a clean Clinician Dashboard ranks a whole panel by risk, surfaces between-visit trends, and receives real-time escalations. Both talk to a single FastAPI backend that drives an Anthropic Claude orchestrator.
Every patient message flows through Claude's tool-use loop: the agent logs structured symptoms, runs RAG over the patient's own care document, assesses risk against the condition pack's red flags, detects multi-day patterns, and — when thresholds are crossed — generates a structured clinical summary, writes it to Redis, fires a zero-PHI Web Push to the clinician, and kicks off an independent Arize LLM-as-judge evaluation of whether that escalation was appropriate. Nothing is a black box: every agent decision is traced and every escalation is independently scored.
The engine is condition-agnostic. What changes per condition is a JSON condition pack (the demo runs preeclampsia risk); the orchestration, memory, and dashboard never change.
Tech Stack

How Cadence Works
OB care plan ─(Claude Vision)─► structured ProtocolJSON ─► Redis (plan + RAG vectors)
│
Patient opens PWA ─► POST /api/chat/message
│
Claude orchestrator (claude-sonnet-4-6, tool-use loop):
lookup_plan ── RAG over the patient's care doc (grounded answers only)
log_symptom ── structured check-in → Redis time-series
assess_risk ── current readings vs. red flags → ok | monitor | escalate
detect_pattern ─ trends over history ("BP up 4 days", "headaches 3 of 9")
escalate_to_clinician ─► escalations:{id} + Web Push + Arize judge
generate_visit_summary ─ patient + clinician pre-visit briefs
schedule_followup ── clinician "book sooner" adjusts the next check-in
│
Clinician Dashboard ─► panel (risk-ranked) · patient detail (timeline + patterns +
briefing) · live escalation inbox over WebSocket · one-click actions
│
Every turn + tool call ─► Arize span (de-identified) · every escalation ─► LLM-as-judge score
Sponsors & How We Use Them
🟠 Anthropic Claude — the engine
Claude (claude-sonnet-4-6) is the core intelligence of Cadence, used in four distinct ways:
- Agent orchestrator (tool-use loop).
backend/agent/orchestrator.pyruns a streaming tool-use loop where Claude decides which of seven tools to call on each patient turn. The orchestrator injectspatient_idserver-side on every dispatch — the model never chooses whose data it touches, so cross-patient access is architecturally impossible. - Vision plan ingestion. An uploaded OB care plan (PDF/image) is read by Claude Vision and
parsed into a Pydantic-validated
ProtocolJSON(goals, meds, tasks, check-in cadence, red flags). This is what makes Cadence work for any care plan, not a hardcoded protocol. - RAG-grounded conversation. The
lookup_plantool does semantic search over the patient's own care document; Claude's answers are always traceable to that document — it never gives general medical advice it invented, and never diagnoses. - LLM-as-judge safety layer. After every escalation, a second independent Claude call evaluates "was this escalation appropriate given the symptoms and the care plan's red flags?" and returns a confidence score — the auditable safety check behind every human handoff.
🔴 Redis — memory, RAG, and real-time state
Redis is the entire "between-visit continuity" layer — the thing that lets Cadence remember,
reason over time, and react instantly. It runs over TLS (rediss://) with authentication,
and every key is namespaced by patient_id so queries are always scoped to one patient.
- Per-patient memory & time-series:
plan:{id}(parsed protocol),session:{id}:{sid}(chat turns),symptoms:{id}(structured check-in history),risk_timeline:{id}(every risk score + rationale). - RAG vector store:
vector:{id}holds embeddings of the care-plan chunks that powerlookup_plan, so the agent's answers stay grounded in the patient's document. - Pattern detection:
detect_patternruns trend logic directly over thesymptoms:{id}time-series (rising BP across days, recurring symptom mentions). - Real-time escalation bus: writes to
escalations:{id}publish over Redis pub/sub, which drives the clinician's live WebSocket inbox — a new escalation appears the instant it happens. - In-house clinician↔patient messaging:
messages:{id}(clinician → patient), plusnotes:{id},followup:{id}, andpush_subscriptions:{clinician}— all in Redis, no third party.
🟣 Arize — the trust & observability layer
Arize is Cadence's proof that the AI is safe and explainable — the beat that answers every clinical judge's hardest question.
- Tracing on every agent call.
setup_tracing()+ anagent_span()context manager wrap every orchestrator turn and every tool dispatch (backend/eval/arize_judge.py,backend/agent/orchestrator.py). - De-identification before egress. Span attributes are de-identified before they leave our
infrastructure:
patient_idis hashed to apatient_tokenand raw symptom text is stripped — Arize sees{ patient_token, tool_called, severity, escalation_appropriate }, never PHI. - LLM-as-judge eval logged to Arize.
judge_escalation()posts the appropriateness verdict and confidence to the Arizecadenceproject (verified live returning "appropriate: YES (0.97)"), giving an auditable record that each escalation was independently evaluated.
Supporting infrastructure
- Web Push API — Clinician escalation alerts use the Web Push Protocol (VAPID +
pywebpush, service worker inpublic/sw.js). The payload contains zero PHI ("a patient needs your attention — tap to review"); the clinician taps into their authenticated dashboard to see the clinical detail. No SMS, no carrier network. - Vercel — Both apps ship as separate Vercel projects from one repo: the Patient PWA
(installable, mobile-first) and the Clinician Dashboard (desktop), each pointed at the
deployed backend via
VITE_API_URL. - Railway — The FastAPI backend is deployed on Railway (
railway.toml: NIXPACKS build,uvicornstart command,/api/healthhealthcheck). This is the API both Vercel apps target.
Architecture
Backend (backend/) — FastAPI. Claude tool-use orchestrator (agent/orchestrator.py),
seven frozen tools (agent/tools.py), Vision plan ingestion (ingestion/pipeline.py), Redis
memory + RAG (memory/), risk engine + pattern detection (risk/), escalation handler
(escalation/), Web Push (notifications/push.py), Arize tracing + judge (eval/). Every tool
returns a Pydantic model from the frozen schema; the data shapes are the contract. Deployed on
Railway (railway.toml).
Frontend — Two TanStack Start (Vite + Nitro) apps: part-1 (Patient PWA) and part-2
(Clinician Dashboard), both React + Tailwind, deployed on Vercel.
Security & Compliance
Built compliance-first, even with synthetic demo data: 100% synthetic patients (no real PHI), Redis over TLS with per-patient key scoping (cross-patient leakage is architecturally impossible), JWT-in-HttpOnly-cookie auth scaffolding with server-side role enforcement, de-identified Arize traces, and zero-PHI Web Push payloads. In production, LLM inference moves to Amazon Bedrock (HIPAA BAA), with BAAs across every covered entity and processor.
Status
Core end-to-end loop is built and verified live: plan ingestion → daily chat check-in → risk
triage → escalation → clinician dashboard, with Arize tracing and the LLM-as-judge eval. The
demo condition pack is preeclampsia risk; a DEMO_MODE golden path makes the 90-second demo
deterministic with cached fallbacks for every live AI call.
Analysis
View
Metric
- 79
- 67
- 38
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- FastAPIIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- RedisIn code
- Tailwind CSSIn code
- TypeScriptIn code
9 of 9 appear in the indexed code.
AI coding agents
- Claude CodeCommits
- CodexConfig
- CursorCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
843 KB
Source files
203
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
luissuarez21/cadence-care
252 files · 3.3 MB · @ 4cbf7f0
Structure
Interface
97 files · 38%Screens, components and styles rendered to the user.
API & routing
18 files · 7%Request entry points: routes, handlers and controllers.
Application logic
62 files · 25%Domain rules, services and shared utilities.
+12 more
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript54%
- Python35%
- Markdown10%
- CSS1%
- JavaScript0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
part-1/package.json
npm · 69- @hookform/resolvers
- @radix-ui/react-accordion
- @radix-ui/react-alert-dialog
- @radix-ui/react-aspect-ratio
- @radix-ui/react-avatar
- @radix-ui/react-checkbox
- @radix-ui/react-collapsible
- @radix-ui/react-context-menu
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-hover-card
- @radix-ui/react-label
- @radix-ui/react-menubar
- @radix-ui/react-navigation-menu
- @radix-ui/react-popover
- @radix-ui/react-progress
- @radix-ui/react-radio-group
- @radix-ui/react-scroll-area
- +51 more
part-2/package.json
npm · 69- @hookform/resolvers
- @radix-ui/react-accordion
- @radix-ui/react-alert-dialog
- @radix-ui/react-aspect-ratio
- @radix-ui/react-avatar
- @radix-ui/react-checkbox
- @radix-ui/react-collapsible
- @radix-ui/react-context-menu
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-hover-card
- @radix-ui/react-label
- @radix-ui/react-menubar
- @radix-ui/react-navigation-menu
- @radix-ui/react-popover
- @radix-ui/react-progress
- @radix-ui/react-radio-group
- @radix-ui/react-scroll-area
- +51 more
backend/requirements.txt
pypi · 12- anthropic
- arize-otel
- fastapi
- openinference-instrumentation-anthropic
- opentelemetry-sdk
- pydantic
- python-dotenv
- python-jose[cryptography]
- python-multipart
- pywebpush
- redis
- uvicorn[standard]
requirements.txt
pypi · 12- anthropic
- arize-otel
- fastapi
- openinference-instrumentation-anthropic
- opentelemetry-sdk
- pydantic
- python-dotenv
- python-jose[cryptography]
- python-multipart
- pywebpush
- redis
- uvicorn[standard]
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.