Best AI security for healthcare and regulated industries

Healthcare AI security has to cover what agents do, and a vendor that receives PHI to inspect it needs a signed BAA. Ask each vendor where inspection runs and what it keeps.

17 min read
In short: AI security for healthcare covers what agents do – tool calls, record writes, and outbound messages – not only the chat box. A security vendor that receives PHI to inspect it is usually a HIPAA business associate and needs a signed BAA. Ask each vendor, per control, where inspection runs, what it stores and for how long, whether it signs a BAA, and whether zero data retention is available. Arcjet detects core personal data types in your process, detects PHI types server-side under a BAA for Enterprise customers, and removes flagged values before storage.

What is the best AI security for healthcare?

AI security for healthcare covers what AI agents do, not only what people type into a chat box. That means checking tool calls, record writes, and outbound messages for protected health information (PHI) before they run. A vendor that receives PHI to inspect it is usually a business associate under HIPAA and needs a signed business associate agreement (BAA), so ask each vendor, control by control, where inspection runs and what it keeps.

PHI is health information that can be linked to a specific person. Under the Health Insurance Portability and Accountability Act (HIPAA), health information becomes identifiable when it carries an identifier such as a name, a medical record number (MRN), a health plan member ID, or a phone number. A diagnosis on its own isn't PHI. The same diagnosis next to an MRN is.

The rest of this article covers why agents change the problem, why your AI security vendor can become a business associate, the questions to put to every vendor, and how Arcjet answers them. It's technical guidance, not legal advice. Your privacy and compliance teams decide how HIPAA applies to your own processing.

Why does healthcare AI security have to cover what agents do?

An agent moves PHI between systems without a person reviewing each step. A chat filter sees the text a user types, but it doesn't see the tool call that sends a referral letter to an outside clinic or writes a note to a chart. Healthcare AI security has to check the action itself, at the point where the agent is about to perform it.

Consider three paths that a chat filter never sees. A scheduling agent pulls a full discharge summary to answer a question about an appointment time, then pastes it into a message to a third-party texting service. A support agent copies a member ID into a ticket that another AI tool summarizes and stores. A developer's coding agent reads a fixture file that holds real patient rows and sends it to a model provider as context.

Each of these is a tool call. An agent uses a tool to read a record, send a message, write a file, or call a service through the Model Context Protocol (MCP), a standard way to expose tools to an agent. The control that matters runs in the path of that call, with the call's arguments in hand, before anything leaves.

HIPAA's minimum necessary standard in 45 CFR 164.502(b) points the same way. It requires a covered entity or business associate to make reasonable efforts to limit PHI to the minimum necessary for the purpose of a use or disclosure. An agent that pulls a whole chart to confirm a time slot isn't doing that. A check on the outbound message is one place to catch it, alongside access controls that decide which records the agent can read in the first place. For the access side, see how to stop AI agents accessing data they shouldn't.

Is an AI security vendor a HIPAA business associate?

Usually, yes, if it receives PHI to inspect it. HIPAA defines a business associate as a person that creates, receives, maintains, or transmits PHI on behalf of a covered entity. An AI security vendor that reads a prompt or a tool argument containing an MRN to classify it is receiving PHI, so it needs a signed BAA before that happens.

A covered entity is a health plan, a health care clearinghouse, or a health care provider that conducts certain transactions electronically. Both definitions are in 45 CFR 160.103. A digital health company that builds tools for providers is often a business associate itself, and a vendor it uses to handle PHI is then its subcontractor, which the same definition also treats as a business associate.

A BAA is the written contract that 45 CFR 164.502(e) requires before a covered entity lets a business associate handle PHI. 45 CFR 164.504(e) sets what it must say. The business associate must use appropriate safeguards, report uses and disclosures outside the contract, and return or destroy the PHI at the end of the contract where that's feasible.

None of this depends on what the vendor sells. A data loss prevention product, a guardrail model, and an observability tool that receive a prompt with PHI in it all raise the same question. The control you add to protect PHI is one more recipient of it, and it needs the same paperwork as your model provider. Under the GDPR, the equivalent role is a processor, with an Article 28 agreement in place of a BAA. For that side, see GDPR and CCPA compliance for LLM applications.

What should you ask an AI security vendor about PHI?

Ask the same four questions about each control a vendor offers, not about the product as a whole: where inspection runs, what the vendor stores and for how long, whether it signs a BAA, and whether zero data retention is available. One product can run one check in your process and send another to its cloud, so a single answer for the whole product hides the difference.

The following table lists the questions and the answers that settle them:

