Skip to main content
KavachOS is built with compliance requirements in mind. Every agent action produces an immutable audit record with enough detail to satisfy the logging and oversight obligations of major AI governance frameworks.
The EU AI Act high-risk provisions take effect August 2, 2026. KavachOS gives you the audit infrastructure to meet the Article 12 and Article 14 requirements before that deadline.

What KavachOS provides

RequirementKavachOS feature
Immutable audit logkavach_audit_logs table with result, reason, duration, IP, user-agent
Human oversightApproval flows (CIBA), delegation depth limits, permission constraints
Access controlResource+action permission model with constraints (IP, time window, rate)
Identity traceabilityEvery action links agentId, userId, resource, action, parameters
Exportkavach.audit.export() as JSON or CSV, or as Verifiable Credentials
Anomaly detectionHigh-frequency, high-denial-rate, off-hours, privilege escalation

Frameworks

The EU AI Act imposes obligations on providers and deployers of high-risk AI systems. The relevant articles for agentic AI are:Article 9 - Risk management systemKavachOS supports Article 9 through:Permission constraints (maxCallsPerHour, timeWindow, ipAllowlist) that enforce operational boundariesAnomaly detection that flags unusual patterns before they become incidentsTrust scoring that adjusts agent autonomy based on track recordArticle 12 - Record-keeping
“High-risk AI systems shall technically allow for the automatic recording of events throughout their lifetime.”
KavachOS 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 kavach_audit_logs and are never updated or deleted by the SDK.Article 14 - Human oversight
“High-risk AI systems shall be designed and developed in such a way that they can be effectively overseen by natural persons.”
KavachOS 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 (kavach.agent.revoke()) that takes effect immediatelyArticle 15 - Accuracy, robustness, cybersecurityKavachOS supports Article 15 through:Token rotation (kavach.agent.rotate()) to limit credential exposureExpiry management (expiresAt) for time-limited agent identitiesIP allowlists and time window constraints at the permission level
The NIST AI Agent Standards Initiative (published February 2026) establishes baseline expectations for AI agent identity and access management.Identity provenanceNIST requires that every agent action can be traced back to a specific identity. KavachOS links agentId and userId on every audit entry, creating a complete provenance chain.Least privilege accessNIST recommends that agents operate with the minimum permissions necessary. KavachOS 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 expiryNIST requires that agent credentials can be invalidated. KavachOS supports both immediate revocation (kavach.agent.revoke()) and time-based expiry via expiresAt.Audit trailNIST requires tamper-evident logs. KavachOS writes all entries to a database table with no update or delete path in the SDK. 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 controlsKavachOS addresses CC6.1 through:Agent identity management with unique IDs per agentPermission-based access control (resource + action + constraints)Token hashing (only the hash is stored in kavach_agents.token_hash)Multi-tenant isolation via tenantIdCC6.2 - User registration and authorizationkavach.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 monitoringAnomaly detection covers high-frequency calls, high denial rates, off-hours access, and privilege escalation attemptsAll authorization decisions are logged regardless of outcomeCC7.2 - Evaluation of security eventskavach.audit.query() supports filtering by agent, user, action, result, and time rangekavach.audit.export() produces JSON or CSV for SIEM ingestion
ISO 42001 is the AI management system standard. Annex A.8 covers AI system operation.A.8.2 - AI system input dataKavachOS logs the parameters field of every authorized action, giving you a record of what inputs were provided to agent-invoked tools.A.8.3 - AI system operationKavachOS provides operational controls through:Rate limiting via maxCallsPerHour permission constraintsTime window restrictions via timeWindow constraintsIP allowlisting via ipAllowlist constraintsA.8.4 - AI system outputThe audit log captures result (allowed/denied/rate_limited) and reason for every action, supporting output-level review.A.8.5 - AI system performance monitoringDuration tracking (durationMs) on every audit entryToken cost tracking (tokensCost) for LLM operationskavach.audit.getCostSummary() aggregates costs by agent and day

Generating compliance reports

The audit module provides export functionality for generating compliance evidence:
// Export all audit records for a time range as JSON
const json = await kavach.audit.export({
  format: 'json',
  since: new Date('2026-01-01'),
  until: new Date('2026-03-31'),
});

// Export as CSV for spreadsheet review or SIEM ingestion
const csv = await kavach.audit.export({
  format: 'csv',
  since: new Date('2026-01-01'),
});

// Query specific events for a compliance review
const denials = await kavach.audit.query({
  result: 'denied',
  since: new Date('2026-01-01'),
  limit: 1000,
});

// Cost summary for Article 15 / A.8.5 reporting
const costs = await kavach.audit.getCostSummary({
  since: new Date('2026-01-01'),
});

Retention

KavachOS does not automatically delete audit records. Configure retention at the database level using your database’s native partitioning or TTL features, or via a scheduled cleanup job. For EU AI Act Article 12 compliance, the Act currently specifies retention “for a period appropriate to the intended purpose of the high-risk AI system.” The generally accepted minimum is one year from the last use of the system.
Do not delete audit records during a live compliance review or audit period. If you need to expire old records, do so only after retention obligations have been met.