Interview prep · Mira Mace · System design

Mira Mace System Design: From the DME Agent to an Autonomous, Configurable Care-Ops Platform

The expected format: the interviewer describes the product (as it is today, or a version they want), then asks you to extend it. Make the agent more autonomous, make it configurable, turn it into a platform. Your DME take-home is the natural starting point, because it's already one workflow built on a deterministic policy, an engine and an LLM at the edges. This page covers what's known about Mira Mace, a 60-minute plan for the format, the core reframing (from one hardcoded policy to workflows built on shared primitives), autonomy and configurability in depth, the target architecture with data model and runtime, voice, evals, compliance, multi-tenancy for B2B, likely questions with answers, and what to ask at the end.

Three parts

Part 1 (this page): the overview and argument. Part 2: Deep dive: every box dissected (party profiles and how agents update them, memory in Postgres / pgvector / graph and how it's retrieved, schedules and follow-ups, durability, primitives, gateway, channels, human plane, observability, config). Part 3: Mock scenarios: eight scoped interview scenarios with curveballs, checklists and answer outlines.

TL;DR: the argument in eight lines

  • Start from the user, then the flow, then the boxes. Name the advocate, the patient and the vendor, and walk one real case before drawing anything. (The CEO's feedback was "feature first, not user first"; don't repeat it.)
  • The reframe: today's take-home is one policy hardcoded around DME. The platform is many workflows built from the same primitives: converse, qualify, obtain, commitment, consent, book, notify, human task, escalate.
  • Autonomy is not one switch. It's granted per workflow step, per risk class, per tenant, and earned with metrics (L0 suggest → L4 act with sampled audit). Every handled escalation type becomes a new automated branch.
  • Configurability has layers: platform code (primitives) → workflow definitions (versioned data) → tenant/enterprise config → patient preferences → learned knowledge (vendor facts). Each layer has an owner and a release process.
  • Decisions stay deterministic and replayable; the LLM talks, reads, extracts and drafts. Open-ended requests go to a bounded planner that can only compose allowed primitives, under policy checks. "Workflows where you can, agents where you must."
  • The runtime is a durable workflow engine: an event log per case, a generic scheduler (today's decide() generalised), timers, one writer per case, idempotent actions, correlation for inbound faxes and callbacks.
  • Humans are part of the system, not a fallback. The Mira agent and workmate become the advocate's console: approval queues, exception handling, one-click decisions, and every correction feeds the evals.
  • Quality is a number: autonomous resolution rate, correct-escalation rate, fact accuracy against ground truth, time to resolution, calls per case; gated by simulations, replays, shadow mode and canaries.

What's known, and what's guessed

Sources for this page
  • The format comes from a former colleague who interviewed there recently: the system design round was an extension of the DME assignment, about system-level architecture to make the agent more autonomous, more configurable, and a platform.
  • The product today comes from the CEO's own description at the end of your 14 Nov call (paraphrased from the transcript; the speech-to-text was imperfect).
  • The take-home is your repo: care-coordination-agent. They have read it.
  • Public facts about the company are in the next section, with sources, and marked where unverified.
  • Guessed: the exact prompt. Prepare for three variants: (1) "here's the DME agent; make it autonomous and configurable"; (2) "here's our product (advocates + companion + calling); design the platform under it"; (3) "an enterprise customer wants X; how does the platform support it?"

What Mira Mace says publicly

Researched 18 Nov 2026. The Ashby board and the trust centre load with JavaScript and couldn't be read, so the job details below are paraphrased from Built In re-posts.

Adjacent companies (from general knowledge, not re-verified today): Solace (Medicare patient advocates), Infinitus (AI calls to payers for benefits and prior auth), Hippocratic AI (healthcare voice agents), Assort Health (inbound voice for specialty practices), Rightway (employer-sold navigation), Cohere Health (payer-side prior auth). Useful only if they ask "who else does this?"

The product as the CEO described it (14 Nov)

SurfaceUsersWhat it does (per the CEO)Owner on the team
Mira agentCare advocatesDaily assistant: before calling a patient or a vendor, deciding who to focus on, sending a fax. Vendor search now hits Mira's own vetted database: every interaction enriches the vendor record, so advocates use it instead of ChatGPT or Claude, because humans vetted the quality.2 engineers: one UX, one core ML and quality
AI phone calling to vendorsAdvocates"Press a button": the AI calls a vendor and comes back with whether it carries the product, covers the insurance and serves the ZIP code. Used to process external vendor lists not touched before.Voice lead
WorkmateAdvocatesMoving from "an agent you ask for tasks" to an always-present companion in voice mode that follows the advocate across screens, guiding and steering what to do and when.Mira agent team / voice
Voice activation agentNew customers (inbound)People calling to sign up used to reach a team of about 20 onboarding/support staff; the agent now handles these activation calls and automates onboarding.Voice lead
Mira companionPatientsA list of all their doctors and their care advocate. A patient types a question for, say, their cardiologist; the AI calls the office, collects the answer and brings it back. Voice mode like ChatGPT/Claude voice; guidance based on their day, progress and symptoms, which creates new tasks and requests for advocates.1 engineer, built from scratch to launch
B2B / enterpriseEnterprise customersEnterprises have their own needs, so the product has to be customised for them.1 engineer owns the whole B2B motion

Team: about 6–7 engineers, each with large scope, working directly with customers. Voice: "one person leads all of voice" across advocates, patients and activations. That's the seat the Voice role would fill or join.

The insight to bring into the room

Look at the list. Vendor calling, the companion's "AI calls your cardiologist", the activation agent, the fax step in the Mira agent and your DME take-home are the same few primitives in different arrangements: converse with a party over a channel, extract typed facts with evidence, track a promise, ask a human for one step, notify someone. Each was probably built separately by a different engineer. The platform play is to make them one runtime with shared primitives, shared knowledge (the vendor DB), shared evals and shared compliance, so the B2B engineer can configure a new enterprise workflow without writing a new agent. Saying this early shows you listened to the CEO and that you think in platforms.

The 60-minute plan for an "extend this product" round

MinutesPhaseWhat you say / do
0–3Restate the picturePlay back the product they described in one sentence per surface. "So today: advocates use the Mira agent, the AI can call vendors, patients use the companion. You want the agent to take on more of a case end to end, and to be configurable per customer. Right?"
3–9ClarifyAsk 5–6 questions (list below): who's the user of "autonomy" (advocate? patient? enterprise?), what does success mean, what must never go wrong, scale, which workflows, what's configurable and by whom.
9–14One case, end to endWalk a concrete case through the user's eyes: "Mrs. Martinez tells the companion she needs a wheelchair…". Mark where a human is involved today and where the agent would act alone.
14–20Reframe + principles"Today it's one hardcoded policy. Here's how it becomes a platform": primitives, workflow definitions, the autonomy ladder, decisions in code with the LLM at the edges.
20–35ArchitectureDraw the target architecture: intake → case service → workflow runtime → primitives → channels; knowledge plane; human plane; eval plane. Walk the case through the boxes.
35–48Deep diveOffer two: "the runtime and data model (how a workflow is defined and executed)" or "how autonomy is granted and measured". Go to LLD: tables, the scheduler pseudocode, a workflow definition.
48–56Failure, safety, scaleStuck cases, provider outages, wrong facts, PHI disclosure, broken promises, 10× volume, a bad prompt release.
56–60Rollout + wrap-upPhased plan sized for a 6–7 person team; top two risks; what you'd build first and why.

Clarifying questions worth asking

Product

  • "Autonomous for whom? Do we want fewer advocate-hours per case, faster resolution for the patient, or more cases per advocate?" (Pick the metric before the design.)
  • "Which workflows matter most beyond DME? Specialist questions, appointments, prescriptions, prior auth, billing disputes?"
  • "What's configurable, and by whom? An engineer, an ops lead, the enterprise customer, the advocate?"
  • "Is an enterprise customer a health plan, a provider group, an employer?" (Changes who owns the patient relationship and the rules.)

Constraints

  • "What must never go wrong?" (Disclosing PHI to the wrong person, committing a patient to a cost, a wrong medical statement.)
  • "Scale: patients, cases per day, calls per day, peak concurrency?"
  • "Channels: phone, fax, SMS, email, payer and provider portals, EHR integrations?"
  • "Which parts must a human approve today, for legal or trust reasons?"

If they say "you decide", state assumptions with numbers and move on. See the estimates section for a ready set.

Three lessons from the CEO round, applied to system design
  • "Feature first, not user first." Open with a user journey (advocate's day, patient's request), not with "an orchestrator and some agents". Every box should answer "which step of the journey does this serve?"
  • "Talking like an engineer." In a system design round engineering talk is expected, but tie each choice to an outcome: "event sourcing, so that when a patient asks why their wheelchair is late, the advocate sees the whole history in one screen".
  • "Don't worry about limitations." Don't spend minutes on what models can't do yet. Design for what's coming (better models, cheaper calls), and put the limitations where they belong: in guardrails and evals, stated once.

Your starting point: the DME take-home in 90 seconds

Have this ready as a spoken summary; they've read the code, so it anchors everything that follows.

"The case is a Medicare patient who needs a wheelchair, opened at 2am with nobody supervising. The system works three tracks in parallel: qualify suppliers by phone against four yes/no gates, chase the doctor's office for the written order, and get the patient's informed agreement to her 20% share. Then it joins them: send the order to the best supplier, book delivery, tell the patient. The core is a pure decide(case, now) that returns one of ten typed actions; an engine performs it; the result becomes an event; state is a fold of the events. The LLM only holds the call and turns transcripts into typed facts with evidence quotes. There are no confidence scores: unknown is a real state. It ran against a simulated world of difficult suppliers and clinics."
policy.decide(case, now) → Action     pure: no I/O, no model, no network
engine performs the Action            calls / faxes / books
the result becomes an Event           the only way state changes
reducer folds it into state           case = replay(events)

What already generalises, and what doesn't

Already a platform idea

  • Decide / perform / event / fold: the shape of a durable workflow engine.
  • Typed facts with Ternary values and evidence quotes.
  • Commitments with a verify-at time ("a promise is not an outcome").
  • RequestHumanTask (block one track, keep the rest going) vs Escalate (hand the case over), with typed reasons.
  • Business-hours clock and backoff derived from history.
  • A simulated world with personas as the eval set.

Hardcoded to one workflow

  • Gates (stocks_k0001), tracks (ORDER / SUPPLIER / PATIENT) and priorities live in policy.py.
  • The engine has DME-specific perform methods and makes a few decisions itself.
  • Strings like "Dr. Chen's office" and "K0001" in the policy.
  • One case at a time, one action per step, the log carried by the browser, no persistence or auth.
  • Phone and fax are simulated; no real telephony, IVR or inbound.
  • Facts die with the case: nothing is written back to a vendor database.
Own the known weak spots before they're raised

An independent review of the repo found these. If the interviewer has read the code, naming them first reads as maturity; each is also a natural lead-in to the platform design.

  • A provider error can leave a case stuck OPEN with no escalation. An LLM failure mid-call is recorded as "no answer". Platform answer: a watchdog (any open case with nothing due and nothing scheduled raises a typed escalation), and infrastructure errors never count as a dial attempt.
  • Grounding checks words, not meaning: "we do not accept assignment" can ground a "yes". Platform answer: per-field quotes plus an entailment check (a small model or NLI classifier asked "does this quote support accepts_assignment=yes?"), and a re-ask when it fails.
  • The eval is small and partly circular: 6 seeded worlds, an LLM-simulated world grading an LLM agent, the patient always agreeable, extraction never compared against the simulator's truth. Platform answer: per-field precision and recall against persona truth, adversarial personas, repeated runs with variance, and replay of real calls.
  • The engine makes some decisions itself (gives up after broken holds, defaults lead time), contradicting "the engine holds no opinions". Platform answer: those move into the workflow definition as named knobs.
  • PHI handling gaps: no identity check before discussing the patient with whoever answers; the agent introduces itself as a person. Platform answer: identity verification and AI/recording disclosure are properties of the converse primitive, not of a prompt.

The reframe: from one policy to workflows built on primitives

The key observation: today's decide() is already a generic scheduler with DME details baked in. It finds which tracks are due, checks join conditions, picks the highest-priority action, otherwise waits. Extract the DME specifics as data, keep the scheduler generic, and the same engine runs any workflow.

The primitives (the platform's verbs)

PrimitiveIn the take-homeGeneralisedWhere Mira already uses it
FactTernary + evidence quote, grounded()Typed field on an entity, with value, evidence, source, observed-at, verified-byVendor enrichment DB
PartySupplier, clinic, patientAny counterparty with channels, hours, timezone, disclosure rules, identity checksVendors, doctors' offices, patients, payers
Conversecaller.py + extract.py"Ask this party these questions over this channel, within this disclosure policy" → typed factsVendor calling, companion "ask my cardiologist", activations
QualifyFour gates + speed tiebreakSearch a candidate set against gates, rank by a scoring ruleVendor search
ObtainChase the written order: phone ×3, fax, verifyGet a document or answer from a party, escalating channels on a ladderFaxes, records, prescriptions
CommitmentPromise + verify_atAny "they said they'd do X by Y", checked independently"The office will call back tomorrow"
ConsentCost call; "agreement without understanding is not consent"Informed agreement from a subject about stated terms, recorded with evidenceCost, sharing records, booking
BookScheduleDelivery + hold confirmationReserve a slot with a party, then confirm and re-verifyDeliveries, appointments
NotifyTell the patient the delivery windowMessage a party on their preferred channel, with read/ack trackingCompanion messages, SMS
Human task / EscalateTyped reasons; block one trackSame, routed to the right queue (advocate, supervisor, enterprise contact) with SLAsAdvocate tasks created by the companion
Wait / clockBusiness hours, backoffPer-party hours and timezones, durable timersEverywhere

The same primitives, Mira's actual workflows

WorkflowTracks (in parallel)Join → finish
DME delivery (take-home)qualify(suppliers) ∥ obtain(written order from clinic) ∥ consent(patient, cost)book(best supplier) → notify(patient) → verify delivery → close
Vendor enrichment (live today)converse(vendor, {carries item, takes insurance, serves ZIP})write facts to the vendor DB with evidence → close
Companion: "ask my cardiologist"converse(provider office, patient's question) with identity/consent on filecommitment if "we'll call back" → notify(patient, answer) → task for advocate if clinical judgement is needed
Voice activation (inbound)converse(caller, activation script) → verify identity → collect consentscreate account → notify(advocate) → schedule welcome
Appointment schedulingqualify(specialists: in network, accepting new patients, distance) ∥ obtain(referral)book(appointment) → notify → reminder → verify attendance
Prior authorization follow-upobtain(clinical notes from provider) → converse(payer status line or portal)commitment("decision in 5 days") → notify → escalate on denial
Billing disputeobtain(EOB, itemised bill) → converse(provider billing, payer)commitment(corrected claim) → verify → notify

The test of the abstraction is the second and third workflow, not the first. Say that out loud: you'd extract primitives from DME, then prove them by building the companion's provider-question workflow on the same runtime, and only then consider a definition language.

Making it autonomous

"More autonomous" is ambiguous; define it before designing it. A useful definition: the fraction of a case's steps the system completes correctly without a human, at an acceptable risk. Then autonomy becomes something you grant per step, measure, and expand.

The autonomy ladder (per step, not per product)

LevelWhat the agent doesHuman roleExample at Mira
L0 · SuggestRecommends the next actionDoes itWorkmate: "you should call Lakeshore next; they open at 9"
L1 · DraftPrepares the action fully (call script, fax, message)Approves with one clickFax to the clinic drafted with the order request; advocate sends
L2 · Act, then reportDoes it, notifies immediately, easy to undoReviews after the factVendor qualification calls; info-gathering calls to offices
L3 · Act, escalate on exceptionRuns the whole step; hands over only on a typed exceptionHandles exceptionsChasing the written order; booking a delivery once consent exists
L4 · Fully autonomous, auditedRuns end to end; humans sample for QAAudits a sampleVendor enrichment of a new list; reminder calls

The level is a property of (workflow step, risk class, tenant), stored as config, and changed only when the metrics justify it. That makes "more autonomous" a release process, not a leap of faith.

Deciding what can be autonomous: risk × reversibility × verifiability

ActionRisk if wrongReversible?Can we verify it independently?Starting level
Ask a vendor what they stockLow: a wasted callYesYes (another call, the vendor DB)L3–L4
Request records or an order from a clinicLow–mediumMostlyYes (the document arrives or not)L3
Send a document containing PHIHigh: disclosure to the wrong partyNoPartly (verified fax number, recipient check)L1 → L3 once the recipient is verified
Tell a patient what they'll oweHigh: financial harm, trustHardPartly (plan terms, fee schedule)L1 until coverage terms are typed data
Commit the patient to a bookingMediumUsually (cancel)Yes (confirmation)L3 after consent is on record
Relay a clinician's answer to a patientHigh: medical contentNoPartly (quote the source verbatim)L2 with verbatim relay; anything interpretive goes to an advocate
Anything resembling medical advice or plan enrollment adviceVery high, regulatedNoNoNever autonomous; route to a licensed human

Seven mechanisms that actually increase autonomy

  1. Turn escalations into branches. Every escalation has a typed reason, so you can count them. The top reason each month becomes a new handled path (e.g. "supplier wants the MBI" → a secure-fax branch that sends identifiers in writing instead of escalating). Autonomy grows as the escalation distribution shrinks. This is the single best answer to "how do you make it more autonomous?"
  2. Close the loop with the world. Today every fact is pulled by dialling out. Add inbound: faxes arriving (OCR + classify + match to a case), suppliers calling back, delivery confirmations by SMS, the companion's patient messages. Without inbound, the agent waits for humans to tell it what happened.
  3. Memory that outlives the case. Vendor facts with freshness ("stocks K0001, confirmed 3 days ago by phone"), behavioural facts ("never answers before 10am", "always asks for the written order first"), patient preferences (language, caregiver, best time). The fiftieth case shouldn't repeat the first case's calls. Mira already has this for vendors; make every workflow read and write it.
  4. Verification instead of trust. Cross-check facts across sources, re-verify stale facts before relying on them, verify promises at their due time, verify bookings again the day before. Autonomy is safe only when the system can check its own work.
  5. A bounded planner for the long tail. Requests that match no workflow (a companion message like "my pharmacy says my prescription needs approval") go to a planner that can only compose existing primitives into a proposed plan, checked against policy, approved by an advocate at L1. Plans that get approved repeatedly become new workflow definitions. Workflows where you can, agents where you must.
  6. Self-monitoring. A watchdog for stuck cases (open, nothing due, nothing scheduled), SLA timers per step, provider health with circuit breakers, and a budget per case (calls, model spend, elapsed days) that escalates when exceeded.
  7. Learn from the humans in the loop. Every advocate approval, edit or override is a labelled example: what the agent proposed, what the human did, and why. That's the training and eval set for raising a step's level.
Where the LLM is allowed to go, and where not
  • Yes: holding conversations; extracting typed facts with evidence; classifying inbound documents and messages; summarising a case for an advocate; drafting workflow definitions from an SOP (reviewed and simulation-tested before release); proposing plans for unmatched requests.
  • No: deciding eligibility, cost, sequencing, retries, when to give up, or what counts as consent. Those stay in deterministic, replayable code, so every decision has a stored reason and the same inputs give the same answer.
  • Why it matters to them: "why did the agent do that?" has to be answerable to an advocate, a patient, an enterprise customer and, eventually, an auditor.

Making it configurable

"Configurable" means different things to different people. Separate the layers, give each an owner, a storage format and a release process.

LayerWhat's in itWho changes itHow it's released
1. Platform primitivesConverse, qualify, obtain, consent, book, notify, the scheduler, guards, channelsEngineersCode review, tests, deploy
2. Workflow definitionsTracks, joins, gates, priorities, knobs (retry counts, timeouts), escalation reasons, question banks, prompts per step, autonomy level per stepEngineers + ops leadsVersioned; must pass the workflow's simulation suite; canary; each case pinned to the version it started with
3. Tenant / enterprise configWhich workflows are enabled, their rules (e.g. preferred suppliers, network lists), escalation contacts, SLAs, channels, branding and voice for patient-facing surfaces, reportingB2B engineer, then customer success, eventually the customer in a consoleVersioned per tenant, validated against a schema, previewed in simulation
4. Patient preferencesLanguage, caregiver contact and permissions, contact hours and channel, accessibility (hearing), consent recordsPatient, advocateImmediate, audited
5. Learned knowledgeVendor facts and behaviours, provider office quirks, payer phone treesThe system, with human vettingWritten continuously with provenance; facts decay and get re-verified

How a workflow is expressed: the key design choice

OptionForAgainst
A. Each workflow is code (a Python decide())Most flexible; what the take-home doesEvery new workflow needs an engineer; logic copied between workflows
B. Fully declarative language (YAML / visual graph)Ops can author; easy to visualise and diffGrows into a bad programming language; hard to test edge cases
C. An LLM planner decides every stepHandles noveltyGives up determinism, replay, auditability and cost control
D. Hybrid (recommended)Declarative tracks, joins, gates, knobs and autonomy levels; small typed code hooks for unusual conditions; a bounded planner only for unmatched requestsYou must police what goes into hooks, and keep the definition language small
"I'd keep the definition declarative for the 80% that's structure — which tracks, what joins them, which gates, what retries — with typed code hooks for the odd condition. The scheduler stays generic. That way the B2B engineer configures an enterprise variant by changing data, and every variant still gets the same tests, replay and decision log for free."

One case, through the user's eyes first

Walk this before drawing boxes. It shows user-first thinking and gives every box a reason to exist.

  1. Patient (companion, 7pm): "My doctor says I need a wheelchair. I don't know where to get one." The companion acknowledges, asks two clarifying questions (which doctor; is anyone helping at home), and says "your advocate's team will handle it; I'll keep you posted here."
  2. Intake: the message is classified as a DME request, matched to the DME delivery workflow, and a case opens with the patient's profile, plan and preferences attached. If nothing matched, the planner would draft a plan for an advocate to approve.
  3. Overnight: the system schedules everything for business hours, pre-ranks suppliers from the vendor database (already-known facts skip the call), and drafts the order request to the doctor's office.
  4. Morning (advocate): the advocate's inbox shows one item: "Approve fax to Dr. Chen's office requesting the written order" (L1, because it's PHI to a verified fax number). One click. Everything else proceeds without them.
  5. Day 1: qualification calls run in parallel (L3); facts are written back to the vendor DB with evidence. The clinic promises the order "by tomorrow" → a commitment with a verify-at time.
  6. Day 2: the promise is broken → the system calls again, then faxes. The patient gets a companion update: "Still waiting on Dr. Chen's office; we've followed up."
  7. Day 3: the order arrives by fax → OCR, classified as a written order, matched to the case, coded K0001 as expected. The cost call to the patient: informed consent recorded with the quote. Booking with the best supplier; the patient is told the date.
  8. Day before delivery: the system re-verifies the booking. After delivery: confirms with the patient, closes the case, and the supplier's reliability is updated for next time.

The advocate touched the case once. That's the autonomy metric made concrete.

Target architecture

Companionpatient chat · voice Mira agentadvocate · workmate Enterprise APIreferrals · rules Inbound worldcalls · faxes · SMS Intake & case serviceclassify → match a workflow (else bounded planner, L1) · correlate inbound to an open case Workflow runtime event logper case, append-only schedulergeneric decide() durable timers+ outbox of actions autonomy gaterisk · level · policy Primitivesconverse · qualify · obtain · commitment · consent · book · notify · human task · escalate LLM gateway + guardsconverse · extract · classify · fallbacks Channelsvoice · fax · SMS · email · portals Vendors · doctors' offices · payers · patients · caregivers Knowledge plane entities: vendors,providers, payers facts + evidence +freshness (vendor DB) patient profile, consents workflow definitions(versioned) tenant config (versioned) Human plane advocate inbox(= Mira agent, workmate) approvals · exceptionsQA sampling · overrides Eval & observability trace per step and turnrecordings + replay simulated worlds w/ truthmetrics · alerts · gates

What each part is responsible for

ComponentResponsibilityKey decision
Intake & case serviceTurn any request (companion message, advocate ask, enterprise referral, inbound fax/call) into a case on a workflow, or attach it to an existing caseClassification by LLM with a closed set of workflow labels plus "none"; "none" goes to the planner, never to a guessed workflow
Workflow runtimeDurable execution: event log, scheduler, timers, action outbox, one writer per casePostgres-based (fits their stack) vs Temporal; see below
Autonomy gateBefore any action executes, check its risk class against the step's autonomy level and policies; downgrade to "request approval" when neededA single choke point, so autonomy is changed by config and audited in one place
PrimitivesReusable state machines (converse, qualify, obtain, …), each exposing next(state, params, now)Domain-agnostic; workflow specifics come in as parameters
LLM gatewayAll model calls: routing, fallbacks, timeouts, schema validation, guards, cost tracking, PHI redaction in logsOne place for provider BAAs, retries and "this output is unusable" handling
ChannelsVoice (telephony + real-time pipeline), fax, SMS, email, portals; each produces interaction recordsEvery channel emits the same Interaction shape, so primitives don't care which channel was used
Knowledge planeEntities and facts with provenance and freshness; patient profiles and consents; definitions and tenant configFacts are append-only with evidence; "current value" is a view; stale facts trigger re-verification
Human planeAdvocate inbox with approvals, exceptions and human tasks; QA samplingThe Mira agent and workmate become the UI over this queue; every human decision is captured as a label
Eval & observabilityTraces, recordings, replays, simulations, metrics, release gatesEvery event carries workflow version, prompt version, model and autonomy level

Data model (LLD)

-- definitions and config: versioned, immutable once live
workflow_definitions(id, version, spec JSONB, status draft|sim_passed|canary|live|retired,
                     created_by, created_at, PRIMARY KEY (id, version))
tenant_configs(tenant_id, version, spec JSONB, created_by, created_at, PRIMARY KEY (tenant_id, version))
autonomy_policies(tenant_id, workflow_id, step, level SMALLINT, risk_class,
                  min_metrics JSONB, approved_by, effective_at)

-- the case and its history
cases(id, tenant_id, patient_id, workflow_id, workflow_version, tenant_config_version,
      status open|waiting_human|escalated|closed, opened_at, closed_at, outcome)
case_events(case_id, seq, type, payload JSONB, actor policy|llm|human|world|system,
            workflow_version, prompt_version, model, created_at,
            PRIMARY KEY (case_id, seq))                  -- append-only; the audit trail
case_snapshots(case_id, seq, state JSONB)                -- so replay doesn't start from zero

-- execution
actions(id, case_id, decided_at_seq, track, type, params JSONB,
        idempotency_key UNIQUE, status pending|running|done|failed|cancelled,
        attempts, next_attempt_at, result_seq)          -- the outbox
timers(case_id, due_at, reason, INDEX (due_at))
case_leases(case_id PRIMARY KEY, worker_id, expires_at)  -- one writer per case

-- humans
tasks(id, case_id, kind approval|exception|human_step, blocks_track, queue,
      assignee, status, sla_due_at, packet JSONB, resolution JSONB)

-- the world
entities(id, scope global|tenant, tenant_id NULL, kind vendor|provider|payer|pharmacy,
         name, npi, phones, fax, address, hours, timezone)
facts(id, entity_id, field, value, evidence_quote, source_interaction_id,
      observed_at, verified_by llm|human|document, expires_at)   -- append-only
interactions(id, case_id, entity_id, channel voice|fax|sms|email|portal, direction,
             started_at, ended_at, outcome, recording_uri, transcript_uri, step)
consents(id, patient_id, kind, terms, evidence_interaction_id, given_at, revoked_at)
patients(id, tenant_id, name, dob, plan, language, timezone, caregiver_id,
         contact_prefs JSONB)                            -- PHI: encrypted columns, RLS

The runtime: how a workflow executes

A workflow definition

workflow: dme_delivery
version: 8
tracks:
  supplier:
    primitive: qualify
    candidates: { source: vendor_db, filter: { serves_zip: $patient.zip, item: $case.hcpcs } }
    gates: [accepts_new_medicare_patients, stocks_item, accepts_assignment, serves_patient_area]
    rank_by: earliest_delivery_days
    converse: { channel: voice, questions: qbank/dme_supplier_v3, disclosure: minimum_necessary }
    knobs: { max_dials: 3, max_conversations: 3, parallel_calls: 3, stop_when_delivery_days_le: 5 }
    autonomy: L3
  order:
    primitive: obtain
    document: standard_written_order
    from: $case.ordering_provider
    ladder: [ { channel: voice, attempts: 3 }, { channel: fax, verify_after: 1bd } ]
    expect: { hcpcs: $case.hcpcs }          # mismatch → ORDER_CODING_MISMATCH
    autonomy: { voice: L3, fax: L1 }        # fax carries PHI: approve until recipient verified
  consent:
    primitive: consent
    subject: $patient
    terms: { coinsurance: "20%", item: $case.item }
    requires: [ supplier.has_qualified ]
    autonomy: L2
joins:
  book:
    primitive: book
    requires: [ supplier.best, order.received, consent.yes ]
    steps: [ send_order_to_supplier, schedule_delivery, reverify_day_before ]
then: [ notify(patient, delivery_window), verify_delivered, close ]
escalations: [ no_qualified_supplier, order_unobtainable, order_coding_mismatch,
               patient_declined_cost, consent_not_informed, patient_unreachable, stuck ]
priorities: [ order, supplier, consent, book ]   # longest pole first

The same primitives, a different workflow: the companion's "ask my cardiologist".

workflow: provider_question
version: 2
tracks:
  ask:
    primitive: converse
    party: $case.provider_office
    goal: "get an answer to the patient's question"
    payload: { question: $case.patient_message }
    precheck: [ patient_authorised_contact, provider_verified_number ]
    on_promise: commitment             # "nurse will call back tomorrow"
    autonomy: L3
joins:
  relay:
    requires: [ ask.answered ]
    primitive: notify
    to: $patient
    content: verbatim_with_source      # never paraphrase clinical content
    route_to_advocate_if: [ answer_is_clinical_judgement, patient_distress ]
    autonomy: L2
escalations: [ provider_unreachable, answer_needs_clinician, stuck ]

The generic scheduler (today's decide(), generalised)

def decide(case, defn, now) -> list[Action]:
    if (t := defn.terminal_condition(case)):            # coding mismatch, declined, …
        return [Escalate(t.reason, packet(case))]

    ready, due = [], []
    for track in defn.tracks_and_joins():
        if case.blocked(track) or not track.requirements_met(case):
            continue
        result = PRIMITIVES[track.primitive].next(case.state(track), track.params, now)
        match result:
            case Act(action):     ready.append((track.priority, track, action))
            case DueAt(t):        due.append(t)
            case Failed(reason):  return [Escalate(reason, packet(case))]
            case Done():          pass

    if ready:
        chosen = pick(ready, max_parallel=defn.knobs.parallel_actions)  # by priority
        return [autonomy_gate(case, track, a) for _, track, a in chosen]  # may become RequestApproval
    if due:
        return [Wait(until=min(due))]
    if case.open_tasks():
        return [Wait(until=next_business_day(now))]
    return [Escalate("stuck", packet(case))]           # the watchdog: never idle silently

The execution loop

trigger: new event on a case, or a timer is due
  └▶ worker takes the case lease (one writer per case; SELECT … FOR UPDATE SKIP LOCKED)
       └▶ load snapshot + events since → state
            └▶ decide(state, definition@pinned_version, now) → actions
                 └▶ ONE transaction: append ActionDecided events + insert outbox rows + set timer
  executors (separate pools per channel) pick outbox rows
       └▶ perform with idempotency_key (call, fax, SMS, model call) — minutes, not milliseconds
            └▶ append result events (CallCompleted, FactsExtracted, FaxDelivered …) → triggers the case again

Build on Postgres, or adopt Temporal?

Postgres event store + outbox + timersTemporal
FitMatches their stack (Postgres, FastAPI); the take-home already replays deterministicallyPurpose-built: durable timers, retries, signals, history; workflow code must be deterministic, activities do the I/O
CostYou build leases, timers, retries, versioning yourselfNew infrastructure to run (or a paid cloud), new mental model, versioning rules for workflow code
QueryingCases and events are just tables: dashboards, metrics and the advocate UI read them directlyHistory lives in Temporal; you still project into Postgres for product queries
My callStart on Postgres with a small, well-tested runtime (team of 6–7, one stack). The mapping to Temporal is clean (decide = workflow code, primitives = activities, events = history), so migrate if timers and retries start to dominate the engineering time.

Inbound: when the world pushes back

The human plane: advocates as part of the system

Voice: the channel that carries most of the work

"One person leads all of voice" across vendor calls, the companion, activations and the workmate. A platform view of voice:

ConcernDesign
Shared voice runtimeOne real-time pipeline (telephony → STT → turn detection → LLM → TTS) used by every voice surface; each workflow step supplies a call spec: party, goal, questions, disclosure policy, persona, max duration. Outbound and inbound use the same pipeline.
Outbound to offices and vendorsIVR navigation (send DTMF; listen to spoken menus; per-entity learned phone trees stored in the knowledge plane, e.g. "press 2 then 4 for orders"); hold detection with a cheap listener (VAD plus a classifier) instead of the LLM during hold music; voicemail detection with a per-workflow policy (leave a message or not; never PHI in a voicemail).
Handoff to a humanWarm transfer to an advocate with a whispered summary, or a "conference in" for a difficult call; the call record continues on the same case.
Patient-facing voiceOlder callers: slower speech rate, shorter sentences, patience with long pauses, confirm numbers digit by digit, offer to repeat; caregiver as a second contact.
DisclosureAI and recording disclosure as part of the converse primitive, configured by jurisdiction; identity verification before discussing anything about the patient.
QualityPer-turn traces linked to audio; replayable calls; per-call outcome scoring (did we get the facts? were they right?); regression suites of recorded calls with known outcomes.
Capacitye.g. 5,000 calls/day × ~6 min ≈ 30,000 call-minutes over ~8 business hours ≈ 60 concurrent on average, ~200 at peak (Little's law; peak ≈ 3×). Long holds with payers inflate this, which is another reason to keep the hold listener cheap.

Quality as a number: evals for a platform

Four layers of evaluation

LayerWhat it checksHowWhen it runs
1. DeterministicScheduler, primitives, definitions: given these events, this decisionUnit tests and golden event logs, no model (the take-home's 87 tests)Every commit
2. ComponentsExtraction accuracy per field; converse behaviour (asks one thing, no invented identifiers, discloses nothing extra)Labelled transcripts with per-field truth; precision and recall per field; guard red-team setsEvery prompt or model change
3. WorkflowsEnd-to-end outcomes against a simulated world that knows the truthPersona decks per workflow, many seeds, repeated runs with variance; metrics: resolved without a human, correct escalation, wrong facts acted on, calls and days per caseEvery definition release; nightly
4. ProductionReal outcomes and driftShadow mode for new versions, canary by tenant, sampled human QA (the call-review team), LLM judge calibrated against human labels, alerts per metricContinuously

The metrics that matter

MetricWhy
Advocate touches per case (and minutes per case)The business metric for autonomy: more patients per advocate
Autonomous resolution rateShare of cases closed without an exception
Correct-escalation rateEscalating the right cases is success, not failure; escalating avoidable ones is the improvement backlog
Wrong-fact-acted-on rateThe safety metric: a wrong "accepts assignment" costs the patient money
Time to resolution (days) and patient-visible updatesWhat the patient feels
Calls per case, cost per caseEfficiency; vendor-DB reuse should push calls down over time
Approval rate per step (unchanged / edited / rejected)Evidence for raising or lowering autonomy
Compliance violations (PHI to an unverified party, missing disclosure)Must be zero; any one is a release blocker
Autonomy promotion is an eval-gated release

To raise a step from L1 to L3 for a tenant: at least N recent cases at L1 with an unchanged-approval rate above a threshold, zero severe errors, the simulation suite passing at the new level, then a canary with sampled QA. To lower it: automatically, when an alert fires (e.g. extraction accuracy drops after a model change). Autonomy becomes a dial the system turns with evidence.

B2B: configurable per enterprise

Domain and compliance facts that shape the design

Researched 18 Nov 2026. Use these to make design choices concrete, not to lecture. Rules change; where it says unverified, phrase it as "my understanding is…".

Medicare DME rules → design consequences

FactDesign consequence
Written order elements: beneficiary name or MBI, item description, quantity, order date, practitioner name or NPI, practitioner signature. 42 CFR 410.38(d)The obtain primitive's document validator checks these six fields on an incoming order; a missing signature is a typed "order incomplete" branch, not a human surprise later.
When the order must be on file: before delivery for power mobility devices and items on CMS's Face-to-Face/Written Order Prior to Delivery list; otherwise before the claim is submitted. 410.38(d)(1)(ii) CMSThe take-home blocked booking until the order arrived for every item. That's conservative. A platform makes it a per-item rule in the workflow definition: requires: order.received only where the item is on the list. Good example of "rules as data".
Prior authorization list includes power mobility devices, some support surfaces, orthoses, some prosthetics, pneumatic compression devices, and the K0005 ultralight manual wheelchair from 28 Oct 2026; standard decisions within 7 calendar days, expedited 2 business days. CMSA prior-auth track is an optional track switched on by item code: obtain(decision from the contractor) with a commitment due in 7 days. Same primitives, new configuration.
Capped rental: monthly rental up to 13 months of continuous use, then ownership transfers. 42 CFR 414.229 Medicare.gov: "You may have to rent your manual wheelchair first." K0001 is commonly described as capped rental (not confirmed in the fee schedule file).The cost explanation should say "20% of each monthly rental payment", not a one-off share. The take-home framed it as a purchase; a coverage-terms model makes the consent step accurate.
Assignment: a supplier that accepts assignment is paid by Medicare directly and can charge only the deductible and coinsurance; others may charge more. For rentals, assignment must be accepted for every month. Medicare.gov bookletWhy "accepts assignment" is a hard gate, and why it's re-confirmed at booking time.
Competitive bidding: no round active in 2026; next contracts targeted no later than 1 Jan 2028, bidder registration from 1 Dec 2026. CMSWhen it returns, contract status becomes another qualification gate per item and area: a config change if gates are data.
Finding suppliers: Medicare's supplier directory and a bulk CMS dataset. data.cms.govSeed the knowledge plane's entities from the dataset; calls then add the facts the dataset lacks (stock, speed, behaviour).
Medicare Advantage: members must check their plan for costs and which suppliers they can use; MA prior-auth decisions are due in 7 calendar days (standard) and 72 hours (expedited) since 1 Jan 2026. CMS-0057-FPlan type selects different gates (network membership) and different prior-auth rules: the strongest argument for tenant- and plan-level configuration.

Privacy and calling rules → design consequences

FactDesign consequence
HIPAA minimum necessary: limit PHI to the minimum needed; disclosures to a provider for treatment and to the individual are exempt. HHSEach workflow step declares its disclosure scope; the converse primitive only receives those fields (the take-home's qualification call got no identifiers at all).
Verification: verify the identity and authority of an unknown requester before disclosing. 45 CFR 164.514(h)Identity checks are a step in the converse primitive before any patient detail is discussed, especially on inbound calls and callbacks.
BAAs: a cloud provider that handles ePHI is a business associate even if data is encrypted. HHS OpenAI, Anthropic, AWS Bedrock, Google Cloud and Twilio publish BAA options, each with conditions (e.g. retention settings, excluded features, plan tiers).The LLM gateway only routes PHI to providers under a BAA, with the right retention configuration; a fallback provider must also be covered, or the fallback path strips PHI.
AI voices under the TCPA: the FCC ruled in Feb 2024 that AI-generated voices are "artificial" voices, so those calls need prior express consent unless exempt. FCC There is a health-care message exemption for covered entities and business associates, with conditions; calling hours of 8am–9pm local apply to solicitations. 47 CFR 64.1200Consent records per patient (the consents table); calling windows per recipient timezone as a channel rule even where not strictly required; identification and opt-out handling built into the voice runtime. Confirm the exact obligations with counsel.
Recording consent: federal law is one-party; several states require all parties for phone calls (California, Florida, Illinois, Pennsylvania, Washington and others; lists vary by source). RCFPDisclose recording at the start of every call, everywhere. Simpler than per-state logic and safe.
AI disclosure: California's bot law covers communicating "online" to sell or influence a vote; whether it reaches phone calls is unclear to me.Disclose that it's an AI assistant anyway: it's a trust decision, and it avoids the take-home's "Sam Rivera" problem.
Fax persists because counterparties choose their own technology; HIPAA-oriented fax APIs exist. Documo (vendor source)Fax is a first-class channel with inbound OCR and correlation, not an afterthought.

Two references worth naming

Scale assumptions (if asked to estimate)

QuantityAssumption (state it as such)Consequence
Patients50,000Small for Postgres
Active cases~5–10% of patients have an open case → 2,500–5,000Scheduler work is tiny; correctness matters more than throughput
Events~100–200 per caseUnder a million rows per month; one Postgres is fine for a long time
Outbound calls~5,000/day~60 concurrent average, ~200 peak; the voice runtime is the scaling problem, not the database
Recordings~30,000 min/day × ~0.5–1 MB/min ≈ 15–30 GB/dayObject storage with lifecycle rules and retention policy
Model calls~2 per conversational turn + extractionCost per case is a tracked metric; the LLM gateway enforces budgets

The point to make: this is a correctness-and-reliability problem far more than a throughput problem. The hard parts are durable state, idempotency, verification and safe autonomy, not QPS.

Failure walk

FailureWhat protects you
LLM provider down or rate-limitedGateway fallback to a second provider; infrastructure errors are retried and never counted as a "no answer"; a circuit breaker; cases wait rather than fail
Telephony provider downCalls queue in the outbox; time-sensitive steps escalate after a deadline; a second carrier route if volume justifies it
The agent extracts a wrong factPer-field evidence plus an entailment check; cross-source verification before high-risk actions; re-verification of stale facts; humans see the evidence in the packet
A vendor agrees, then goes silentCommitment with verify-at; two broken holds → disqualified (a named knob, not engine logic)
A case stalls with nothing dueThe scheduler never returns silent idle: "stuck" escalation; plus a watchdog query over cases without timers
Worker crashes mid-decisionDecide + outbox in one transaction; the lease expires and another worker resumes from the log
Duplicate execution (retry after timeout)Idempotency key per action; providers' idempotency where available; the executor checks the action's status first
A bad prompt or definition releaseSimulation gate before release; canary by tenant; per-version metrics; instant rollback; cases pinned to their version
PHI disclosed to the wrong partyIdentity verification in the converse primitive; minimum-necessary disclosure per step; verified fax numbers from the knowledge plane; any PHI-sending step starts at L1
10× volume spikeThe voice runtime autoscales on concurrent calls; per-tenant limits; low-priority work (vendor enrichment) is shed first

How it evolves: a plan for a 6–7 person team

PhaseWhatProof it worked
0 · Weeks 1–3Extract primitives from the DME workflow; DME becomes a definition; Postgres event store, outbox, timers, leases; the watchdogGolden replays: same seeded worlds give identical decisions
1 · Weeks 4–8Second workflow on the same runtime: the companion's provider question (already live as a product, so real traffic); facts written back to the vendor DB; advocate inbox for approvals and exceptionsNo new runtime code needed for workflow two; advocate touches per case measured
2 · Months 3–4Inbound: fax intake and correlation, callbacks; autonomy policies per step and tenant; eval layers 2–3 per workflow; shadow and canaryFirst autonomy promotion done on evidence
3 · Months 4–6Tenant config layer for B2B; bounded planner for unmatched companion requests; workmate on top of the inboxA new enterprise variant configured without new code
LaterDefinition authoring tools for ops (LLM drafts from an SOP, simulation-gated); enterprise self-serve console; learned IVR trees and vendor behaviourOps ships a workflow change safely without an engineer ("non-engineers can ship changes safely", their own words)
Risks to name yourself
  • Over-generalising too early: designing the definition language before the third workflow exists.
  • Primitives absorbing domain detail: "K0001" creeping into qualify.
  • The LLM creeping into decisions through hooks or the planner.
  • Autonomy outrunning verification: acting on facts the system can't check.
  • Platform work starving product work: sequence it so each phase ships something users feel.

Likely questions, with strong answers

"How would you make this agent more autonomous?"

First define it: the share of a case's steps completed correctly without a human, at acceptable risk. Then three levers. (1) Grant autonomy per step on a ladder (suggest → draft → act and report → act and escalate on exceptions → audited), based on risk, reversibility and whether we can verify the outcome. (2) Shrink the escalation distribution: every escalation has a typed reason, so each month the top reason becomes a handled branch. (3) Give it the inputs it lacks today: inbound faxes and callbacks, memory that outlives the case (vendor facts, office behaviour), and verification so it can check its own work. Promotions are eval-gated: approval rates at the lower level, simulation passes, canary.

"Why not give an LLM agent all the tools and let it figure it out?"

For the long tail, a bounded version of that is exactly what I'd do: the planner composes allowed primitives into a proposed plan an advocate approves. But for the core workflows, the decisions that matter (eligibility, cost, consent, when to give up) need to be the same twice, explainable to an advocate or a patient, testable without a model, and cheap. A tool-calling loop makes every decision a model output you can only evaluate statistically. Keeping decisions in code with the LLM at the edges is what let the take-home run 87 tests with no API key. As models improve, the planner's scope grows and approved plans get promoted into workflows: workflows where you can, agents where you must.

"An ops lead wants a CPAP resupply workflow next week. What do they do?"

CPAP resupply reuses the primitives: converse with the patient (still using it? supplies needed?), obtain an updated order or usage data if the plan requires it, consent on cost, book the shipment, notify. They write (or the LLM drafts from the SOP) a definition with those tracks, the gates, the question bank and the autonomy levels, all starting at L1. It must pass a simulation suite with CPAP personas before release; then canary on a few patients with advocate approval on every step; autonomy rises with evidence. If the workflow needs a genuinely new verb, that's an engineer adding a primitive, and it's the signal that the abstraction is being tested properly.

"How do you decide what needs human approval?"

Three questions per action: how bad is it if wrong, can it be undone, and can we verify the outcome independently. Asking a vendor what they stock is low-risk, reversible and verifiable, so it runs alone. Sending a document with PHI is irreversible, so it starts at "draft and approve" until the recipient is verified. Anything resembling medical or plan-selection advice is never autonomous. These are stored as autonomy policies per step and tenant, enforced at one choke point, the autonomy gate, so changing them is config with an audit trail.

"How do you know the facts it extracts are right?"

Layered: the extractor must quote evidence from the other party's words; an entailment check confirms the quote supports the value (the take-home's word-overlap check could be fooled by a negation, which I'd fix this way); high-risk facts are cross-checked against a second source (the vendor DB, a document, a second call) before acting; facts carry freshness and get re-verified when stale. Offline, per-field precision and recall against labelled calls and simulator truth; online, the advocate's edits are labels.

"A supplier said 'yes, we accept assignment' but they don't. What happens?"

Containment first: the booking flow re-confirms critical gates at booking time ("just to confirm, you'll bill Medicare directly and accept the approved amount?"), so a wrong early answer is caught before the patient is committed. If it still slips through, the patient's cost turns out wrong: escalate to the advocate, correct the fact in the vendor DB with the new evidence and lower that vendor's reliability score, and the case shows who said what and when. And it becomes a test case: a persona that lies about assignment.

"An enterprise customer wants different rules. How?"

Ask who they are first: a plan, a provider group, an employer. Their differences go in the tenant config layer: enabled workflows, preferred or contracted suppliers as a ranking rule or extra gate, escalation contacts and SLAs, branding and channels, reporting. Validated against a schema, previewed by running the simulation suite with their config, canaried. Tenant isolation with row-level security and per-tenant eval sets. The B2B engineer configures instead of forking code.

"A patient messages the companion at 2am: 'my chest hurts'. What does the system do?"

Safety triage runs before any workflow matching: rules plus a classifier, biased toward false positives, detect urgent symptoms. The response is fixed, not generated: advise calling 911 or emergency services, and alert the on-call clinical contact per the tenant's protocol. No autonomous medical advice. This is a hard boundary in the intake service, tested with a red-team set, and it's exactly where determinism matters most.

"How do you test a new workflow or prompt before it goes live?"

Four layers: deterministic tests on the definition (given these events, this decision); component evals on extraction and conversation behaviour; workflow simulations with personas that know the truth, across many seeds with variance; then production shadow mode (run the new version silently and compare decisions), canary by tenant, sampled human QA. Every event carries workflow, prompt and model versions, so regressions trace to a change.

"You change a workflow definition. What happens to cases already running?"

They stay pinned to the version they started on, so the meaning of their history never changes. For an urgent fix, an explicit migration: replay each case's events through the new definition in a dry run, compare decisions, then move the ones that are safe. Old events are converted to the new format when read (upcasting), never rewritten.

"How does the workmate fit into this architecture?"

The workmate is the voice and attention layer over the human plane. The platform produces approvals, exceptions and human steps, prioritised by SLA and patient risk; the workmate walks the advocate through them ("three approvals waiting; first…") and can take actions by voice. The more autonomy the platform has, the more the workmate shifts from "do this task" to "review these decisions".

"What breaks first at 10×?"

Not the database: case and event volumes are small. It's the voice runtime (concurrent calls, provider concurrency limits, hold time inflating concurrency), the advocate queue (exceptions grow with volume unless autonomy grows faster), and model cost. Mitigations: autoscale voice workers on concurrent calls; shed low-priority work like vendor enrichment first; the escalation-to-branch loop to keep human load flat; budgets in the LLM gateway.

"How do you keep PHI safe with third-party models and voice vendors?"

Business associate agreements with every vendor that touches PHI; minimum-necessary payloads per step (the qualification call in the take-home gives the agent no identifiers at all, so it can't leak any); PHI redaction in logs and traces; encrypted PHI columns and row-level security; access audit on recordings; retention policies. Identity verification before discussing a patient with anyone. I'd confirm the specifics with their compliance lead rather than assert them.

"Two events arrive for the same case at once. What happens?"

One writer per case: a lease (row lock with expiry). Both events are appended to the log (appends are cheap and ordered by sequence); the worker holding the lease folds both before deciding. Executors never touch case state directly; they only append result events. So there's no lost update, and decisions always see a consistent state.

"How does the vendor database stay trustworthy?"

Every fact is an observation with evidence, source and date, never an overwrite. Each field type has a freshness window (stock changes weekly, accepted insurance rarely), after which it's re-verified before use. Facts verified by humans or documents outrank facts from a single call. Conflicting observations lower confidence and trigger a re-check. Vendor behaviour (answer rates, broken promises) is tracked too, and ranks who to call first.

"How would you measure call quality?"

Per call: did we get the facts we needed (task success), were they right (against later verification or labels), did we disclose nothing extra, how many turns, how long. Per turn: latency from end of speech to first audio, interruptions, misunderstandings ("sorry, can you repeat"). Store per-turn traces linked to audio so any bad outcome can be traced to STT, the model or the conversation design. Recorded calls with known outcomes become regression suites for prompt and model changes. I'd be honest that in my current work I have per-stage latency metrics and traces, but audio-linked replay is something I've designed, not shipped.

"How would you handle phone menus (IVRs) when calling offices?"

I haven't shipped IVR navigation, so I'd say that and design it: detect a menu (speech classification of prompts), choose an option by matching the menu text to the goal, send DTMF, and learn the path per entity ("press 2, then 4") in the knowledge plane so the next call skips the exploration. Hold: a cheap listener detects hold music and the return of a human, so the LLM isn't running for 30 minutes. Voicemail: detect it and follow the workflow's policy, never leaving PHI.

"Build or buy: Temporal, voice platforms, fax?"

Workflow runtime: build a small one on Postgres first because the decide/event model already exists and it keeps one stack; Temporal is the escape hatch. Voice: buy telephony (a CPaaS or SIP trunk) and use a framework for the real-time pipeline, but own the call spec, evals and disclosure logic, because that's the product. Fax: buy an API. Models: multiple providers behind our own gateway. The rule: buy commodity plumbing, own anything that encodes care-advocacy judgement or quality measurement.

"What would you do in your first 30 days?"

Listen first: sit with advocates and the call-review team, and read a week of escalations to see where human time actually goes. Then pick one workflow with real traffic, instrument it end to end (advocate touches per case, escalation reasons, call outcomes), and ship one escalation-to-branch improvement with a measured before/after. That builds trust and the measurement backbone the platform needs, before any big refactor.

Bridges from your own experience

Use these as one-sentence proofs, not detours. Keep each claim to what you actually built.

When they ask aboutWhat you can honestly say
Voice in productionYou built and run a SIP ingress (proxy → media server → real-time agent) and a voice agent with streaming STT/TTS, where a deterministic state machine sits in the model's slot in the pipeline. It runs on WhatsApp calling SIP, not a PSTN carrier; say so.
Deterministic core, LLM at the edgesThe same principle in the take-home, the voice agent's orchestrator, and a context store where reference resolution goes structural → lexical → constrained LLM, each tier's output validated.
Event-sourced stateA reducer producing one transactional set of writes per turn, replayable from fixtures.
EvalsTwo tiers: deterministic replay of fixtures as the CI gate, and invariant-only checks on the live stack as a drift detector, never a gate. That's the same split as layers 1 and 4 above.
Primitives and orchestrationYour current work is composing reusable primitives into workflows with an orchestration layer and a separate knowledge store, which is this platform's shape. Speak about it in general terms.
Gaps (say them plainly if asked)No PSTN carrier work, no IVR navigation, no shipped voice replay harness (designed only), no formal HIPAA programme experience.

Questions to ask at the end

Checklist for today