Building an AI agent that remembers for a connected-care platform

About the project

The client
A US connected-care platform that links payors, providers, and pharmacies for tens of millions of members, running high-volume care coordination and follow-up across chat, voice, and web.
The challenge
Their existing assistant started every session cold. Members re-explained their history, coordinators repeated context, and multi-day workflows lost the thread. That drove up cost, weakened personalization, and eroded trust in a setting where a wrong recollection has real consequences.


The approach
We treated memory as a first-class, governed subsystem, not a prompt trick. Four memory types work together behind a retrieval layer, so the agent recalls what matters, grounds answers in the member's own records, and improves with use while staying inside a HIPAA-ready boundary.
The impact
The outcome the client measured: more follow-ups completed on time, because coordinators picked up multi-day cases where they left off instead of rebuilding context. Members stopped re-explaining themselves, cost per interaction fell from full-history prompts to retrieval-only, and every clinical statement stayed traceable to a source record.
How we built it
The agent serves members, care coordinators, and clinicians, so the build had to keep one bounded, auditable memory system behind native and web surfaces, with retrieval doing the heavy lifting instead of a bloated context window.
Memory model & boundary
- Define what the agent may remember, for how long, and for whom
- Partition memory per member with role-based access and consent scoping
- Set the regulated boundary: what is a measurement, what is a suggestion
- Open the audit and retention plan before writing a single record
Retrieval & grounding
- Episodic memory of prior sessions in an encrypted, per-member store
- Semantic memory via RAG over FHIR records, embedded and filtered by authorization
- Memory consolidation to summarize long journeys without losing key facts
- Every clinical claim cites its source record; missing data triggers a handoff
Evaluation & change control
- Eval harness for recall accuracy, grounding, and alert precision
- Guardrails against ungrounded claims, unsafe advice, and PHI leakage
- Locked behavior where provable output is required
- Predetermined change control plan for anything that learns, never silent updates
How the memory works
Memory is not one thing. Four layers do distinct jobs, and each is scoped, encrypted, and auditable so recall never becomes a compliance risk.
Working memory holds the live turn. Episodic memory recalls prior sessions, so a returning member or coordinator never re-explains a multi-day case. Semantic memory retrieves from the member's own FHIR records with retrieval augmented generation, grounding every answer in real data instead of guessing. The preference layer tunes tone, channel, and reminder timing to the individual to cut fatigue.
Retrieval, not a giant context window, is what makes this affordable. Only the relevant slice of history reaches the model, so prompts stay short, latency stays low, and cost per interaction falls. Consolidation compresses long journeys into durable summaries without dropping the facts that matter.
Every model that touches a clinical fact, a recalled record, or an alert is treated as part of the regulated system: validated on representative data, bounded, documented, and governed by change control.
One member journey
A representative walkthrough of a single follow-up case, showing where each memory layer does its work. Names and details are anonymized and illustrative.
First contact
- Member messages about a newly prescribed medication and a side effect
- Agent pulls the active care plan and prescription from FHIR (semantic memory)
- Logs the concern, the guidance given, and an open follow-up task (episodic memory)
- A low-confidence symptom question is handed to a human coordinator
Returning contact
- Member returns; the agent opens on the Day 1 concern with no re-explaining
- It respects the member's preferred channel and quiet hours (preference layer)
- Records that the side effect has eased and updates the follow-up task
- Surfaces the pending lab the care plan still requires
Coordinator handoff
- A coordinator picks up the case and reads a consolidated summary, not a raw transcript
- Consolidation kept the medication and lab history, dropped the small talk
- Every clinical line links back to its source record for review
- The loop closes: follow-up completed, task cleared, memory retained under policy

An agent that forgets makes a returning patient a stranger every time. Memory, done safely, is what turns a chatbot into a coordinator someone can trust.
Tech stack
Governed by design
Security and accountability are built into the memory system, not bolted on. The agent is aligned to the standards a regulated healthcare deployment requires.
Retention
Memory is kept only as long as the care relationship and policy allow. Each memory type carries its own retention window, agreed with the client, and expires automatically rather than accumulating by default.
Deletion & right to be forgotten
A deletion request purges a member's episodic and preference memory and any derived summaries, not just the underlying record. The removal is logged and verifiable, so nothing lingers in a cache or index.
Consent revocation
Revoking consent propagates to the memory layer immediately: retrieval for that member is cut off, and affected memory is quarantined or purged per the agreed policy, so stale context never keeps informing the agent.
Data residency
Memory stores stay inside the client's required region and cloud boundary, with an on-prem or private-cloud option where residency or air-gapping is mandated.
More on agentic AI

What AI agent development actually costs
The drivers behind building and running a production AI agent, and how to budget for one.
Read article →
Agentic AI vs AI agents: what actually differs
The distinction that decides whether your deployment scales or stalls in a pilot.
Read article →
Top AI agent development companies
How to evaluate AI agent development partners, and what separates the leaders.
Read article →Proof of Scale
Before we built our AI factory, we architected the platforms for some of the fastest-growing enterprises...

Connected Care Platform for 53M+ Members
Ailoitte helped power AssureCare’s patient-centered platform that connects payors, providers, and pharmacies to improve access, reduce cost, and strengthen care coordination.
Read Case Study
1M+ Customers, 40+ Years of Trust
We helped Dr. Morepen bring trusted preventive healthcare into a seamless mobile experience with reorders, subscriptions, and health tools.
Read Case Study
Utsah Smart Ring
Your companion in a journey towards complete well-being, blending ancient Ayurvedic wisdom with advanced technology.
Read Case Study
iPatientCare: an EHR built by physicians, for physicians
A patient-centered EHR software suite for primary care and specialty providers, built to enhance value-based care with a user-friendly experience.
Read Case StudyFrequently asked questions
What is a persistent-memory AI agent?
How is a memory agent different from a chatbot?
How is agent memory kept HIPAA-ready?
How does the agent connect to our EHR and patient records?
Why does memory reduce running cost?
How do you prevent it hallucinating patient facts?
Should we build a custom agent or use an off-the-shelf one?
How is a learning agent kept safe to update?
How long does it take to build and deploy?
Can you extend our existing team instead of a full build?
How do we get started?
Want an agent that remembers, safely?
Tell us the workflow and the records it needs to reason over. We will map the memory model, the grounding, and the governance, and return a scoped plan.
Talk to an AI engineer →Recognized Leaders

Top Innovative AI Companies 2025
Most Trusted IT Service provider 2024

The Best Software Development Company 2025
Top 10 CEOs Share Their Vision for Success

ISO 27001:2013 Information Security
Enterprises scale teams faster

Smarter Enterprises with Custom AI

ISO 9001:2015 Quality Management