Skip to content
Whitepapers
Health product July 22, 2026 · 11 min read

Health Companion: a multi-agent health companion

I'm a primary-care physician. Health Companion is my attempt to translate the experience I build with my patients in the exam room into a replicable digital product — not a medical chatbot, but a companion that stays with you through the 8,760 hours a year you spend outside the clinic. It's live in production, with real testers and an active clinical committee. This is the honest read on the product and architecture decisions behind it.

See Health Companion in production

The problem: 8,760 hours with no one watching

The health system as it's designed today gets paid when you get sick. A consultation lasts ten to fifteen minutes; the rest of the year —the 8,760 hours— the patient decides alone what to eat, whether to take the medication, whether a symptom is worth worrying about, how to read a lab result no one explained well. That gap isn't a minor flaw in the system: it's the design. Health Companion exists to be the first product whose only job is to keep you well, not to treat you once you're already sick.

The thesis: continuity, not consultation

I use Eric Topol's compass: the patient owns their health, the clinician is their advisor, AI is the layer that connects them. Health Companion doesn't replace the doctor — it's the memory and translation missing between one visit and the next. The central metaphor is simple and deliberate: a friend who knows health, the family doctor of thirty years ago, but digital. A relationship, not a tool.

That gives rise to a category I call the sanitary interpreter: its job isn't to diagnose, it's to translate medicine into the user's everyday language — without losing clinical precision, and without manufacturing false reassurance or unnecessary alarm. Every response follows the same formula: data → education → personal context → see your doctor.

I use a three-question filter to decide whether something belongs in the product: does it empower, does it motivate, does it educate without jargon? If the answer to all three is no, it doesn't ship — no matter how technically interesting it is.

How it's built: a multi-agent team

The "multi-agent" in the title doesn't primarily describe the runtime that talks to the patient — I cover that below, and it's deliberately simple. It describes how I build the product: I work with three specialized Claude Code agents — one for frontend, one for backend, one clinical — coordinated by a fourth that holds the thesis and defends scope. I'm not "the user" of that team: I'm the fifth agent, the one who translates real clinical experience into product judgment. We build health as a team, using the same pattern I want the product to give the patient: a coordinator and specialists, never a single actor deciding everything alone.

The production architecture

The runtime that actually talks to the patient is, today, deliberately simple: a single orchestrator on a Claude frontier model, with typed tools instead of a swarm of real-time subagents. That's not a technical limitation — a single orchestrator keeps the clinical voice consistent turn after turn, something a fan-out to several specialist agents (screening, lifestyle, mental health) would dilute. Specialization still exists; it lives in the system prompt, not in the network topology. Runtime subagents are a possible future path, not a promise made today.

Conceptual flow

  1. Client (PWA) — chat, live profile, clinical archive, timeline.
  2. API — receives the turn, assembles patient context, streams over SSE.
  3. Single orchestrator (Claude, frontier model) — reasons, decides which tool to call, drafts the response.
  4. Postgres with RLS — every write is isolated per user at the database engine level, not just the application layer.

The tools the orchestrator can call

Tool What it does
save_profile_field Updates a field in the canonical health profile (age, family history, habits, concerns).
log_biomarker Logs a measurement (value, unit, date, source) to chart over time.
schedule_screening Queues a screening recommended for age/sex and links it to the timeline.
fetch_guidelines_for_age_sex Read-only lookup of current preventive guidelines, cited with judgment, not from memory.
remember The model itself decides what is worth keeping — episodic or semantic.

The model doesn't write freely to the database: every state change goes through a typed, validated tool. That's the difference between "a chatbot that says things" and an agent with auditable write effects.

Memory: episodic and semantic

Memory is the product, not a feature bolted on. The orchestrator decides, non-mechanically, what's worth remembering. A fact starts as episodic memory —"the user mentioned on April 21st that her mother died of breast cancer at 52"— and a later pass distills it, when it matters, into semantic memory —"maternal family history of breast cancer"—, which feeds back into the context of every future turn. That distinction is what separates a companion that knows you better over time from a chat that starts from zero every time you open the app.

