In AI agents, PII is any data that identifies a person, whereas PHI is identifiable health data held by a HIPAA covered entity or its business associate. Agents often touch both in one task, so each type of sensitive data needs its own safeguards.
A member asks a health plan's AI agent why her claim was denied, and within seconds the agent holds her contact details next to her claim documents and the policy exclusions. Part of that context is PII and part is PHI, yet few teams can say which copies end up in logs or which vendors receive them. Protecting both starts with knowing where they differ, and it doesn't matter which AI agent you use when Enigma AI Vault is the underlying infrastructure that protects your data.
What Is the Difference Between PII and PHI When AI Agents Handle Sensitive Data
PII covers any data that identifies a person in any setting, whereas PHI exists only when identifiable health or payment-for-care information sits with a covered entity or business associate. The same name can be either, depending on who holds it.
PII: A Broad Privacy Category
PII has no single US federal definition. NIST describes it as information that can distinguish or trace a person's identity on its own or when combined with other data, and state privacy laws each draw the line a little differently.
For an AI agent, that means almost any customer conversation carries PII. Names and email addresses count, and so do indirect details like a ZIP code paired with a birth date. Our explainer on what counts as PII covers the categories in depth.
PHI: A HIPAA Category Defined by Who Holds the Data
PHI is a legal category under HIPAA. Information counts as PHI when three conditions are met:
- It relates to a person's health condition or the care they receive, including payment for that care
- It identifies the person or could reasonably be used to identify them
- Its holder is a covered entity or business associate
Covered entities include health plans and most healthcare providers, along with healthcare clearinghouses. A business associate is any vendor that handles PHI on their behalf, which can include the companies behind an agent's model or its logs.
How the Same Data Lands in Different Categories
Context decides the category. The examples below show how one kind of detail can sit on either side of the line.
| Data in the agent's context | Classification | Why |
|---|---|---|
| A shopper's name and email in a retail CRM | PII only | Identifies a person with no health context and no covered entity |
| A member's name beside a diagnosis in a health plan record | PII that is also PHI | Identifiable health information held by a covered entity |
| A medical note an employer keeps in an HR file | PII, usually outside HIPAA | HIPAA excludes employment records, though other laws can apply |
| Claim statistics that meet HIPAA de-identification | Neither PII nor PHI | Identifiers have been removed to the HIPAA standard |
| A claim a health plan processes for a member | PHI tied to payment for care | Payment for care held by a covered entity |
PII vs PHI Core Differences and How Each One Impacts AI Agents
PII is defined by whether data identifies a person, whereas PHI is defined by health context and who holds it. For AI agents, that difference decides which vendors may receive a request and how strictly access and logging are controlled.
| Factor | PII | PHI | Impact on AI agents |
|---|---|---|---|
| What defines it | Whether data can identify a person | Identifiable health or payment-for-care data held by a covered entity or business associate | Classification shifts with the source system, so one task can hold both |
| Governing rules | State privacy laws plus sector rules such as GLBA | HIPAA Privacy and Security Rules, plus breach notification | Agents serving health plans inherit HIPAA duties a retail support agent never meets |
| Who must comply | Any business collecting personal information | Covered entities and their business associates | Model providers and observability vendors in a PHI path take on business associate duties |
| Vendor contracts | Data processing terms that vary by law | A BAA with each vendor that handles PHI | PHI stays away from a model provider until a BAA covers that exact service |
| Access standard | Least privilege as good practice | Minimum necessary as a legal requirement for most uses | Retrieval has to be scoped per task, and broad connectors become a compliance gap |
| De-identification | Varies and is often loosely defined | Safe Harbor or Expert Determination | Tokenizing a prompt lowers exposure without meeting the HIPAA standard |
| Breach handling | State notification laws | HIPAA notice to affected individuals and HHS | A leaked trace or memory entry holding PHI can trigger formal notice |
Some state laws now cover consumer health data that falls outside HIPAA, so health details held by a company that isn't a covered entity can still carry strict rules. Check those laws when your agent serves consumers directly.
PII and PHI Categories AI Agents Handle in Prompts and Tool Results
AI agents handle PII categories that range from direct identifiers to government IDs, along with PHI categories like medical records and claims. Each category enters the agent's context through a different system, so detection has to run in each one.
PII Categories in AI Agent Conversations
PII reaches an agent through chat messages and tool calls long before anyone labels it. The categories below cover what most enterprise agents meet:
| PII category | Examples | Where the agent picks it up |
|---|---|---|
| Direct identifiers | Full name; email address; phone number | Chat messages and CRM lookups |
| Indirect identifiers | ZIP code with birth date; job title with employer | Profile fields and free-text notes |
| Government and financial IDs | Social Security numbers; passport numbers; bank account numbers | KYC files and payment tools |
| Payment card data | Card numbers and security codes, which PCI DSS governs | Checkout and billing tool calls |
| Online and device identifiers | IP addresses; device IDs | Web session context and application logs |
| Biometric data | Voice prints; face images | Call recordings and identity checks |
| Account credentials | Usernames paired with passwords or security answers | Support conversations about account access |
Tokenization handles structured values like account numbers well because they follow known formats. Indirect identifiers are harder, since a job title and an employer only identify someone once they sit side by side.
PHI Categories in AI Agent Conversations
PHI covers far more than diagnoses. Any of these categories counts once a covered entity or business associate holds it and it can identify the member:
| PHI category | Examples | Where the agent picks it up |
|---|---|---|
| Demographics tied to care | Member name and address held by a health plan | Member lookup tools |
| Health plan identifiers | Member IDs; Medicare Beneficiary Identifiers | Eligibility checks |
| Medical history and diagnoses | Conditions; diagnosis codes | Claim files and clinical notes |
| Treatment and prescriptions | Procedures; medications | Prior authorization requests |
| Test results and imaging | Lab results; scan reports | Attachments retrieved through RAG |
| Billing and payment for care | Claims; explanations of benefits; balances | Claims and billing systems |
| Appointments and encounters | Visit dates; treating provider names | Scheduling tools |
Structured PHI like member IDs is the easy part. Clinical meaning lives in free text, where a medication and a visit date can identify a member without a single labeled field.
How PII Becomes PHI as AI Agents Retrieve and Combine Sensitive Data
PII becomes PHI when a covered entity or business associate links it to health information or payment for care. Inside an AI agent this happens fast, because one retrieval can join a member's contact details to her claim and policy files.
Three triggers move data across the line:
- Linking: an identifier joins health or payment-for-care information in the same context
- Holding: the data sits with a covered entity or a vendor acting for one, while the same email in a retail loyalty program stays PII
- Record context: contact details stored in the same member record as claims take on PHI protection
Follow a claims agent at a health plan as it answers a question from a member named Elena Ruiz. Each retrieval changes what the context holds.
| Agent action | What gets added | What the context now holds |
|---|---|---|
| Elena starts a chat on the public site | Her name and email | Contact details the agent has not linked to any health record yet |
| Agent verifies her membership | Member ID and plan details | Identity tied to health coverage, which HIPAA treats as PHI |
| Agent pulls her claim | Claim documents with a procedure code | PHI carrying clinical detail |
| Agent reads the policy | Coverage terms and exclusions | Plan content that becomes part of her PHI once applied to her case |
Free text speeds this up. A claim note that mentions a rare procedure and a date of service can point to one member even after her name has been replaced.
Why PII and PHI Create Different Risks When AI Agents Work With Them
PII and PHI create different risks because the consequences differ when an AI agent overreaches. Exposed PII is usually a privacy incident, while exposed PHI can become a reportable HIPAA breach that pulls in vendor contracts and regulators.
AI agents create new paths for sensitive information. Each of the three paths below looks the same technically for PII and PHI, but the stakes change once health data is involved.
Access Can Exceed the Task
Broad connector credentials let an agent reach records unrelated to the request in front of it. A claims connector that returns every member's file gives the agent far more PHI than Elena's question needs.
- With PII: overreach exposes contact details and account history, which privacy laws and your own policies govern
- With PHI: overreach can count as a use or disclosure beyond the minimum necessary, which HIPAA restricts directly
Information Spreads Through the Stack
Every copy of PHI brings HIPAA safeguards to the system that holds it. Agents create copies quickly, often in places nobody reviews:
- Model providers: a provider that receives PHI is generally treated as a business associate and needs a BAA
- Tracing and observability: prompt captures put PHI inside debugging dashboards
- Agent memory: saved facts about a member's condition persist into later sessions
- Vector stores: embedded claim notes keep clinical detail searchable long after the case closes
PII copies need protection too, and PII protection for LLMs covers the model side. With PHI, each copy also widens the set of vendors and systems that fall under HIPAA.
Outputs Become Business Decisions
A coverage answer is a decision the member acts on. If the agent says a procedure is covered when an exclusion applies, Elena may book care she ends up paying for herself.
Answers can also leak. A reply that quotes details from another member's file turns a wrong answer into a disclosure, which is why output checks matter more for PHI than for most PII use cases.
PII and PHI Identification and Safeguards for AI Agents Across Industries
Which data counts as PII or PHI depends on the industry an agent serves. Health plans and providers handle PHI daily, while banks and law firms mostly handle PII, with health details becoming PHI only in specific roles such as a business associate.
Identification starts with the systems an agent connects to and the role your organization plays. The same claim note means something different at a health plan than at a property insurer.
| Industry | PII the agent identifies | When PHI comes in | Safeguard that matters most |
|---|---|---|---|
| Healthcare providers and health plans | Patient and member contact details; billing accounts | Almost always, since these organizations are covered entities | Minimum necessary retrieval and a BAA with every vendor in the path |
| Insurance | Policyholder IDs; bank details for settlements | In health plans, while injury details in property and casualty claims usually fall under state law | Claim-scoped access so an agent sees one claim at a time |
| Financial services | Account numbers; Social Security numbers; card data | Rarely, though health details in hardship requests still need careful handling | Tokenized identifiers with card data kept in a vault |
| Legal | Client IDs; financial statements | When the firm acts as a business associate for a covered entity | Matter-scoped access, with confidential context reviewed separately |
| Employers and HR | Employee Social Security numbers; payroll data | Seldom, since HIPAA excludes employment records, though a company's group health plan holds PHI | Separating HR agents from benefits plan data |
Before an agent goes live in any of these settings, settle four questions with your privacy and security teams:
- Role: is the organization a covered entity or business associate for this agent?
- Sources: which connected systems hold health records, and which hold general customer data?
- Payments: does the agent touch card data, which PCI DSS governs separately and card vault tokenization keeps out of the agent's context?
- Confidentiality: does privilege or a contractual duty apply on top of privacy law?
Tokenizing client identifiers reduces exposure in legal and financial agents, though it doesn't protect privilege or replace KYC and fraud programs on its own.
Why Tokenizing PII Does Not Automatically De-Identify PHI for AI Agents
Tokenizing PII in a prompt lowers exposure, yet it does not make PHI de-identified under HIPAA. Tokens can be reversed by an authorized system, and clinical free text often carries identifiers that a PII detector was never configured to catch.
The 18 HIPAA Identifiers and Why Clinical Text Slips Past Them
HIPAA's Safe Harbor method lists 18 identifiers that must be removed before health data counts as de-identified. Grouped by type, they look like this:
| Identifier group | Items on the Safe Harbor list |
|---|---|
| Names and contact details | Names; phone and fax numbers; email addresses |
| Location and time | Geographic units smaller than a state; all dates tied to a person except the year |
| Record and account numbers | Medical record numbers; health plan beneficiary numbers; account numbers |
| Government and license IDs | Social Security numbers; certificate and license numbers |
| Device and online identifiers | Vehicle and device identifiers; URLs; IP addresses |
| Physical identifiers | Biometric identifiers; full-face photos |
| Catch-all | Any other unique identifying number, characteristic or code |
Claim notes rarely follow a neat format. A date of service or a small town named in a sentence is an identifier under Safe Harbor, even though teams seldom think of it as personal data.
Safe Harbor vs Expert Determination
HIPAA offers two routes to de-identification. Both apply to the data set as a whole:
- Safe Harbor: remove all 18 identifiers and have no actual knowledge that what remains could identify someone
- Expert Determination: a qualified expert applies statistical methods and documents that the risk of re-identification is very small
Masking a name in a prompt meets neither standard. An agent request is a working context, and de-identification is a formal finding about a data set.
Why Tokens Stay Pseudonymous
A token maps back to its original value inside a vault, which makes tokenized data pseudonymous. That is useful for an AI agent, because an authorized application can restore Elena's email when it sends her reply.
The same reversibility means tokenized PHI should still be treated as PHI unless your privacy team has documented a de-identification method. Pseudonymization and anonymization differ on exactly this point.
How to Protect PII and PHI in AI Agents With Scoped Access and Verified Outputs
Protect PII and PHI in AI agents by scoping access to the task and tokenizing identifiers before model calls, then checking outputs against approved evidence. PHI adds two steps up front: confirming your HIPAA role and signing BAAs with each vendor.
These six steps follow one agent path from planning to the reply Elena receives. Steps 1 and 2 matter most when PHI is involved, while steps 3 to 6 apply to any sensitive data.
Step 1: Map the Agent Path and Your HIPAA Role
Start with one agent and answer three questions before changing anything:
- Does the agent handle PHI, or PII on its own?
- Is your organization a covered entity or a business associate for this task, or neither?
- Which systems receive data along the way, from the model provider to tracing and backups?
The answers decide which rules apply. They also show where protection belongs and which vendors need contracts.
Step 2: Confirm a BAA With Every Vendor That Receives PHI
Any vendor that receives PHI on your behalf needs a BAA for the exact service and deployment you use. In an agent's path, that usually means the model provider and the data protection layer, plus any observability vendor that captures prompts.
If a vendor won't sign, keep PHI out of its path. Tokenizing identifiers before they reach that vendor reduces exposure, though your compliance team still decides whether the remaining data counts as PHI.
Step 3: Scope Access to the Records the Task Needs
Elena's question needs her claim and the policy that governs it. Nothing else belongs in the agent's reach.
| Item | Access for Elena's claim question |
|---|---|
| Applicable policy document | Allowed for this task |
| Elena's submitted claim evidence | Allowed, limited to her claim |
| Other members' records | Blocked even though the connector can reach them |
Align these decisions with your existing identity and application policy. For PHI, this step is how the minimum necessary standard shows up in practice.
Step 4: Minimize Exposure Before Every Model Call
Replace identifiers with tokens before the request reaches any model. The model can still reason about Elena's case because each token stays consistent across the conversation.
| What the agent assembles | What the model receives |
|---|---|
| Elena Ruiz, member 5582-1047, elena.ruiz@example.com | [NAME_1], member [ID_1], [EMAIL_1] |
Test detection against real claim notes before launch. Personal identifiers are one part of PHI, so procedure details and dates of service need review as well, and any request that can't be tokenized should be blocked.
Step 5: Govern Release Outside the Model
Original values stay inside a protected boundary until an approved destination needs them, such as the claims system or the member portal. Release decisions follow application policy, so instructions hidden in a prompt can't unlock Elena's record.
This also limits damage if an agent is manipulated. On protected paths the agent holds references, and requests to use the underlying values are checked outside the model and logged. These controls reduce the consequences of a compromised agent without removing every prompt injection risk, so other agent defenses still apply.
Step 6: Check the Output Before It Reaches the Member
Check each statement in the agent's answer against the evidence it was allowed to use. Claim-level verification marks what the evidence supports, and your policy decides what happens to the rest.
| Statement in the agent's answer | Evidence check | What happens next |
|---|---|---|
| Physical therapy visits are covered under her plan | Supported by the current policy clause | Sent to Elena |
| No referral is needed for these visits | Conflicted by a referral rule in the same policy | Held for a claims specialist |
| Her reimbursement will post tomorrow | Refused with no payment record on file | Removed from the reply |
A verdict measures support within the approved evidence. It doesn't certify truth beyond that evidence, which is why the policy and claim files themselves need to be current.
How Enigma AI Vault Protects Sensitive Data for Any AI Agent Handling PII or PHI
It doesn't matter which AI agent you use for member services or claims. Enigma AI Vault is the underlying infrastructure that protects your sensitive data, and it works with the agent frameworks and model providers you already run.
Here is how Elena's claim question moves through it:
- The Vault: limits the agent to the approved policy and claim files, and records each access
- NoPII: keeps her identifiers out of supported model requests and blocks any request it can't tokenize
- Triplets: checks the coverage explanation against the current policy and relevant exclusions before it reaches her
- Controlled release: original values reach approved destinations only, with each request checked outside the model and logged
A BAA is available for NoPII, though HIPAA compliance still depends on your full architecture and contracts.
Walk us through one agent that touches member data and we'll show where AI Vault fits around it.