Kuzushi Labs · Applied research and engineering
Building agentic patient workflows
An implementation series on patient operations: domain agents, action cards, approvals, FHIR and messaging connectors, durable workflows, evaluation and deployment.
Arunank Sharan · September 2026 · 18 articles · 19,849 words
I connect our FastAPI and Next.js build to concrete contracts, failure cases and a runnable reference lab. The original implementation, interface prototypes and proposed extensions are distinguished throughout. Worked examples use synthetic identifiers; capacity profiles are explicit assumptions.
18 articles with 47 code blocks, 18 implementation diagrams and 19 primary references. The kit includes a local Python lab with 43 deterministic checks, connector contracts and 24 starter evaluation scenarios. Start with part 18 to run the lab, or follow the build from part 1.
Parts 1–6
Workflow and interface
From durable patient records to typed actions, reviewed writes, journeys and live context.
PART 01 · 7 min read
Start with the patient workflow
Durable patient records, a complete booking example and the implementation history.
PART 02 · 8 min read
From language to domain actions
Typed tool adapters, intent uncertainty, service contracts and bounded planning.
PART 03 · 7 min read
Making intent visible in the interface
Editable action cards, stale-response protection and a typed Next.js navigation contract.
PART 04 · 7 min read
Confirmation is part of the workflow
Proposal revisions, atomic idempotency and reconciliation after an uncertain write.
PART 05 · 8 min read
Patient journeys beyond the chat
Versioned journeys, transactional outbox events, worker leases and durable escalation.
PART 06 · 7 min read
Context, memory and live updates
Context ownership, token budgets, workflow events and end-to-end latency.
Parts 7–11
Connectors and execution
FHIR identity, concurrent booking, messaging receipts, MCP/A2A and a resumable harness.
PART 07 · 6 min read
Patient identity and FHIR connectors
Identity mapping, SMART authorization, FHIR R4 appointment contracts and write reconciliation.
PART 08 · 5 min read
Booking under concurrency and time zones
Slot ownership, race conditions, daylight-saving ambiguity, holds and rescheduling.
PART 09 · 5 min read
Messaging connectors and delivery receipts
Provider adapters, signed webhooks, preference checks and out-of-order delivery events.
PART 10 · 5 min read
MCP, A2A and the tool boundary
Scoped tool discovery, authenticated adapters and delegated task contracts.
PART 11 · 5 min read
A durable harness for patient work
Checkpointed workflows, approval resume, effect identities and recovery semantics.
Parts 12–15
Trust and evaluation
Authorization, policy evidence, multilingual voice and complete-workflow benchmarks.
PART 12 · 5 min read
Security at every agent boundary
Actor and tenant scope, hostile tool output, constrained connectors and useful private traces.
PART 13 · 5 min read
Retrieval for policies and patient context
Effective policy versions, authorized evidence, live records and retrieval evaluation.
PART 14 · 5 min read
Voice, multilingual input and human handoff
Final transcripts, Hindi/Hinglish fields, interruptions and acknowledged staff handoffs.
PART 15 · 6 min read
Evaluating complete patient workflows
A proposed 300-case benchmark, 24 starter cards, final-state oracles and repeated trials.
Parts 16–18
Operate and implement
Capacity and recovery, a sourced product/research comparison, and the implementation handoff.
PART 16 · 5 min read
Operating the platform: capacity, cost and recovery
Worked CPU and memory sizing, concurrency, database pools, telemetry and recovery drills.
PART 17 · 6 min read
What Polsia and agent research change
A sourced comparison with Polsia and Hippocratic AI, plus five research-driven experiments.
PART 18 · 5 min read
Run the lab and ship one workflow
Run the local example, reproduce failures and follow a staged implementation handoff.