How Chapter Built a HIPAA-Compliant Copilot to Support 500K Medicare Enrollees
Chapter's copilot listens to Medicare calls and helps advisors identify doctors and prescriptions faster than they could search for the information themselves.
500,000+
Seniors helped through Medicare enrollment
Hundreds of hours
Saved every week across 200+ advisors
Chapter is a tech-forward insurance broker and advisor. They've helped over 500,000 senior citizens navigate Medicare enrollment since their 2020 founding.
Their Mastra-based copilot already saves a few minutes on each intake call, adding up to hundreds of hours every week across their 200 Medicare advisors. And that's just the beginning; they're working to triple the time saved as they roll out additional use-cases.
Finding the right information during calls
Advisors use Chapter's recommendation engine to compare the options available to each enrollee. The right plan depends upon a person's doctors, prescriptions, pharmacy, and health conditions.
The problem is that seniors often don't remember the exact location or full name of every doctor they see. On the phone, the customer may say, "I see Dr. Smith on Main Street" and the advisor then has to search near the caller's ZIP code, work through the possible matches, and confirm which doctor the person means.
It's even harder with prescriptions. A caller may take ten medications, but not remember their names, dosages, and tablet sizes offhand. The advisor has to translate partial information into an accurate medication list.
Before Mastra, the advisor would manually search while trying to keep their counterpart engaged. Now, Chapter's copilot does the heavy lifting. It listens to the live transcript and provides the advisor with the most likely options to review.
The team is constantly tuning their copilot to improve speed. The enrollee says something on the phone and the advisor is already moving through the workflow. It has to be lightning fast.
"We're creating a new paradigm of how an AI and human work side by side together on the same thing, fast enough so that the human doesn't start doing the thing when AI is already working on it." — Darshan Desai, CTO & President, Chapter
Why Mastra instead of building from scratch
Chapter initially tried to build the copilot without a framework. But very quickly they noticed they were just rebuilding a lot of the same tools that people had built in the past. They heard about Mastra through another company that recommended the framework, and decided to test it.
"We were up and running pretty quickly. What was most exciting was seeing the automatic traces and how easy it was to set up tools and agents. I think that kind of sold us on it," says Darshan Desai, CTO & President at Chapter. The team could focus on building a great product rather than worrying about agent infrastructure.
Chapter also considered managed agentic voice services, but they didn't have enough flexibility. Being able to quickly plug into whatever provider they wanted was an important factor.
"Building on Mastra gives me superpowers. It makes things that seem pretty challenging to do much easier and much faster. Writing this framework code ourselves at scale would just break or heavily delay us. I am confident the tools that Mastra has have been battle tested and will work well even if we go to 5x the volume we have today on it." — Darshan Desai, CTO & President, Chapter
The architecture: Breaking a call into tasks
The copilot is made up of one tool-calling Mastra agent and several structured Mastra workflows. One extracts prescriptions, another identifies people mentioned on the call, and so on.
The tool-calling agent searches Chapter's database by phone number, matches the caller to an existing profile, or calls the tools needed to create a new one.
Each workflow pulls the latest transcript and reads or updates a shared live-call state object in Redis. That state tracks the people, prescriptions, pharmacies, and profile information identified so far.
The team initially explored putting more of the work into one agent. But they went with parallel, specialized workflows that can run without waiting for unrelated work.
"We found that fanning out the different calls at the same time was a lot faster than just putting everything in one agent, to minimize context draw and also just have good separation of concerns." — Hamza Mostafa, Software Engineer, Chapter
Extracting a prescription can happen quickly, while resolving an incomplete doctor reference may require several searches and API calls. Chapter can keep the immediate path moving with those "side quests" running alongside it.
To maintain HIPAA compliance, Chapter self-hosts Mastra and stores the resulting observability data in its own database.
What's next
The team started with prescription extraction, which is already live. The doctor-search component is being rolled out more widely.
After that is underwriting. Insurance carriers encode different eligibility rules in long PDFs—things like combinations of health conditions, height, and weight. Chapter has built another Mastra-powered agent that assesses those rules in real time and suggests what questions the advisor still needs to ask to understand if the caller will pass underwriting.
With these new pieces in place, the team estimates the copilot could save 15 to 20 minutes on an hour-long call. Across its 200 advisors, that could save the team (and its end users) over 1,000 hours per week.
For Chapter, the long-term bet is to give the advisor an interface that can search, interpret, and act on the conversation faster than the advisor could do alone, while still leaving the final judgment on their side.