Ask aboutWhy it mattersAn answer that settles it
Where inspection runs

A check in your process doesn't send the text anywhere. A check in the vendor's cloud makes the vendor a recipient of the text.

A per-control list that says which checks run locally and which send the value

What's stored, and for how long

A vendor that keeps the flagged text holds a second copy of the PHI that it was meant to catch.

What each record contains, how long it's kept, and how backups are treated

Business associate agreement

Without a signed BAA, sending PHI to the vendor can leave your organization out of compliance.

Which plan includes a BAA, and that it's signed before PHI flows
Zero data retention

Some organizations can't let any vendor store customer content after a decision.

What the vendor still keeps under zero data retention

Then ask what's reported. A decision record that says "member ID found, call denied" is a different disclosure from a dashboard that shows the whole span with the member ID in it. Ask whether text sent to other checks, such as a prompt injection model, is stored with the decision, because that text can carry PHI too.

Ask what's certified, and ask for the report. No government HIPAA certification exists for any product. HHS states that no Security Rule standard requires a covered entity to certify compliance, and that it doesn't endorse or recognize private "certifications" for the Security Rule (checked on November 6, 2026). When a vendor says it supports HIPAA, the useful evidence is a BAA, an independent audit report such as SOC 2 Type 2, and a clear account of how it handles your data.

For how this vendor review fits a wider HIPAA program, see HIPAA compliance for AI agents. For a side-by-side view of the products, see healthcare AI guardrails compared and PHI detection tools compared.

How does Arcjet answer those questions?

Arcjet gives a different answer for each check, and you choose which one a route uses. Core personal data types can be detected in your own process, so the text doesn't leave it. The PHI identifier types are detected on Arcjet's servers, under a BAA that Arcjet signs with Enterprise customers. Values that the server-side detector flags are removed before storage.

Arcjet is an AI agent runtime security platform. It enforces policy on each prompt, tool call, and action, from the Arcjet SDKs in your code and from the hooks that coding agents already fire. A policy is a set of rules, written in Rego (the policy language from Open Policy Agent) or a visual builder, that decides whether a call is allowed. A detector is a check that a policy declares over one of its inputs, such as a sensitive information detector over the text of a note.

The following table lists where each Arcjet check runs and what Arcjet keeps, as described in the Arcjet privacy documentation:

CheckWhere it runsEntity typesWhat Arcjet keeps
sensitiveInfo rule in protect()Your process20 core types

Entity types and positions, with the request decision, for 30 days. The body stays in your process.

Local detector in a guard policyYour process20 core typesThe input's declared kind and its evaluation result
Server-side detector in a guard policyArcjet cloud20 core types and 5 PHI types

Flagged values are removed, and only entity types and positions are kept. Other server input values are stored with the decision for 90 days.

Coding agent policyArcjet cloud20 core types and 5 PHI types

Agent activity, including prompts and tool call details, for 90 days

The 20 core types include names, street addresses, phone numbers, email addresses, Social Security numbers, and driver's licenses. The five PHI types are MEDICAL_RECORD_NUMBER, HEALTH_PLAN_BENEFICIARY_NUMBER, LICENSE_PLATE_NUMBER, VEHICLE_IDENTIFICATION_NUMBER, and DEVICE_IDENTIFIER. For the full list, see sensitive information entity types.

Arcjet supports HIPAA compliance and offers a HIPAA-compliant environment. It enters into a BAA with Enterprise customers whose use of Arcjet involves PHI, and both parties must sign the BAA before any PHI is processed through Arcjet. If you send PHI to a server-side detector without a signed BAA, your organization may be out of compliance.

Zero data retention is available, and you can ask support@arcjet.com whether your organization is eligible. With it, Arcjet keeps the decision structure, such as the conclusion, the rules that fired, timings, and tool names, but not prompts, tool arguments, or server input values. Some records still carry values: request decisions from protect() keep request metadata, such as the IP address, path, headers, and query, Guard custom rules keep their inputs, and session analysis keeps session data, including a screened tool-result excerpt, while a session is active and for up to 24 hours after. Without it, Arcjet stores Guard decisions and agent activity for 30 days, and backups can hold data for longer. Prompt injection text is stored with its decision by default, and support can turn that off for your organization. Regional processing controls are part of the Enterprise plan. Arcjet holds a SOC 2 Type 2 report covering security, availability, and confidentiality, available in the Arcjet Trust Center.

Which checks can run without sending text to Arcjet?

