June 14, 2026
SOC 2 and HIPAA for Custom AI Agents: A Practical Compliance Playbook
A practical SOC 2 and HIPAA compliance playbook for custom AI agents: the controls we build in, real year-one costs, and how to keep agents reviewable.
By Ian Phillips, Founder & CEO, Phillips Data Solutions
SOC 2 and HIPAA are no longer a "later" problem for custom AI agents — they are the gate you have to clear before a regulated buyer will even take a meeting. In 2026, SOC 2 has become the de facto B2B prerequisite for AI software, and HIPAA is non-negotiable the moment a workflow touches patient data. The hard part: AI agents are non-deterministic, and non-determinism breaks the traditional controls auditors expect. This post is the practical compliance playbook we apply to every custom AI build so it stays reviewable.
Why Agents Make Compliance Harder
Traditional software does the same thing every time, so controls are straightforward: this code path runs, this data is touched, here is the log. An AI agent, by contrast, decides what to do at runtime. That breaks three assumptions auditors rely on:
- Predictable data flows — an agent might read a field a static program never would.
- Deterministic outputs — the same input can produce different actions.
- Clear authorization boundaries — "what can this system do" becomes "what did this system decide to do."
The answer is not to avoid agents. It is to wrap the agent in a deterministic, logged, permissioned shell so the agent reasons freely but acts within hard guardrails. That is the core of a reviewable build.
The Controls We Add to Every Build
These are the things we bake in from day one, not bolt on before an audit.
1. Least-Privilege Tool Access
The agent never holds raw credentials or broad API access. It calls a defined set of tools — the same MCP server pattern we use everywhere — each scoped to one action. If the agent was never given a "delete patient record" tool, it cannot delete a patient record. Authorization becomes provable, not hopeful.
2. Full Decision-Level Audit Trails
Every agent action is logged with the inputs it saw, the tool it called, the arguments it passed, and the result. Crucially, we log at the decision level, not just the run level — so a year later you can replay exactly what the agent saw and did for a specific record. This is the auditability we flagged as a graduation trigger in When to Graduate from Zapier to a Custom AI App, and for regulated clients it is the whole ballgame.
3. Human-in-the-Loop on Consequential Actions
Anything irreversible or high-risk — sending PHI, modifying a clinical record, moving money — routes through explicit human approval. The agent prepares the action with full context; a person confirms it. This staged approach is the same one that made our AI receptionist deployments reliable, and for HIPAA it is essential.
4. Data Minimization and Scoping
The agent is given the minimum data needed for the task, nothing more. PHI and PII are masked or excluded from prompts wherever the workflow allows. Less data in the agent's context means a smaller breach surface and an easier audit.
5. Encryption, Retention, and BAAs
Standard but non-negotiable: encryption in transit and at rest, defined retention windows, and Business Associate Agreements with every subprocessor that could touch PHI — including the model provider. For HIPAA, the BAA chain has to be complete and documented.
SOC 2 vs. HIPAA: What's Different
They overlap, but they answer different questions.
- SOC 2 is about your organization's controls — security, availability, confidentiality, processing integrity, privacy. It is an attestation that you operate the way you claim to. Most B2B buyers ask for it.
- HIPAA is a legal requirement specific to protected health information. It mandates safeguards, BAAs, and breach notification. It applies whether or not anyone asks for proof.
Many of our healthcare-adjacent clients need both: SOC 2 to clear procurement, HIPAA because the data demands it.
The Real Cost
Be clear-eyed about the investment. A custom-build compliance path typically runs $35,000–$150,000+ in year one — covering the audit itself, the engineering of controls, documentation, and ongoing monitoring. That number scares people, but compare it to the alternative: being locked out of every enterprise and regulated deal in your pipeline. For businesses whose buyers filter on compliance, it is not a cost center — it is the price of admission to the only deals worth winning.
Build It In, Don't Bolt It On
The most expensive way to get compliant is to build the agent first and retrofit controls before an audit. Every control above — least privilege, decision-level logging, human-in-the-loop, data minimization — is cheap when designed in and brutal when added later. That is exactly why we architect for reviewability from the first commit, the same discipline we bring to our whole delivery stack.
If compliance is the thing standing between you and your best leads, it is solvable — methodically, and sooner than you think.
Ready to automate? Start a free discovery at www.phillipsdatasolutions.com/contact
Ready to automate?
Start a free discovery at www.phillipsdatasolutions.com/contact — we'll map your highest-ROI automation opportunities in 30 minutes.
Book Free Discovery