Your enterprise customers want SOC 2 Type II. Your auditor is asking questions about your AI agent systems that you don't have good answers to. You've done SOC 2 before for traditional SaaS — but AI agents introduce new challenges that existing controls don't cover.
This guide maps the specific SOC 2 Trust Service Criteria challenges created by AI agents and gives you actionable controls to address them. No theory — practical steps you can implement.
SOC 2 is a compliance framework developed by the AICPA (American Institute of Certified Public Accountants) that evaluates an organization's information systems based on five Trust Service Criteria (TSC):
Type I evaluates the design of controls at a point in time. Type II evaluates the operating effectiveness of controls over a period (typically 6-12 months). Enterprise customers almost always require Type II.
For deeper context on the regulatory landscape including the EU AI Act, see our EU AI Act requirements guide.
Traditional SOC 2 controls assume deterministic software: given the same input, the system produces the same output. AI agents break this assumption. Here's how each Trust Service Criteria is affected.
The criteria: System processing is complete, valid, accurate, timely, and authorized.
The problem with AI agents: How do you prove an AI agent "processed correctly" when:
What auditors ask:
What teams typically can produce: Error rates, maybe some sample outputs, possibly latency metrics. Not structured decision chains, not completeness guarantees, not accuracy verification across the population of agent decisions.
The criteria: Information designated as confidential is protected as committed.
The problem with AI agents:
What auditors ask:
The criteria: The system is available for operation and use as committed or agreed.
The problem with AI agents:
What auditors ask:
The criteria: Protection against unauthorized access, both physical and logical.
The problem with AI agents:
The criteria: Personal information is handled according to privacy commitments.
The problem with AI agents:
Here's the core problem: SOC 2 auditors expect evidence. For traditional systems, that evidence comes from application logs, database audit trails, access control records, and infrastructure monitoring.
For AI agent systems, the evidence expectations are higher but the available evidence is lower:
| Evidence Auditors Want | What Most Teams Have |
|---|---|
| Complete processing chains for agent decisions | Unstructured log files |
| Proof that logs haven't been tampered with | Standard database records (mutable) |
| Accuracy metrics for agent outputs | Anecdotal quality checks |
| Confidentiality controls for data in agent context | Basic API key security |
| Agent-specific availability metrics | General application uptime |
| PII detection and handling in agent I/O | Nothing automated |
| Risk assessment for agent behaviors | Generic application risk assessment |
This gap is what causes SOC 2 audits to stall when AI agents are in scope. The auditor asks for evidence. The team doesn't have it. The finding goes in the report.
Here's the checklist. Each control maps to a specific Trust Service Criteria and addresses the AI-specific challenges above.
Structured audit logging for every agent decision: Each agent action produces a structured trace with input, output, reasoning, tools used, model, tokens, and timestamp. Not log strings — structured records. (5-minute setup guide)
Session-linked decision chains: Multi-step agent executions are linked by session ID. Auditors can reconstruct the complete processing chain from trigger to final output.
Hash chain integrity verification: Every trace is cryptographically hash-chained. Run chain verification to prove records haven't been altered. This directly addresses the "can you prove this wasn't modified?" question.
Output validation rules: Define acceptable output ranges for agent decisions. Flag outputs that fall outside expected parameters (e.g., a credit scoring agent returning a score of 2000 when the scale is 300-850).
Completeness monitoring: Track expected vs. actual trace counts per session. A 12-step agent workflow should produce 12 traces — alert if fewer are recorded.
PII detection on agent I/O: Automated scanning of trace inputs and outputs for PII patterns (SSNs, email addresses, credit card numbers, names). Flag sessions where PII enters the agent context.
Data classification for agent inputs: Classify data that enters agent context by sensitivity level. Route high-sensitivity inputs through agents with additional controls.
LLM provider data handling review: Document how each LLM provider handles input data (retention, training use, access controls). Verify contractual commitments match your SOC 2 confidentiality obligations.
Trace redaction policies: Define what gets logged at full fidelity vs. what gets redacted in trace records. Balance audit completeness against confidentiality.
Agent-specific uptime monitoring: Track availability for each agent independently. An agent that depends on OpenAI has different availability characteristics than one using a self-hosted model.
LLM provider failover: Implement model fallback (e.g., if GPT-4o is unavailable, fall back to Claude). Document the failover behavior and test it.
Rate limit monitoring: Track token usage against rate limits. Alert when usage approaches limits to prevent unexpected degradation.
Cost circuit breakers: Set maximum spend thresholds per agent, per session, and per day. Prevent runaway costs from causing forced shutdowns.
Agent permission boundaries: Document what tools and resources each agent can access. Apply least-privilege principles — a research agent doesn't need database write access.
Prompt injection detection: Monitor agent inputs for known prompt injection patterns. Flag and review suspicious inputs before they reach the agent.
API key rotation: Rotate LLM provider API keys on a defined schedule. Use separate keys for development and production. Store keys in a secrets manager, not environment variables.
Agent action monitoring: Alert on unexpected agent behaviors — tool calls to services not in the agent's defined toolkit, unusual request patterns, or actions outside the agent's designated scope.
PII inventory for agent systems: Document what PII each agent processes, where it goes (which LLM provider), and how long it persists in each location.
Data subject access requests (DSAR) readiness: Can you retrieve all traces related to a specific individual? Tag traces with customer identifiers (hashed for privacy) to enable DSAR responses.
Retention policies: Define and enforce how long traces are retained. Align with both compliance minimums (e.g., EU AI Act 6-month minimum) and privacy maximums (GDPR storage limitation principle).
Cross-border data handling: If agents process EU personal data, ensure LLM API calls comply with GDPR transfer requirements (SCCs, adequacy decisions, etc.).
| Trust Service Criteria | AgentTraceHQ Capability |
|---|---|
| Processing Integrity | Structured traces for every agent decision. Session-linked decision chains. Hash chain verification proves records are complete and unmodified. |
| Confidentiality | PII detection on trace I/O. Configurable redaction policies. Data encrypted at rest and in transit. |
| Availability | Agent health monitoring. Uptime tracking per agent. SDK is non-blocking — never impacts agent availability. |
| Security | API key authentication (SHA-256 hashed storage). Role-based access (Owner, Admin, Member, Viewer, Auditor). Rate limiting per tier. |
| Privacy | PII flagging. Configurable retention policies. Customer-identifiable trace tagging for DSAR responses. |
The compliance export feature generates SOC 2-formatted reports that map directly to these criteria:
Hand these to your auditor alongside your other SOC 2 evidence. They cover the AI agent-specific gaps that your existing controls don't address.
SOC 2 Type II requires evidence over a reporting period — typically 6 to 12 months. That means the controls need to be in place and operating for months before the audit. If your next SOC 2 audit is in 6 months, the time to implement AI agent controls is now.
The gap between "we have generic application logs" and "we have compliance-grade agent audit trails" is the gap your auditor will find. Close it proactively.
For teams also preparing for EU AI Act compliance, many of the controls overlap — structured logging, hash chaining, and compliance reporting serve both frameworks. Implementing once covers multiple compliance requirements.
Generate SOC 2-ready audit reports for your AI agents with one click. Start free at agenttracehq.com — get audit-ready before your next reporting period.