The sensitiveInfo rule runs in your process and detects the 20 core types, such as names, addresses, phone numbers, and Social Security numbers. Use it when a route must not send its text to any vendor. It doesn't detect MRNs, member IDs, or the other PHI types, so it can't stand in for the server-side detector on text that carries those identifiers.

A public symptom checker is a good fit. The chat has no reason to collect anyone's identity, and the text that it handles is short. The following Next.js route checks each message in your process with Rampart, Arcjet's on-device detection model, before it reaches your model provider:

import arcjet, { sensitiveInfo } from "@arcjet/next";
import { rampart } from "@arcjet/sensitive-info-rampart";
// Rampart loads a native ONNX runtime, so use the Node.js runtime.
export const runtime = "nodejs";
const aj = arcjet({
key: process.env.ARCJET_KEY!,
rules: [
sensitiveInfo({
mode: "DRY_RUN", // Switch to "LIVE" after you review real traffic
deny: ["SSN", "GIVEN_NAME", "SURNAME", "STREET_NAME", "PHONE_NUMBER"],
backend: rampart(),
}),
],
});
export async function POST(req: Request) {
const { message } = await req.json();
const decision = await aj.protect(req, { sensitiveInfoValue: message });
if (decision.isDenied() && decision.reason.isSensitiveInfo()) {
return new Response("Remove personal details and try again.", {
status: 400,
});
}
// Send the message to your model provider
}

Tune the deny list to the route. A nurse-triage bot that has to collect a callback number leaves PHONE_NUMBER out of the list. Keep the refusal generic, so the response doesn't confirm what the detector found. Start in dry run, read a sample of real decisions, and switch to live mode once you know what your users type. For more ways to keep checks in your process, see keeping security inspection local.

How do you detect PHI in an agent's tool call?

Call guard() inside the tool before it acts, and pass the text as a server input to a published guard policy that declares a server-side sensitive information detector. The detector reads the value on Arcjet's servers, finds PHI identifiers such as MRNs and member IDs, and the policy denies the call. This path needs a signed BAA.

The following tool sends a note that an agent wrote to another system. It asks Arcjet for a decision first:

import { launchArcjet, policyInput } from "@arcjet/guard";
const arcjet = launchArcjet({ key: process.env.ARCJET_KEY! });
export async function sendNote(
userId: string,
note: string,
isExternal: boolean,
) {
const decision = await arcjet.guard({
label: "notes.send", // Selects the published policy with this label
actor: userId,
inputs: {
note: policyInput.server.string(note),
external: policyInput.server.boolean(isExternal),
},
});
if (decision.conclusion === "DENY" || decision.hasFailedOpen()) {
throw new Error("Note blocked by policy");
}
// Send the note
}

The hasFailedOpen() check refuses the call if Arcjet couldn't reach a decision, so an outage doesn't let a note through unchecked. For how the server-side scan handles long values, see the policy contract. The policy declares a detector with the ID phi over note, with the five PHI types plus SSN, EMAIL, and PHONE_NUMBER in its deny list. Its Rego denies a note that carries a PHI identifier anywhere, and a note that carries any listed identifier when it leaves your organization:

package arcjet.guard
import rego.v1
# The identifier types that taxonomy version 2 adds for PHI.
phi_types := {
"MEDICAL_RECORD_NUMBER",
"HEALTH_PLAN_BENEFICIARY_NUMBER",
"LICENSE_PLATE_NUMBER",
"VEHICLE_IDENTIFICATION_NUMBER",
"DEVICE_IDENTIFIER",
}
# Deny a note that carries a PHI identifier.
deny contains "phi-in-note" if {
some entity in input.signals.sensitive_info.phi.entities
entity in phi_types
}
# Deny a note that carries any listed identifier when it leaves your
# organization.
deny contains "identifiers-to-external" if {
input.signals.sensitive_info.phi.detected
input.values.external
}

An identifier with a fixed format, such as a vehicle identification number or a MAC address, is recognized from its structure. An MRN or a member ID has no fixed format, so Arcjet recognizes it from the text around it, such as a label like MRN or Member ID next to the value. Test the detector on text that looks like your own notes, in dry run, before the policy denies anything.

Know the limits before you rely on this. Arcjet detects identifiers. It doesn't decide whether the surrounding text is health information, and it doesn't redact or de-identify data. Some of HIPAA's 18 Safe Harbor identifier classes in 45 CFR 164.514(b)(2) aren't detected, including dates related to a person, biometric identifiers, full-face photographs, and the catch-all class of other unique identifying codes. Detection doesn't make a system HIPAA compliant on its own. For the full mapping and more examples, see detect protected health information and PHI detection for AI agents.

