HIPAA Compliance for AI in Healthcare: A Technical Guide
Architecture patterns, policy templates, and implementation guidelines for HIPAA-compliant AI systems.
HIPAA compliance for AI isn't about ticking boxes on a checklist. It's about architecting systems where Protected Health Information (PHI) is governed by default—where access controls, encryption, and audit trails are built into the execution model, not bolted on afterward.
This guide provides technical implementation patterns for HIPAA-compliant AI.
HIPAA Requirements for AI Systems
HIPAA's Security Rule requires:
- Access controls (§164.312(a)): Unique user IDs, emergency access, automatic logoff, encryption
- Audit controls (§164.312(b)): Record and examine activity in systems with PHI
- Integrity (§164.312(c)): Protect PHI from improper alteration or destruction
- Transmission security (§164.312(e)): Protect PHI transmitted over networks
- Minimum necessary (§164.502(b)): Limit access to minimum necessary for purpose
For AI systems, this translates to:
- Agent authentication: Every agent must have verifiable identity
- Role-based access: Agents granted only permissions needed for their function
- Purpose limitation: Access requests must specify legitimate purpose (treatment, payment, operations)
- Consent verification: Patient consent checked before PHI access
- Audit logging: Every PHI access logged with who, what, when, why
- Encryption: PHI encrypted at rest and in transit
Reference Architecture
A HIPAA-compliant AI architecture has three layers:
1. Policy Layer (THEMIS):
- Defines access control rules as declarative policies
- Evaluates every request against HIPAA requirements
- Generates cryptographic proof of compliance (ZKP)
2. Execution Layer (Hermes):
- Routes requests through policy gates before execution
- Enforces 'minimum necessary' by filtering returned fields
- Logs all PHI access with tamper-proof audit trail
3. Memory Layer (Mnemosyne):
- Stores PHI with AES-256 encryption at rest
- Implements automatic retention and deletion policies
- Tracks data lineage for breach notification
Implementation Example
Use case: AI agent generates patient care plan from electronic health records (EHR)
Step 1: Policy Definition
Define HIPAA access policy in THEMIS:
policy care_plan_access {
resource: "patient_records"
action: "read"
allow if:
agent.role == "care_planning" AND
patient.consent.treatment == true AND
request.purpose == "treatment" AND
agent.training.hipaa_Ready == true
audit: {
log_level: "full"
zkp_proof: true
}
}Step 2: Runtime Enforcement
Agent workflow:
- Agent authenticates with Hermes (JWT with role claims)
- Agent requests patient record:
GET /patients/{id}/records - Hermes intercepts request, forwards to THEMIS for policy check
- THEMIS evaluates care_plan_access policy
- If approved: Hermes retrieves record from Mnemosyne, returns to agent
- If denied: Request blocked with reason (e.g., 'patient consent required')
- All steps logged with ZKP proof of policy evaluation
Step 3: Audit Trail
Audit log entry (tamper-proof, hash-chained):
{
"timestamp": "2025-01-15T14:32:01Z",
"agent_id": "care-agent-7f3a",
"action": "read",
"resource": "patient_records",
"patient_id": "[REDACTED]",
"policy_result": "allow",
"purpose": "treatment",
"zkp_proof": "0x7f3a9b2c...",
"previous_hash": "0x2c9b3a7f..."
}HIPAA Compliance Checklist
- ✅ Unique agent IDs with authentication
- ✅ Role-based access control (RBAC)
- ✅ Purpose-based access (treatment, payment, operations)
- ✅ Patient consent verification
- ✅ Minimum necessary enforcement
- ✅ PHI encryption at rest (AES-256)
- ✅ PHI encryption in transit (TLS 1.3)
- ✅ Tamper-proof audit logs
- ✅ Automatic session timeout
- ✅ Emergency access procedures
- ✅ Breach notification tracking
- ✅ Data retention and deletion policies
- ✅ Business Associate Agreements (BAAs) with model providers
Apotheon's platform provides all of these as built-in primitives—no custom implementation required.
Deploy HIPAA-Compliant AI
See how Apotheon enables HIPAA-compliant AI with built-in governance.