CareGap
Team consisting of a Principal Software Engineer from 101GenAI who builds in-house AI models and scales platforms handling 11M requests/day using Python/AWS.
Project Description
Care Gap Voice Agent
This project is a care gap closure assistant that turns static healthcare data into a proactive, voice-first agent that talks to patients about overdue care and books follow‑up appointments end‑to‑end. It is designed for real-world clinical workflows where providers need to close gaps like missed diabetes check-ups, mammograms, and chronic disease follow-ups without relying on manual phone outreach.
Real-world problem and use case
Healthcare systems already know which patients are overdue for tests or visits, but closing those gaps requires staff to call, explain, and negotiate appointment times. That process is slow, expensive, and often not tailored to the patient’s language or context. This project automates that loop: given patient info, care gap details, and available slots, an AI voice agent reaches out, explains why the visit matters in simple language, answers basic questions, and books an appointment that is written back into the system and visible on a dashboard.
In production, this could run in the background for a clinic or health plan, continuously ingesting care gap lists, initiating calls or browser-based voice sessions, and converting unclosed gaps into scheduled visits while still giving staff oversight through a UI that shows status, transcripts, and confirmed bookings.
Core flow and behavior
The core flow is:
- A backend receives or stores patient records, their preferred language, and care gap signals (e.g., “A1C overdue,” “mammogram due”).
- An orchestration layer aggregates that into a clean context bundle: who the patient is, what the gap is, what evidence supports it, which clinician is responsible, and which time slots are available.
- A voice agent, powered by a conversational AI service, uses this structured context (not ad hoc prompts) to speak naturally with the patient: greeting them by name, explaining the gap, and offering appointment options.
- When the patient verbally agrees and chooses a time, the agent calls a booking action in the backend, which creates an appointment object and stores it (e.g., in Redis or a database).
- A web UI shows patient cards with active care gaps, a live or simulated conversation transcript, a visual care gap progress bar, and the final appointment card once booked.
This flow mirrors how a human care coordinator works today but runs continuously and can scale to thousands of patients.
How it demonstrates an agent
The system behaves as a true agent rather than a static chatbot:
- It has a clear goal (close a specific care gap by booking an appointment).
- It has tools: functions to fetch patient data, find care gaps, look at reports, and book appointments.
- It plans and acts: it uses context to decide what to say, when to offer booking, and when to call the booking tool.
- It updates environment state by writing confirmed appointments into a store that downstream systems and humans can read.
The voice channel is central: instead of requiring patients to read SMS or log into portals, the agent speaks in their preferred language, which is closer to how outreach works in many real-world settings.
Technology and architecture
The implementation is intentionally pragmatic and production-minded:
-
Backend and orchestration: Python-based service that defines tool-like functions such as
get_patient,get_reports,find_caregap, andbook_appointment. These functions encapsulate core healthcare logic and would, in a real deployment, connect to EHRs, scheduling systems, or care management platforms. - Agent / logic layer: A small orchestration layer that builds structured context objects for each patient (demographics, language, care gap description, evidence, priority, doctor, and available slots) and exposes a booking callback that can be invoked by the voice agent when the patient confirms a time.
-
Voice and AI: A conversational AI voice service (e.g., ElevenLabs) that provides natural TTS and, optionally, speech recognition. The agent is configured with instructions like “act as a caring healthcare assistant” and receives context variables and a
book_appointmenttool it can call with{ date, time }when the patient agrees. - Frontend UI: A React web app that lists patients with open care gaps, shows structured care gap information (description, evidence, priority, assigned doctor), visualizes progress from “gap identified” to “appointment booked,” surfaces the conversation transcript, and renders a confirmation card for the new appointment.
-
State and storage: Mock patient and care gap data stored in code for demo, with an appointment store (e.g., in-memory or backed by Redis) to hold confirmed bookings and make them available to both the UI and any downstream integrations.
This stack is intentionally close to what a real health system could adopt: swap mock data for actual EHR APIs, plug in a real scheduling backend, and deploy the voice agent behind secure telephony or web voice channels.
Real-world impact and extensibility
In real deployments, this agent can:
- Reduce staff workload by handling first-line outreach and scheduling, leaving complex cases to humans.
- Improve adherence by proactively contacting patients in their own language with tailored explanations.
- Provide auditability and transparency via stored conversation context, appointment records, and dashboard views.
- Generalize beyond a single condition to multiple chronic diseases, preventive screenings, immunizations, and post-discharge follow-ups.
The same pattern—structured context + tools + voice agent + UI—can be extended to other domains: medication refills, lab result explanations with next steps, or remote monitoring check-ins. The care gap closure assistant is a focused but highly realistic example of what agentic systems can do in healthcare today.