Each decision is also a record of what the agent tried to do and what the policy decided. The audit controls standard in 45 CFR 164.312(b) asks for mechanisms that record and examine activity in systems that contain or use electronic PHI. For how decision records support that, see compliance evidence for AI agents.

How do you keep PHI out of coding agents?

Apply a coding agent policy that screens developer prompts for PHI identifiers. Claude Code, GitHub Copilot, Cursor, OpenAI Codex, and Muse Code call Arcjet from the hooks they already fire, so one policy covers all five with no code change. A hook is a point in the agent's loop, such as before a tool call or when the developer submits a prompt, where the agent calls a command or service that you configure.

The coding-agent.sensitive-info starter policy runs a server-side detector over the prompt and denies card numbers and Social Security numbers. Add MEDICAL_RECORD_NUMBER and the other PHI types to its deny list to deny a prompt that carries those identifiers, such as a pasted patient row. Like the guard policy, this sends the prompt to Arcjet, so it needs a signed BAA.

Tool results are harder. A hook that reports a tool result fires after the tool ran, so Arcjet can't block or withhold a file that the agent already read. Session analysis screens tool results instead and flags the session when one contains a denied entity type. The coding-agent.session-analysis starter then refuses web and MCP calls, which could send the data out, until a Console user clears the flag with a recorded reason or the flag expires. Analysis can't undo what happened before the flag, and some of it runs in the background, so the agent can make more calls before the flag lands. For a full rollout, see HIPAA and coding agents.

Does the same approach work for other regulated industries?

Yes. The same four questions apply to any data that a regulation or a contract limits to named recipients, such as card data or bank records. Only the entity types and the agreement change. A fintech team denies card numbers and bank account numbers on a transfer tool, and asks every vendor the same questions about where that data goes and how long it stays.

The core types cover common financial identifiers, including CREDIT_CARD_NUMBER, BANK_ACCOUNT, ROUTING_NUMBER, and TAX_ID, and they can run in your process. For the controls that matter when an agent can move money, see AI security for fintech. For personal data under European and California privacy law, see GDPR and CCPA compliance for LLM applications.

Frequently asked questions

What is the best AI security for healthcare?

AI security for healthcare checks what AI agents do, such as tool calls, record writes, and outbound messages, for protected health information before they run, not only what people type into a chat box. Because a vendor that receives PHI to inspect it is usually a business associate, ask each vendor, per control, where inspection runs, what it stores, whether it signs a BAA, and whether zero data retention is available.

Is an AI security vendor a HIPAA business associate?

Usually, if it receives PHI to inspect it. Under 45 CFR 160.103, a business associate creates, receives, maintains, or transmits PHI on behalf of a covered entity. A security vendor that reads a prompt or tool argument containing a medical record number to classify it is receiving PHI, so it needs a signed business associate agreement first. This is technical guidance, not legal advice.

Is there a HIPAA certification for AI security products?

No. No government HIPAA certification exists for any product, and HHS doesn't endorse or recognize private certifications for the Security Rule. Ask a vendor for a signed BAA, an independent audit report such as SOC 2 Type 2, and a clear account of where it processes and stores your data.

Where does Arcjet detect PHI?

Arcjet detects the PHI entity types, such as medical record numbers and health plan member IDs, with the server-side sensitive information detector in a guard policy or a coding agent policy, so the value is sent to Arcjet. Arcjet signs a BAA with Enterprise customers whose use involves PHI, and both parties must sign it before any PHI is processed. The SDK-local sensitiveInfo rule runs in your process and detects only the 20 core types, such as names, addresses, and Social Security numbers.

What does Arcjet store when it detects PHI?

Arcjet removes values that the server-side sensitive information detector flags and keeps only the entity types and positions. Other server input values and agent activity are stored for 30 days, and backups can hold data longer. With zero data retention, Arcjet keeps decision structure but not prompts, tool arguments, or server input values, except request metadata on protect() decisions, Guard custom rule inputs, and session analysis data, which it keeps for up to 24 hours after a session ends.

Does PHI detection make an AI system HIPAA compliant?

No. Arcjet detects identifiers so a policy can block a request or tool call. It doesn't decide whether text is health information, doesn't redact or de-identify data, and doesn't detect every Safe Harbor identifier class, such as dates, biometric identifiers, and full-face photographs. Detection is one control within a wider HIPAA program.

AI runtime security in your code

Protect your AI agent workflows with Arcjet

Detect core personal data in your own process, and add the server-side PHI detector to a guard policy once your BAA is signed.