NoPII

PII vs PHI in AI Agents: Key Differences and How to Secure Each Type of Sensitive Data

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.

AK Abhilash Kumar Nov 28, 2026 18 min read
On this page

    Enigma Vault

    Secure your cards.
    Protect your data.
    Keep it out of your AI.

    Data tokenization that keeps your applications working, so a breach exposes nothing worth stealing.

    • Free Lite tier, no contract
    • PCI DSS Level 1, SOC 2 Type II
    • Billed through AWS Marketplace
    Request a demo

    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:

    1. It relates to a person's health condition or the care they receive, including payment for that care
    2. It identifies the person or could reasonably be used to identify them
    3. 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 contextClassificationWhy
    A shopper's name and email in a retail CRMPII onlyIdentifies a person with no health context and no covered entity
    A member's name beside a diagnosis in a health plan recordPII that is also PHIIdentifiable health information held by a covered entity
    A medical note an employer keeps in an HR filePII, usually outside HIPAAHIPAA excludes employment records, though other laws can apply
    Claim statistics that meet HIPAA de-identificationNeither PII nor PHIIdentifiers have been removed to the HIPAA standard
    A claim a health plan processes for a memberPHI tied to payment for carePayment 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.

    FactorPIIPHIImpact on AI agents
    What defines itWhether data can identify a personIdentifiable health or payment-for-care data held by a covered entity or business associateClassification shifts with the source system, so one task can hold both
    Governing rulesState privacy laws plus sector rules such as GLBAHIPAA Privacy and Security Rules, plus breach notificationAgents serving health plans inherit HIPAA duties a retail support agent never meets
    Who must complyAny business collecting personal informationCovered entities and their business associatesModel providers and observability vendors in a PHI path take on business associate duties
    Vendor contractsData processing terms that vary by lawA BAA with each vendor that handles PHIPHI stays away from a model provider until a BAA covers that exact service
    Access standardLeast privilege as good practiceMinimum necessary as a legal requirement for most usesRetrieval has to be scoped per task, and broad connectors become a compliance gap
    De-identificationVaries and is often loosely definedSafe Harbor or Expert DeterminationTokenizing a prompt lowers exposure without meeting the HIPAA standard
    Breach handlingState notification lawsHIPAA notice to affected individuals and HHSA 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 categoryExamplesWhere the agent picks it up
    Direct identifiersFull name; email address; phone numberChat messages and CRM lookups
    Indirect identifiersZIP code with birth date; job title with employerProfile fields and free-text notes
    Government and financial IDsSocial Security numbers; passport numbers; bank account numbersKYC files and payment tools
    Payment card dataCard numbers and security codes, which PCI DSS governsCheckout and billing tool calls
    Online and device identifiersIP addresses; device IDsWeb session context and application logs
    Biometric dataVoice prints; face imagesCall recordings and identity checks
    Account credentialsUsernames paired with passwords or security answersSupport 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 categoryExamplesWhere the agent picks it up
    Demographics tied to careMember name and address held by a health planMember lookup tools
    Health plan identifiersMember IDs; Medicare Beneficiary IdentifiersEligibility checks
    Medical history and diagnosesConditions; diagnosis codesClaim files and clinical notes
    Treatment and prescriptionsProcedures; medicationsPrior authorization requests
    Test results and imagingLab results; scan reportsAttachments retrieved through RAG
    Billing and payment for careClaims; explanations of benefits; balancesClaims and billing systems
    Appointments and encountersVisit dates; treating provider namesScheduling 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 actionWhat gets addedWhat the context now holds
    Elena starts a chat on the public siteHer name and emailContact details the agent has not linked to any health record yet
    Agent verifies her membershipMember ID and plan detailsIdentity tied to health coverage, which HIPAA treats as PHI
    Agent pulls her claimClaim documents with a procedure codePHI carrying clinical detail
    Agent reads the policyCoverage terms and exclusionsPlan 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.

    IndustryPII the agent identifiesWhen PHI comes inSafeguard that matters most
    Healthcare providers and health plansPatient and member contact details; billing accountsAlmost always, since these organizations are covered entitiesMinimum necessary retrieval and a BAA with every vendor in the path
    InsurancePolicyholder IDs; bank details for settlementsIn health plans, while injury details in property and casualty claims usually fall under state lawClaim-scoped access so an agent sees one claim at a time
    Financial servicesAccount numbers; Social Security numbers; card dataRarely, though health details in hardship requests still need careful handlingTokenized identifiers with card data kept in a vault
    LegalClient IDs; financial statementsWhen the firm acts as a business associate for a covered entityMatter-scoped access, with confidential context reviewed separately
    Employers and HREmployee Social Security numbers; payroll dataSeldom, since HIPAA excludes employment records, though a company's group health plan holds PHISeparating 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 groupItems on the Safe Harbor list
    Names and contact detailsNames; phone and fax numbers; email addresses
    Location and timeGeographic units smaller than a state; all dates tied to a person except the year
    Record and account numbersMedical record numbers; health plan beneficiary numbers; account numbers
    Government and license IDsSocial Security numbers; certificate and license numbers
    Device and online identifiersVehicle and device identifiers; URLs; IP addresses
    Physical identifiersBiometric identifiers; full-face photos
    Catch-allAny 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:

    1. Does the agent handle PHI, or PII on its own?
    2. Is your organization a covered entity or a business associate for this task, or neither?
    3. 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.

    ItemAccess for Elena's claim question
    Applicable policy documentAllowed for this task
    Elena's submitted claim evidenceAllowed, limited to her claim
    Other members' recordsBlocked 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 assemblesWhat 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 answerEvidence checkWhat happens next
    Physical therapy visits are covered under her planSupported by the current policy clauseSent to Elena
    No referral is needed for these visitsConflicted by a referral rule in the same policyHeld for a claims specialist
    Her reimbursement will post tomorrowRefused with no payment record on fileRemoved 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:

    1. The Vault: limits the agent to the approved policy and claim files, and records each access
    2. NoPII: keeps her identifiers out of supported model requests and blocks any request it can't tokenize
    3. Triplets: checks the coverage explanation against the current policy and relevant exclusions before it reaches her
    4. 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.

    AK
    Abhilash Kumar Chief Growth Officer

    Abhilash Kumar is Chief Growth Officer at Enigma Vault, where he leads growth strategy, market positioning, and partnership development. He brings experience across B2B SaaS marketing, product marketing, brand building, and demand generation, with a career spanning technology companies and communications agencies.

    View full profile

    Frequently asked questions

    Is PHI a type of PII?
    PHI is PII with two extra conditions: it relates to health or payment for care, and a HIPAA covered entity or business associate holds it. Identifiable health data outside that setting is PII but usually not PHI.
    Can AI agents send PHI to OpenAI or Anthropic?
    Only when the provider signs a BAA covering the exact service you use and the rest of the data path meets HIPAA safeguards. Tokenizing identifiers before the request also cuts how much PHI the provider ever receives.
    Does tokenizing PHI make it de-identified under HIPAA?
    No. Tokens map back to original values, so tokenized PHI stays pseudonymous. De-identification needs Safe Harbor or Expert Determination, and clinical free text often keeps identifiers that tokenizing misses.
    Do AI agent and model vendors need a BAA?
    Any vendor that receives or stores PHI for a covered entity or business associate needs a BAA. In an agent's path, that usually means the model provider and the data protection layer, plus any vendor that captures prompts.
    Is health data stored in an AI agent's memory still PHI?
    Yes, if the agent runs for a covered entity or business associate and the memory can identify the member. Saved facts about a condition or claim keep their PHI status, so memory needs retention limits and access controls.