Design a Multi-Agent Healthcare Operations System
Design the AI agents that run a healthcare provider's front office, covering patient records, appointments, prescriptions, billing and insurance checks, and decide how many agents there are and how they are orchestrated.
Problem statement
Design a multi-agent AI system for a healthcare provider's front office. It handles patient records, appointments, prescriptions, billing, and insurance eligibility checks, and you decide which agents to build, how many, and how they work together.
No prescription goes out without a clinician's approval, and no patient is ever charged twice.
For this exercise, assume:
Framework. You build on a graph-based agent framework such as LangGraph. Each agent or fixed step is a node in a graph, edges decide which node runs next, and the framework saves the shared run state after every step, so a run can pause and continue later.
Users. The provider runs about 100 outpatient clinics. Patients sign in to a web portal and chat with the assistant. Front-desk staff use the same assistant in an internal console and act for a patient they select. Clinicians review prescription requests in a work queue.
Existing systems. The clinics already have a patient record system (the source of truth for patient details, insurance on file and active prescriptions), a billing system that records charges and balances, a card payment processor, a network that delivers approved prescriptions to pharmacies, and a clearinghouse: one service that forwards eligibility questions to many insurers. Your design covers the agents, how they are orchestrated, and the services they call to read and change data, including the appointment calendar, refill requests and payments.
Patient records. A patient can read and update their own contact details and insurance on file. Staff can do the same for the patient they act for.
Appointments. A user can find open slots and book, reschedule, or cancel a visit. One slot holds at most one appointment.
Insurance eligibility. When a visit is booked, the system asks the patient's insurer whether coverage is active on the visit date and what the copay is (the fixed amount the patient pays for the visit). Insurers can be slow or down. A visit can still be booked when the answer is not covered or not yet known; the patient sees which one it is, and staff follow up.
Prescriptions. A patient can ask to refill an active prescription. The assistant drafts a refill request, a clinician approves or rejects that exact draft, and only an approved refill is sent to the pharmacy, once.
Billing. A patient can see their bills and pay the balance of a bill by card. Amounts come from the billing system, never from the model. The patient confirms the exact amount before paying, and a retried payment never charges twice.
Patient data. Health details tied to a person are protected health information (PHI). Each user sees only the patients they are allowed to see, the model receives only the data a task needs, and every access to patient data is recorded.
Out of scope: medical advice and diagnosis (the assistant hands clinical questions to staff), insurance claim submission, phone and voice channels, training models, and running in more than one region.
What to build
- A signed-in patient, or a staff member acting for a patient, can ask in plain language to read or update the patient's contact details and insurance on file, and to find, book, reschedule, or cancel a visit. One slot never holds two appointments.
- When a visit is booked, the system checks with the patient's insurer whether coverage is active on the visit date and what the copay is, and shows covered, not covered, or not yet known without blocking the booking.
- A patient can ask to refill an active prescription. A clinician approves or rejects the exact drafted request, the patient sees its status, and only an approved refill is sent to the pharmacy, once.
- A patient can see their bills and pay a bill's balance by card after confirming the exact amount, and a retried payment never charges twice.
At scale
- For this exercise, assume 1 million patients, about 40,000 conversations a day, and up to 20 new messages per second at the Monday-morning peak.
- For this exercise, assume a simple question, such as when the next appointment is, starts getting a reply within 3 seconds for 95% of requests (p95), while an insurer's eligibility answer can take up to 30 seconds and some insurers are unavailable for hours.
- For this exercise, assume a run waiting for a clinician can stay paused for up to one business day, and records of access to patient data are kept for six years.