An intake agent built to schedule appointments calls a tool that returns a patient’s full record instead of just the open slots and insurance status it needed.
The model reasons over the whole thing, and that reasoning trace lands in a third-party observability dashboard nobody thought to put under a BAA. No bad actor anywhere in that chain, just an agent that was never told what it didn’t need to see.
Key takeaways
- Keeping an AI agent HIPAA-safe isn’t a one-time setup. It has to hold on every retrieval, tool call and response the agent makes.
- A signed BAA is the legal floor, not the technical answer. It doesn’t scope what an agent retrieves or stop a log from becoming an unprotected copy of PHI.
- PHI moves through a pipeline at more points than the prompt: retrieved context, tool calls, model output, and the logs it leaves behind.
- Minimum necessary access and de-identification decide how much PHI an agent should even see, before encryption or logging matter at all.
- HIPAA requires encryption as a safeguard, not one specific algorithm, and requires audit documentation retained for years.
- None of this holds without enforcement at the moment each call happens, not just a policy sitting on paper.
What makes an AI agent HIPAA-safe (not just “HIPAA-compliant”)
A HIPAA-safe AI agent is one whose handling of protected health information satisfies HIPAA’s Privacy Rule and Security Rule, the standards HHS sets for protecting that data. HIPAA compliance is a legal status that applies to covered entities and their business associates, not a certification software that can hold on its own. There’s no such thing as a “HIPAA-certified” agent, whatever a vendor’s landing page implies.

That distinction is important: a HIPAA-eligible LLM API is necessary but not sufficient. Eligibility means the vendor will sign a BAA and meet baseline safeguards on their end. It says nothing about what your agent retrieves or what lands in a log three integrations downstream. That part is yours to get right.
HHS’s own guidance on the HIPAA Security Rule lays out the safeguards covered entities and business associates must implement. NIST SP 800-66 Rev. 2 is the closest thing to a technical playbook for turning those into an actual system. Neither was written with autonomous agents in mind, which is the gap this blog addresses.
Where PHI actually moves through an AI agent’s pipeline
Most compliance checklists talk about Protected Health Information (PHI) as if it enters an application at one point, usually the input field. In fact, an agent has more entry points than that.
- User input is the obvious one: a patient’s message, a staff member typing a question into an internal tool.
- Retrieved context is less obvious but often bigger: a RAG pipeline pulling clinical notes or EHR records into the agent’s context window, frequently pulling far more of the record than the task requires.
- Tool calls are where an agent reaches scheduling systems, claims platforms, lab or billing APIs, and gets PHI back, sometimes more than it asked for, as in the scheduling example above.
- Model output is what the agent says or writes, which can restate PHI even when the task didn’t call for it.
- Logs and memory are the point almost every checklist skips: conversation history and observability tooling capture whatever passed through the agent, and none of that stops being PHI just because it landed in a debugging tool instead of a patient chart.

