Skip to main content
TheAuth writes an audit record for every authorization decision (when agents.auditAll is on, which is the default) and gives you access-control features that map to themes in common AI governance frameworks. This page maps those features to framework language and shows how to export the records.
This page is a control mapping and a reporting aid. It is not legal advice, and using TheAuth does not make a system certified or compliant with any framework or regulation. Whether your system meets a given obligation depends on your own deployment, processes, and legal review. For EU AI Act obligations, check the text published in the Official Journal or ask your legal counsel which provisions apply to you.

What TheAuth provides

Frameworks

The EU AI Act imposes obligations on providers and deployers of high-risk AI systems. These are the articles most relevant to agentic AI and the TheAuth features that relate to them. TheAuth supplies some of the technical building blocks; the obligations themselves stay with you.Article 9 - Risk management systemTheAuth supports Article 9 through:Permission constraints (maxCallsPerHour, timeWindow, ipAllowlist) that enforce operational boundariesAudit queries you can run to review denied and rate-limited callsTrust scoring that adjusts agent autonomy based on track recordArticle 12 - Record-keepingArticle 12 concerns automatic recording of events (logs) over a high-risk system’s lifetime.TheAuth logs every authorization decision (allowed, denied, rate_limited) with:Agent and user identityResource and action requestedFull parametersIP address and user-agentDuration in millisecondsOptional token cost (for LLM calls)Records are written to theauth_audit_logs. The SDK never updates rows. It deletes rows only when you call theauth.audit.cleanup({ retentionDays }). IP address and user-agent are stored in the table but are not included in audit.export() output.Article 14 - Human oversightArticle 14 concerns designing high-risk systems so natural persons can effectively oversee them.TheAuth provides:requireApproval: true permission constraint to gate sensitive actions behind human approval (CIBA flow)Delegation depth limits (maxDepth) to prevent unbounded agent-to-agent chainsRevocation (theauth.agent.revoke()), after which the agent’s status is revoked and its token no longer validatesArticle 15 - Accuracy, robustness, cybersecurityTheAuth supports Article 15 through:Token rotation (theauth.agent.rotate()) to limit credential exposureExpiry management (expiresAt) for time-limited agent identitiesIP allowlists and time window constraints at the permission level
NIST has an AI Agent Standards Initiative focused on AI agent identity and access management. The themes below are how TheAuth features line up with that work. They are not NIST requirements that TheAuth certifies against.Identity provenanceA recurring theme is that every agent action should be traceable to a specific identity. TheAuth links agentId and userId on every audit entry, creating a complete provenance chain.Least privilege accessAnother theme is that agents should operate with the minimum permissions necessary. TheAuth enforces this through:Fine-grained resource+action permission modelallowedArgPatterns constraints to limit argument patternsScope-limited delegation that cannot exceed the delegating agent’s own permissionsRevocation and expiryAgent credentials should be revocable. TheAuth supports both immediate revocation (theauth.agent.revoke()) and time-based expiry via expiresAt.Audit trailLogs should be tamper-evident. TheAuth writes entries to a database table and the SDK never updates them, but it does not provide cryptographic tamper-evidence by itself (apart from the optional Verifiable Credential export). For tamper-evidence in production, use your database’s audit log features or ship logs to an immutable store (e.g. AWS CloudTrail, Loki with object storage).
SOC 2 Trust Service Criteria relevant to AI agent access:CC6.1 - Logical and physical access controlsTheAuth addresses CC6.1 through:Agent identity management with unique IDs per agentPermission-based access control (resource + action + constraints)Token hashing (only the SHA-256 hash is stored in theauth_agents.token_hash)Multi-tenant isolation via tenantIdCC6.2 - User registration and authorizationtheauth.agent.create() enforces maxPerUser limitsEvery agent has an ownerId linking it to an authenticated userPermissions are explicit and auditable at creation timeCC6.3 - Role-based accessPermission model supports resource-scoped action grantsDelegation chains allow scoped sub-delegation with depth limitsDefault permissions can be configured globally via agents.defaultPermissionsCC7.1 - System monitoringAudit records let you review denied calls and escalation-style denials, and trust scoring derives a score from denial historyAll authorization decisions are logged regardless of outcomeCC7.2 - Evaluation of security eventstheauth.audit.query() supports filtering by agent, user, actions, result, and time rangetheauth.audit.export() produces JSON or CSV that you can feed to a SIEM
ISO/IEC 42001 is the AI management system standard. It is a management system standard, so most of it concerns your organization’s processes rather than software features. The TheAuth features below can serve as evidence for operational and monitoring controls. Check clause numbers against your copy of the standard.InputsTheAuth logs the parameters field of every authorized action, giving you a record of what inputs were provided to agent-invoked tools.Operational controlsRate limiting via maxCallsPerHour permission constraintsTime window restrictions via timeWindow constraintsIP allowlisting via ipAllowlist constraintsOutcomesThe audit log captures result (allowed, denied, rate_limited) and reason for every action, supporting review of outcomes.MonitoringDuration tracking (durationMs) on every audit entryToken cost tracking (tokensCost) for LLM operations, which you can sum from theauth.audit.query() results

Generating reports

The audit module exports records you can attach to your own compliance evidence. export() returns a string:
export() returns at most 10,000 records per call, so page through large periods with narrower since and until ranges. The CSV contains id, agentId, userId, action, resource, result, reason, durationMs, tokensCost, and timestamp. The JSON output also includes parameters.

Retention

TheAuth does not delete audit records on its own. Retention is up to you: use your database’s partitioning or TTL features, or call theauth.audit.cleanup({ retentionDays }), which permanently deletes rows older than the cutoff. The EU AI Act sets its own log retention rules for high-risk systems. Confirm the period that applies to your system with counsel and set retentionDays to match.
Do not delete audit records during a live review or audit period. Expire old records only after your retention obligations have been met.

Audit trail

Query, export, and stream the immutable audit log.

GDPR compliance

Data export and account deletion tools for GDPR obligations.

Anomaly detection

Automatic detection of unusual agent behavior patterns.

Verifiable credentials

Export audit evidence as W3C Verifiable Credentials.
Last modified on October 7, 2026