HIPAA Audit Controls for Clinical AI Agents: §164.312(b) in Practice
HIPAA §164.312(b) is the Audit Controls standard under the Security Rule's Technical Safeguards. It requires covered entities and business associates to implement hardware, software, and procedural mechanisms that record and examine activity in information systems that contain or use electronic protected health information. For clinical AI agents — prior authorization, clinical triage, diagnostic support, care gap identification — this means audit records must capture not just which records were accessed, but what the AI recommended and why. EHR event logs do not satisfy this requirement alone.
What HIPAA §164.312(b) Actually Requires
Section 164.312(b) Audit Controls is Required (not addressable) under the HIPAA Security Rule Technical Safeguards. The standard requires hardware, software, and procedural mechanisms that record and examine activity in information systems containing ePHI. Two key words: record AND examine. The records must be reviewable in a meaningful way — for clinical AI, that means structured enough to answer: what did the agent decide, for which patient, using what data, with what outcome. Unlike EHR access logs (who accessed which record), clinical AI audit records must capture the reasoning-level event: what the agent recommended and why.
Which Clinical AI Systems Are In Scope
A clinical AI agent is in scope for §164.312(b) if it: accesses patient records as input or context, outputs recommendations based on patient-identifiable data, routes or prioritizes patient cases, processes ePHI as part of RAG pipelines, or ingests ePHI via API for any downstream AI decision. The four most common in-scope agent types: prior authorization agents (accessing diagnosis codes, CPT codes, clinical notes), clinical triage scoring (processing chief complaint, vitals, EHR data), diagnostic support (reviewing imaging reports, lab panels, clinical notes), and care gap identification (scanning patient panels with full record access).
Why EHR Audit Logs Are Insufficient for Clinical AI
EHR audit logs capture access events: user logged in, record accessed, field modified. This satisfies §164.312(b) for the EHR system. It does not satisfy it for a clinical AI agent. When a prior auth AI agent queries a patient record and produces a denial recommendation, the relevant activity is what the agent recommended and why — not just that records were accessed. EHR logs cannot show: the clinical criteria the AI applied, which policy version governed the decision, the agent's confidence and reasoning, whether a physician reviewer overrode the recommendation, or whether the record was modified after capture. OCR investigations into clinical AI outcomes will request all of these.
6-Year Retention and Business Associate Agreements
Two HIPAA requirements frequently missed: (1) HIPAA §164.316(b)(2) requires documentation retention for 6 years from creation or last effective date. OCR applies this expectation to audit logs for ePHI systems — clinical AI decision records must be retained for 6 years minimum, with 7 years increasingly standard to account for investigation timelines and state-specific requirements. (2) Any vendor who receives, processes, maintains, or transmits ePHI is a Business Associate — requiring a signed BAA under §164.308(b). An AI observability or audit trail vendor receiving clinical AI decision records containing patient data is a Business Associate. Deploy without a BAA and the vendor's breach becomes your notification obligation.
Implementation with TenetClient for Clinical AI
Install pip install tenet-ai-sdk. Initialize TenetClient with your API key (cloud) or VPC endpoint (on-premise, for entities requiring ePHI to never leave their network). Wrap each clinical AI decision with tenet.intent() context manager: call intent.snapshot_context() to capture the complete patient context, procedure codes, diagnosis codes, policy version, and model version for post-hoc reconstruction; call intent.decide() to record the recommendation, clinical reasoning, and confidence; call intent.execute() to close the tamper-evident record and return a record_id. For physician reviewer overrides, call tenet.record_override() with the reviewer's pseudonymized ID, original recommendation, and override decision — satisfying both HIPAA §164.312(b) and EU AI Act Article 14 documentation requirements.