Skip to main content
Healthcare agents handle Protected Health Information (PHI) under strict HIPAA regulations. A single compliance failure can result in fines up to $1.5M per violation category. This flow shows how TealTiger enforces PHI/PII governance, strict memory classification, HIPAA-compliant audit evidence envelopes, and structured evidence export via SARIF.

Orchestration Flow

Patient submits query

A patient asks: “Can you show me my lab results from last week? My name is Jane Smith, DOB 03/15/1985.”

TealGuard — PII/PHI detection

TealGuard scans the input and detects PHI: patient name (“Jane Smith”) and date of birth (“03/15/1985”). The PHI is flagged and redacted from downstream processing. The redacted query becomes: “Can you show me my lab results from last week? My name is [REDACTED_NAME], DOB [REDACTED_DOB].” The original values are stored only in the encrypted audit envelope.

TealEngine — HIPAA policy mode: ENFORCE

TealEngine evaluates the request under HIPAA policy mode set to ENFORCE. This is not MONITOR or REPORT_ONLY — every policy violation results in an immediate DENY. The engine verifies the patient’s identity through the authenticated session and sets the request classification to RESTRICTED (the highest level, required for PHI access).

Agent accesses patient records

The agent attempts to read the patient’s lab results from the electronic health record (EHR) system. This requires accessing memory classified as RESTRICTED.

TealMemory — Classification enforcement

TealMemory enforces read governance on the patient records. The agent’s request has classification RESTRICTED (set by TealEngine based on authenticated patient session). The lab results are also classified RESTRICTED. Access is granted because the classifications match. If the agent tried to access another patient’s records (classification mismatch), TealMemory would return DENY_READ.

Agent generates response

The agent generates a response summarizing the lab results: “Your CBC from March 10 shows normal ranges for all values. Your hemoglobin is 14.2 g/dL (normal: 12-16).”

TealSecrets — PHI leakage scan

TealSecrets scans the generated response for PHI leakage. It checks for patient identifiers, medical record numbers, SSNs, and other PHI patterns that shouldn’t appear in the response. The response contains only clinical data relevant to the authenticated patient — no leaked identifiers.

TealGuard — Output content moderation

TealGuard performs a final content moderation pass on the output. It verifies the response doesn’t contain inappropriate medical advice, disclaimers are present, and no cross-patient data contamination occurred.

TealAudit — HIPAA evidence envelope

TealAudit creates a HIPAA-compliant evidence envelope. This includes: who accessed the data (authenticated patient), what was accessed (lab results), when (timestamp), the full decision chain, all PHI that was redacted, and the governance modules that fired. PHI in the audit log is hashed (not plaintext) for compliance.

BundleExporter — SARIF export

BundleExporter exports the evidence envelope in SARIF v2.1.0 format. This structured format is consumable by compliance tools, SIEM systems, and regulatory auditors. The SARIF bundle includes all governance decisions, module results, and redacted evidence — ready for HIPAA audit review.

Flow Diagram

Healthcare Agent HIPAA governance flow

Code Example

Key Governance Points

HIPAA requires ENFORCE mode — never use MONITOR or REPORT_ONLY for production healthcare agents. A single PHI leak in monitor mode is still a compliance violation, even if you logged it.
TealAudit uses RedactionLevel.HASH for HIPAA compliance. PHI values are SHA-256 hashed in audit logs, not masked with asterisks. This allows compliance teams to verify consistency (same hash = same value) without exposing the actual PHI.
Use BundleExporter’s SARIF output to feed directly into your SIEM or GRC platform. The SARIF v2.1.0 format is supported by tools like GitHub Advanced Security, Snyk, and custom compliance dashboards.

HIPAA Medical Bot Cookbook

Complete cookbook recipe with HIPAA policy configuration

Audit & Redaction

How PHI redaction and hashing work in audit logs

TEEC Evidence Contract

Typed Evidence & Evidence Contract specification

EU AI Act Compliance

Regulatory compliance mapping for AI governance