HIPAA and AI Agents: Where Protected Health Information Goes When an Agent Does the Work
Every service that receives or keeps an agent's prompts, retrieved records or traces is likely a business associate under HIPAA and needs a business associate agreement, tracing and evaluation vendors included. Limit what the agent retrieves to the minimum necessary for its task, give each agent a unique identity and access rights of its own, and record what it accessed, for whom and where the data went.
On this page
Suppose a hospital's agent drafts a prior authorisation request. It reads the patient's chart, pulls the payer's criteria, sends both to a model API, writes a draft back to the record and ships a trace of the whole run to an observability tool.
Protected health information has now passed through several systems, and the HIPAA Rules have something to say about each. This is a practical reading for teams building agents, not legal advice.
Where PHI goes in an AI agent
- The prompt and context. Whatever the agent is given or retrieves becomes model input, sent to wherever the model runs.
- Retrieved records. Chart sections, documents and search results pulled into context, often far more than the task used.
- Tool calls. The arguments the agent sends to other systems, and the results they return.
- Traces and logs. Observability tools capture prompts, retrievals and tool payloads, so a trace of a clinical task is usually PHI itself. Agent traces fill with sensitive data once content capture is on.
- Memory. Anything the agent keeps for later sessions.
Under 45 CFR 160.103, a use is sharing or analysis within the entity, and a disclosure is release "outside the entity holding the information". Several of those hops leave the covered entity, which is where business associates come in.
Is an AI vendor a business associate under HIPAA?
The same section defines a business associate as a person who, on behalf of a covered entity and other than as a member of its workforce, "creates, receives, maintains, or transmits protected health information" for a regulated function. A subcontractor that does the same for a business associate is one too.
The exception vendors sometimes reach for is the conduit. In the 2013 Omnibus Rule, HHS called it "a narrow one", limited to transmission services such as couriers and internet service providers. An entity that maintains PHI on a covered entity's behalf "is a business associate and not a conduit, even if the entity does not actually view the protected health information". The line HHS drew was "the transient versus persistent nature" of the opportunity to access it.
Applied to an agent stack, on our reading:
| Service | Receives or keeps PHI? | Likely position |
|---|---|---|
| Model API that receives prompts | Yes | Business associate |
| Agent platform or orchestration service | Yes | Business associate |
| Hosted vector database holding chart embeddings | Yes | Business associate |
| Tracing, logging or evaluation service | Yes, if traces carry content | Business associate |
| Network carrier moving encrypted traffic | Transiently | Conduit |
The tracing row is the easiest to miss. The agreement covers the model provider, and the same content then flows to an observability vendor nobody treated as a recipient of PHI.
What the agreement must contain is set out in 45 CFR 164.504(e). Among other things, it must establish the permitted uses and disclosures, require appropriate safeguards and compliance with the Security Rule, require the vendor to report uses or disclosures the contract does not provide for, including breaches, bind its subcontractors to the same restrictions, and return or destroy the PHI at termination where feasible. For AI vendors, read that last clause against what they actually keep: prompt logs, cached context and evaluation copies.
How the minimum necessary standard applies to an AI agent
45 CFR 164.502(b) requires covered entities and business associates to "make reasonable efforts to limit protected health information to the minimum necessary to accomplish the intended purpose". Section 164.514(d) turns that into practice: identify who needs which categories of PHI, limit access to match, and do not use an entire medical record "except when the entire medical record is specifically justified".
Agents pull the other way. The easy way to make an agent capable is to hand it the whole chart and let the model find what matters. Suppose a billing agent answering a coding query is given the full record, including notes and results it had no use for. Every one of them went into the prompt, the model provider's systems and the trace.
For an agent, minimum necessary is mostly an engineering control:
- Scope retrieval by task. The tool that fetches records returns the fields the task needs, not the whole document.
- Scope access by role. Map each agent to the role it serves, such as coder, scheduler or nurse, and give it that role's access, in the spirit of 164.514(d)(2).
- Know the exception. Minimum necessary does not apply to disclosures to, or requests by, a health care provider for treatment. A clinical decision-support agent may legitimately see more than a billing one. Write down which category each agent is in.
Access controls and audit controls for AI agents
The Security Rule's technical safeguards already anticipate software. 45 CFR 164.312 requires that access to electronic PHI go only to "those persons or software programs that have been granted access rights", that each user get a unique name or number "for identifying and tracking user identity", and audit controls that "record and examine activity" in systems holding electronic PHI. Section 164.308 adds a required procedure to regularly review records of system activity, "such as audit logs".
Three consequences for agents:
- Each agent needs its own identity. An agent running on a shared service account, or on a clinician's session, breaks identity tracking: the log says the clinician opened every chart the agent touched. See what replaces shared service accounts.
- Log what the agent accessed, for whom, and where it went. Which patient records it retrieved, on whose behalf, which tool received them and which vendor processed them.
- Review the log. A log nobody reads does not meet a requirement to review it regularly.
PHI in AI agent traces and logs
Traces are not exempt because they are operational. A trace that carries chart content is electronic PHI and needs the same safeguards, retention decisions and vendor agreements as the chart.
Redacting names is not de-identification. The safe harbour method in 164.514(b) removes 18 kinds of identifiers, including all elements of dates except the year, medical record numbers, device identifiers, URLs and IP addresses, and requires no actual knowledge that what remains could identify the person. A re-identification code is allowed only if it is not derived from information about the individual. On our reading, a trace keyed on a hashed medical record number fails that test.
When an AI agent discloses PHI it shouldn't
Under 45 CFR 164.402, an impermissible use or disclosure is presumed to be a breach unless a risk assessment shows a low probability that the PHI was compromised. One of the four factors is whether the PHI "was actually acquired or viewed". Under 164.404, notice to individuals must follow without unreasonable delay and no later than 60 calendar days after discovery.
If an agent sends a discharge summary to the wrong recipient, or to a tool with no agreement in place, the trace is the evidence for that assessment: what was sent, to whom, and what came back. Without it, the presumption stands. Plan the response before you need it.
A HIPAA checklist for AI agents
- List every service that receives the agent's prompts, retrievals, tool payloads or traces. Does each have a business associate agreement?
- Do the return-or-destroy terms cover logs, caches and evaluation copies?
- Does each agent retrieve only the fields its task needs?
- Does each agent have a unique identity and access rights of its own?
- Can you show which records an agent accessed, for whom, and where they went?
- Are traces protected, retained and contracted for as electronic PHI?
Where Syntrox fits
Syntrox sits outside the agent. Its judge, Nucleus, is a 4B-parameter open-weight model small enough to run on hardware inside your own network, so the traces a check reads do not have to leave it and the evaluation step need not add another outside recipient of PHI. Syntrox records each evaluated trace's score, confidence and judge version outside the agent.