Multimodal ingestion: the lab report goes straight to the model

When someone uploads a lab PDF or a photo of a study, it doesn't pass through a local OCR engine that tries to extract text and often loses tables, units, or reference ranges. It goes straight to the model, which reads the image or document the way a clinician would: in context, with columns and reference ranges intact. It's a deliberate architecture decision — fewer moving parts, fewer places where a critical value gets lost in translation.

The crisis detector

Before the model generates a single word, a detector tuned across seven clinical risk categories screens the user's message. If it flags a crisis signal, the response changes route: it stops being a wellness conversation and becomes a calm escalation toward real help — an emergency number, a crisis line, the right person. It isn't safety theater or an afterthought: it's what I would do in person, expressed as code that runs before the model, not after.

Regulatory posture: wellness, never a medical device

Health Companion positions itself, deliberately, in the wellness and education category, not medical device: exempt under FDA General Wellness in the US, outside COFEPRIS's medical-device regime in Mexico as long as it doesn't diagnose or prescribe, and exempt under MDR in Europe as long as it always refers to a health professional. This isn't a gray area I exploit — it's a line I draw with full intention, and it translates into one rule that never gets negotiated:

Can do

Save, chart, and show trends; educate in context ("your fasting glucose of 126 is in the range the WHO calls prediabetes"); recommend booking an appointment.

Never does

"You have stage 2 hypertension." "Take losartan." "Adjust your insulin to X units." Diagnose, prescribe, or adjust a dose — never.

This posture also shapes the architecture: the crisis detector and the guardrails aren't patches on a medical product dressed up as wellness — they're the reason the product can legally exist in three jurisdictions without becoming a regulated device.

Security and data ownership

Health data is sensitive data by definition, and the product was designed with that premise from the database up, not bolted on afterward. Row-Level Security is active on every table that touches patient information: isolation between users is enforced at the database engine level, not only in application code — so a programming mistake cannot leak one person's data to another. Authentication validates every session against short-lived signed tokens. No clinical reasoning is logged in plaintext errors. And the user owns their data: they can export it or request deletion, with the safeguards that data you don't want lost by accident deserves.

Full honesty: no amount of solid technical foundation replaces the compliance work itself — building the legal privacy posture for sensitive health data (notices, express consent, data-subject rights) is an ongoing program, not a switch you flip once. I treat it as exactly that.

The infrastructure

Nothing runs on a homegrown server. Every layer lives with a managed provider, chosen so a small team doesn't carry infrastructure operations it shouldn't own:

Layer Technology Why
Interface Next.js 15 (App Router) + PWA Chat, live profile, clinical archive, push notifications
Orchestrator FastAPI + Claude Agent SDK SSE streaming, tool use, multimodal ingestion, crisis detector
Data Postgres with Row-Level Security One user can never read another user's data, not even through a code bug
Deployment Vercel (web) + Render (API) + Supabase (data and auth) No homegrown server; each layer owned by a managed specialist

Honest limits

1 · It's wellness, not a doctor

The regulatory category that lets the product operate without being a medical device is also a real design boundary: any case that needs diagnosis or a treatment change is always referred to the health professional. The product doesn't compete with the visit — it prepares for it and extends it.

2 · One frontier model, today

Relying on a single orchestrator on one provider's model gives clinical-voice consistency and operational simplicity, but it concentrates availability and cost risk. It's a conscious trade-off at this stage, not an oversight — a runtime multi-agent topology remains an evaluated future path, not an urgent gap.

3 · Compliance is a program, not a checkbox

The technical security foundation (RLS, auth, encryption) is solid and verified; the legal compliance work for sensitive health data —privacy notices, express consent, data-subject rights in every jurisdiction with users— is ongoing and treated as such, with priority ahead of scaling monetization.

Today's health system gets paid when you get sick. We're building the first companion whose only job is to keep you well — in the language you actually speak. That's the whole thesis, and it's also, I think, where AI's relative value in health is highest exactly where resources are scarcest: equity isn't a side effect of the product, it's a multiplier of its purpose.