Five entry points, and each needs a different mix of the same four controls, not one control applied five times over.
The four controls that actually make an agent HIPAA-safe
Strip away the branding around any HIPAA-for-AI checklist and it comes down to four controls, each doing a job the others can’t.
Business associate agreements across the whole vendor chain
A signed BAA with your LLM provider is the starting point, not the whole picture. It doesn’t automatically extend to the vector database behind your RAG pipeline, the logging tool your engineers debug with, or the evaluation platform running nightly tests. Each of those is a subprocessor once PHI passes through it, and each needs its own agreement excluding your data from training. Getting the model provider’s BAA right and never checking the tools around it is exactly how the opening scenario happens.
Minimum necessary access
HIPAA’s minimum necessary standard says a covered entity should limit PHI access to what’s actually needed for the task, and for an agent, that has to be enforced at the tool and context level. A scheduling agent needs a patient’s name, insurance status and open slots, not their full clinical history. Scoping that tightly takes more setup than granting broad access once, which is why so many teams skip it.
De-identification: Safe Harbor vs. Expert Determination
HIPAA gives you two ways for data to stop being PHI, as described in 45 CFR 164.514:
- Safe Harbor requires removing 18 defined identifier categories: names, geographic detail smaller than a state, every date element except the year, phone and fax numbers, email addresses, Social Security numbers, medical record and account numbers, device and vehicle identifiers, IP addresses, biometric identifiers, full-face photos, and any other unique identifying code, plus confirming no actual knowledge the rest could still identify someone.
- Expert Determination instead has a qualified statistician certify, using accepted methods, that re-identification risk is very small, and document how they reached that conclusion.
| Method | How it works | Best used when | Limitation |
| Safe Harbor | Remove all 18 defined identifier categories | You need a fast, repeatable rule engineers can implement directly | Blunt. Strips useful detail even when it wasn’t actually identifying |
| Expert Determination | A qualified expert statistically certifies low re-identification risk | The data needs to stay analytically useful and you can retain that expertise | Slower, needs ongoing expert review as data or context changes |
For an agent, this decision has to be made per task, not once for the whole system. One agent running analytics over historical records can often work entirely on de-identified data. But another doing anything care-related, scheduling, triage, or clinical support, usually can’t do the same without breaking the task.
Encryption and audit logging
HIPAA’s Security Rule doesn’t specify an encryption algorithm. Encryption is an “addressable” specification: an organization either encrypts PHI at rest and in transit or documents an equivalent alternative, not one mandated standard. In practice, that means meeting NIST’s own recommendations, SP 800-111 for data at rest and SP 800-52 Rev. 2 for data in transit, both pointing toward AES, with 256-bit now the common baseline.
Audit controls sit under a separate, non-addressable requirement to record and examine system activity. That documentation must be retained for six years from creation or last effective date, per 45 CFR 164.316, a window most healthcare organizations also apply to the logs themselves as practice.
Getting started: rolling out a PHI policy your agents actually follow
None of the four controls above matter if they only exist in a document nobody checks against. Start by mapping where PHI actually enters your specific pipeline, since it’s rarely just the prompt field. Then decide, per entry point, what’s tolerable to de-identify or scope down and what needs a hard stop.
Pilot on the highest-risk path first, like an agent already talking to an EHR or claims system. If the policy holds up there under real traffic, it will hold on the lower-risk paths with just a little extra work. Rolling it out everywhere at once, before it’s tested against the path, most likely breaks it, and that’s how teams end up rewriting the policy twice.
If you’re still narrowing down where to point a first pilot, Lyzr’s “140+ agentic AI use cases for healthcare” is a useful place to start.
How Lyzr OpenController keeps agents HIPAA-safe at runtime
Everything above is a set of decisions: what the BAA covers, how tightly to scope access, and which de-identification method fits a task. Those are governance calls an organization has to make itself. Making sure every agent actually honors those calls on every retrieval, tool call and response is a different problem, a runtime one, and it’s the one most PHI policies quietly assume will handle itself.
Lyzr OpenController is built around four capabilities that map onto that gap. Find automatically discovers the agents, models, tools, data and workflows already running across your estate, so an agent quietly pulling PHI through an unreviewed tool stops being a blind spot. Ship evaluates and validates each agent against policy before it reaches production, the checkpoint to confirm the scope and de-identification decisions above actually got built in, not something OpenController decides on its own. Run monitors agents, applications, APIs and infrastructure in real time and refuses a call in the request path the moment it falls outside policy. Improve turns the signals Run collects into the next round of policy.
OpenController enforces whatever PHI policy you’ve already set, consistently, on every agent. Book a demo to see what that looks like against your own agents.
FAQ
The agent’s handling of PHI, at every step from input to output to logging, satisfies HIPAA’s Privacy and Security Rules. It isn’t a certification software holds; compliance applies to the entity running the agent.
No. A BAA is the legal floor covering how a vendor may use and protect PHI, but it doesn’t scope what your agent retrieves or stop a log from becoming an unprotected copy of PHI. Those have to be engineered separately.
Safe Harbor removes 18 categories of identifiers defined under HIPAA. Expert Determination has a qualified statistician certify the re-identification risk is very small and document that conclusion. Safe Harbor is faster; Expert Determination preserves more analytical detail.
At more points than the prompt: user input, context retrieved through RAG, results from tool calls to systems like an EHR, the agent’s own output, and the logs it leaves behind, the point most policies overlook.
No. HIPAA treats encryption as an addressable safeguard: encrypt PHI at rest and in transit, or document a reasonable equivalent. NIST’s own guidance points toward AES, with 256-bit now the common baseline, but it isn’t a fixed legal requirement.
Book A Demo: Click Here
Join our Slack: Click Here
Link to our GitHub: Click Here


