Inspiration
My family was handed a discharge summary while I was in another country. Twelve instructions on one sheet. One of them was do not stop ticagrelor without speaking to cardiology — seventh on the page, in the same font as "no lifting over ten pounds." I read that page three times before I found the line that mattered.
The medicine was right. Somebody wrote it down correctly. Then execution — book the follow-up, reconcile the medications, notice the warning signs — became the job of whoever was standing in the corridor. Roughly a fifth of Medicare patients are readmitted within thirty days, and most of that is not a medical failure. Nobody executed the paper.
What it does
Photograph a discharge summary. In about three seconds VitaHome returns every instruction on it, re-ordered by what happens if you miss it. Then seven agents carry it out:
| Agent | Duty | |
|---|---|---|
| Pa | Parser | Document → plan, ranked by consequence, with a plain-language sentence under anything fatal |
| Rc | Reconciler | New medications against the FHIR record; finds contradictions and refuses to resolve them |
| Sc | Scheduler | Books every follow-up into the Cloud Healthcare API — and onto a real phone, via a Google Calendar the fleet owns |
| Ph | Pharmacist | Turns "twice daily for 12 months" into a real clock; refuses anything it would have to guess |
| Wa | Watchman | Monitors against the red flags printed on this document, not a generic alarm |
| Co | Coach | One question a day, chosen from what the fleet does not yet know — speaks it aloud via Gemini TTS |
| Es | Escalator | The only path to a clinical decision — and the only agent allowed to decide a human is not needed |
Nobody types anything. There is no chat window — a chatbot that gives advice hands the work back to the person who was already overwhelmed.
The thesis is calibrated non-autonomy. Four of the seven agents can refuse. When the document says both "STOP amlodipine" and "resume home medications," VitaHome does not pick the likelier reading — it assembles both, cites the line each came from, and puts a licensed human in front of the decision. Then the refusal travels: the Pharmacist holds the disputed drug off the family's schedule, and the Coach independently asks for the blood-pressure reading a clinician would need to settle it. Nobody wired that chain.
The three things worth trying yourself
1 — Kill any agent, whenever you like. /console/drill terminates a real worker process: os._exit(1), mid-step, no cleanup, message unacked. Nothing catches it. Pub/Sub redelivers, Cloud Run supplies a fresh container — the worker ID in the audit trail visibly changes — and the ledger skips every step that already completed. One FHIR appointment and one calendar event on a real phone. Never two of either. At-least-once delivery plus idempotent steps gives effectively-once execution; there is no exactly-once and we do not claim there is.
2 — The decoupling is checkable, not asserted. The Scheduler runs on its own Cloud Run service, extracted with a push-endpoint change and zero code changes. /registry shows per-agent placement, and the drill kills a worker on one service while the console keeps serving from another.
3 — Restraint, made safe. The Escalator can decline to page a clinician — and records its reason, the strongest argument against its own decision, and what would have changed its answer. It is safe because of an asymmetry: the model advises, the code decides, and code may overrule the model in exactly one direction. A model's reassurance can never suppress a symptom printed on the patient's own return-to-emergency list.
How we built it
Cloud Run (three services) · Pub/Sub (one topic, per-agent filtered push subscriptions) · Firestore (task ledger with idempotent step records, append-only audit) · Cloud Healthcare API, FHIR R4 (real clinical writes) · Google Calendar API (real events on a real phone, idempotent via iCalUID) · Gemini 3.5 Flash-Lite for extraction and 3.7 Flash for judgement — tiers chosen from measurements on our own prompts, not a datasheet · Gemini TTS (the Coach speaks) · Gemma as a compliance auditor reading recent logs to verify no PHI leaked · Agent Development Kit with A2A agent cards · Cloud Scheduler · Secret Manager.
PHI never rides the queue: messages carry references, each agent fetches inside its own IAM scope, a deterministic filter scrubs every log record, and Gemma audits the result so the claim is falsifiable. ./infra/setup.sh <PROJECT_ID> reproduces everything from zero.
Challenges we ran into
Every one of these was found by running the system, not by reading it: a poison-message loop observed at attempt 60 (now dead-lettered after five); hand-timed kills landing on idle Cloud Run instances (the trigger moved inside the worker); worker IDs reading localhost-1 on every container, which quietly undermined the drill's own proof; a redelivery counting one booking as two on the Autonomy Ledger; finished tasks dead-lettering themselves; an event loop blocked for 165 seconds during a 200-task burst; a credential race under 16 threads (189/200 seeded, 11 bare 401s); and a refusal that failed to travel — the Pharmacist scheduled the exact drug the Reconciler had refused to decide about.
The fix was never a better prompt. It was always making the code, not the model, hold the line.
What we learned
The most valuable thing we built is not a capability — it is a boundary. In a regulated domain, the interesting question is not how much a fleet does alone. It is how precisely it knows where its authority ends. The number we put on screen next to "done autonomously" is refused, on purpose.
What's next
Veo instruction clips, per-agent service accounts for true least-privilege, Cloud Trace across the fan-out — and the same fleet pointed at every document a hospital hands a family: pediatric vaccine schedules, post-surgical care sheets, dialysis prep. Wherever a person is handed paper and expected to execute it for six weeks, this works. VitaHome is the aftercare arm of Vita, Graviti Labs' live health product.
All patients are synthetic; there is no real patient data anywhere in this project. The provider directory is labelled as a demo; everything else touches a real Google Cloud service.
Built With
- agent-development-kit
- cloud-healthcare-api
- cloud-scheduler
- fastapi
- fhir
- firestore
- gemini
- gemma
- google-calendar-api
- google-cloud-run
- google-pub-sub
- next.js
- python
- secret-manager
- text-to-speech
- typescript



Log in or sign up for Devpost to join the conversation.