Technical reference · v1.0.0

AI Agent Audit Log Schema: Actions, Tools, Approvals, and Outcomes

An AI agent audit event is one durable record that connects a requested action to identity, delegated authority, policy, human review, tool effects, business outcome, and integrity proof. This public contract is vendor-neutral and uses current KLA producers only in the implementation mapping.

JSON Schema draft 2020-12 · Published 2026-07-28 · English canonical

Quick reference

Definition
An AI agent audit event is one durable record that connects a requested action to identity, delegated authority, policy, human review, tool effects, business outcome, and integrity proof.
Applicability
Use it for consequential agent actions, including a policy denial or a failed attempt. Apply local legal, privacy, retention, and sector requirements to the implementation.
Minimum evidence
Stable IDs, actor and owner identity, versioned components, requested authority, policy result, approval when required, effects, outcome, ordering, privacy controls, and verification state.
Worked example
The complete record follows a synthetic credit disposition from request through require_approval, authorized review, one tool effect, a business outcome, and a valid Ed25519 signature.

02

One worked action

The complete sample records a synthetic credit disposition. Policy requires an authorized underwriter before the write-capable tool runs.

  1. 01RequestA user delegates a scoped credit-disposition action to an agent.
  2. 02PolicyPolicy version 4.2.1 returns require_approval for the recorded amount.
  3. 03Human decisionA senior underwriter reviews the presented evidence and approves the bound request.
  4. 04Tool effectOne idempotent tool call updates the synthetic target and records before/after digests.
  5. 05ProofThe canonical signed payload hash and Ed25519 signature verify with the published sample key.
{
  "schema_version": "1.0.0",
  "event_id": "evt_01JZ8V4R9K2Q7M1W3D5N6P8X0A",
  "actors": {
    "agent": "agent_credit_review",
    "accountable_owner": "role_head_credit_operations"
  },
  "requested_action": "credit.application.set_disposition",
  "policy_decision": "require_approval",
  "approval_decision": "approved",
  "tool_status": "succeeded",
  "business_outcome": "achieved",
  "verification": "valid"
}

03

Record boundaries

Each artifact answers a different audit question. A production assurance procedure usually needs all four.

Operational logs, audit events, execution lineage, and evidence bundles compared
ArtifactQuestionTypical contentsIntegrity boundary
Operational logWhat did a component report?Messages, metrics, errors, latency, and local runtime context.Useful for operations. Completeness, identity, authority, and retention may remain unspecified.
Audit eventWho or what requested a governed action, under which authority, and what happened?Identity, versions, purpose, resource, policy, approval, tool effect, outcome, privacy, and integrity references.The record has a stable schema and an explicit verification result. Source-population completeness still requires reconciliation.
Execution lineageHow did one execution progress in order?Ordered spans or events, parent-child relationships, retries, tool calls, and status.Lineage supplies sequence and causality. It can link to several audit events and source artifacts.
Evidence bundleWhich retained artifacts support an audit assertion?Manifest, audit events, lineage, policy and approval records, source receipts, hashes, signatures, omissions, and redactions.Bundle verification tests artifact membership, hashes, signatures, ledger proofs, and declared omissions.

04

Field dictionary

Required fields apply to every record. Conditional fields apply when the named component or lifecycle path exists. Optional fields preserve portable detail.

Envelope and ordering

FieldStatusPurpose
schema_versionRequiredSelects the compatibility contract used to parse the record.
audit_event.event_idRequiredUniquely identifies this audit event.
audit_event.event_typeRequiredClassifies a completed or denied action. Verification state stays in integrity.
audit_event.occurred_at / recorded_at / sequenceRequiredSeparates event time from collection time and preserves deterministic ordering.
audit_event.correlation.correlation_id / execution_idRequiredJoins policy, approval, tool, outcome, and evidence records without a timestamp join.
audit_event.correlation.trace_id / span_id / parent_event_idOptionalLinks the record to OpenTelemetry or an equivalent trace and to a parent event. W3C all-zero identifiers are invalid.

Scope and identity

FieldStatusPurpose
audit_event.scope.organization_refRequiredCarries a pseudonymous or organization-controlled scope reference.
audit_event.scope.environment / retention_classRequiredNames the operating boundary and approved retention treatment.
audit_event.scope.region / legal_holdOptionalRecords regional placement and any hold that suspends ordinary disposal.
audit_event.actors.requester / agent / accountable_ownerRequiredBinds the request, agent identity, and accountable human or organizational role.
audit_event.actors.delegated_user / service_identityConditionalRecords on-behalf-of authority and workload identity when either exists.

Versions and requested authority

FieldStatusPurpose
audit_event.components.agentRequiredPins the agent Release and optional configuration digest.
audit_event.components.model / prompt_template / orchestratorConditionalPins each component that influenced the action.
audit_event.requested_action.action / purposeRequiredStates the proposed capability and approved business purpose.
audit_event.requested_action.resource / data_boundary_ref / environmentRequiredDefines the target, governed data boundary, and execution environment.
audit_event.requested_action.amountConditionalUses a decimal string plus ISO 4217 currency when financial value affects policy.

Policy and human decision

FieldStatusPurpose
audit_event.policy.decision_id / policy_id / policy_versionRequiredIdentifies the exact decision and governing policy version.
audit_event.policy.policy_digest / inputs_digestRequiredBinds the evaluation to protected policy and input representations.
audit_event.policy.decisionRequiredCarries allow, warn, require_approval, or block.
audit_event.policy.matched_rule_ids / reason_codes / evaluated_atRequiredMakes the result explainable and orderable before any effect.
audit_event.approvalConditionalRequired when policy returns require_approval. Execution effects require a decided, approved request from a human reviewer.
audit_event.approval.reassigned_from / override / appealOptionalPreserves exceptional decision lifecycle facts when the source system supports them.

Execution and outcome

FieldStatusPurpose
audit_event.tool_calls[]RequiredLists every attempted tool call. Blocked, non-approved, and unstarted actions require an empty array.
audit_event.tool_calls[].arguments_digest / result_digestRequiredBinds protected arguments and results without placing secrets in the event.
audit_event.tool_calls[].downstream_effects[]ConditionalRecords target-system receipts and before/after state digests when effects occur.
audit_event.execution.status / business_outcomeRequiredSeparates technical completion from the business result and binds completed or denied event semantics.
audit_event.execution.rollback / incident_refConditionalConnects recovery and investigation when either path is used.
audit_event.lineageRequiredLinks the action to one Lineage Record and its ordered event IDs.

Evidence, privacy, and integrity

FieldStatusPurpose
audit_event.evidence.manifest_ref / artifacts[]RequiredIdentifies the bundle manifest and supporting artifact digests.
audit_event.privacy.classification / redaction_statusRequiredStates the protection and transformation applied to the record.
audit_event.privacy.redactions[] / access_policy_refRequiredLocates protected fields and the policy that governs access. Entries match the declared redaction status.
integrity.canonicalization / hash_algorithm / record_hashRequiredDefines and records the digest of the canonical signed envelope metadata and audit_event.
integrity.previous_event_hashOptionalConnects records when the implementation uses a hash-linked event sequence. The signature protects this link.
integrity.signatureRequiredCarries the algorithm, key ID, sample public key, and detached digest signature.
integrity.verificationRequiredRecords valid, failed, or not_performed with verifier version and failure codes.

05

Integrity verification

Schema validity and cryptographic integrity are separate checks. Population completeness remains a separate audit procedure.

  1. 01Validate the envelope with the versioned JSON Schema.
  2. 02Build the signed payload from schema_version, audit_event, and integrity metadata other than record_hash and signature.value.
  3. 03Canonicalize the signed payload with RFC 8785 JSON Canonicalization Scheme.
  4. 04Compute SHA-256 and compare it with integrity.record_hash using the sha256: prefix.
  5. 05Resolve the trusted key by key_id. Verify its validity and revocation state at occurred_at.
  6. 06Verify the Ed25519 signature over the 32-byte digest.
  7. 07Verify each previous_event_hash against its ordered neighbor and an independently retained first-link anchor before accepting sequence order.
  8. 08Reconcile event IDs and artifact digests to lineage, source-system effects, and the evidence manifest.
  9. 09Record every failure code. A failed or unavailable check cannot produce valid.

Positive and denied examples

Both validate, reproduce their published hashes, and verify with the sample Ed25519 public key.

Tamper example

The envelope remains schema-valid. Its business outcome changed after signing, so the recomputed hash differs and verification recordsrecord_hash_mismatch.

The embedded sample key makes the files self-verifying. Production verification must trust keys through a separate registry. A key supplied only by the record cannot establish issuer identity.

06

OpenTelemetry correlation

Trace context joins telemetry and audit evidence. It does not carry the full audit assertion.

Carry

Propagate W3C traceparent across agent, policy, approval, tool gateway, and downstream calls. Copy trace_id and the action span_id into correlation.

Bind

Add stable execution_id, event_id, decision_id, request_id, and call_id attributes. Keep protected inputs, tokens, and raw model content outside ordinary span attributes.

Retain

Telemetry retention can be shorter than audit retention. Preserve the audit record and resolvable lineage reference after hot traces expire.

07

Compatibility and versioning

Version the contract independently from producer and tool versions.

Patch

Clarifications, descriptions, and examples may change without changing validation behavior. Stable v1 URLs keep immutable file contents, so a corrected artifact receives a new version URL.

Minor

A new optional field or enum extension requires a new schema_version and versioned URL. Consumers must reject unknown versions until they declare support.

Major

Removed or renamed fields, changed meanings, tighter required status, or changed canonicalization require a new major path. Producers can dual-write during migration.

Consumers must preserve unknown records for forensic handling and stop semantic processing when the schema version is unsupported. They must never silently coerce an unsupported policy outcome or verification status.

08

Current KLA producer mapping

The portable envelope is broader than any one KLA producer. These sources define current implementation truth.

AI agent audit event fields mapped to current KLA producers
Contract areaCurrent sourceMappingStatus
Audit event identity and durable appendservices/api/src/services/audit-logger.tsAuditEvent supplies event, tenant, user, resource, action, result, correlation, and security context. The logger mirrors tenant-scoped events into ImmuDB.Current source
Tool, policy, and approval event producersservices/execution-worker/src/services/audit-events.tsWorker producers hash tool inputs and results, capture execution and policy identity, append approval request and resolution events, and attach the active OpenTelemetry trace ID.Current source
Four policy outcomesservices/shared/src/policy/contracts.tsGateDecisionValueSchema defines allow, warn, require_approval, and block. Older worker audit helpers can still spell the blocked outcome as deny.Current source with normalization
Durable approval decisionservices/execution-api/src/services/approval-audit-outbox-worker.tsThe approval API uses a leased, idempotent outbox to append a tenant-bound decision record. The request-side producer remains separate.Current source
Execution lineage and trace correlationservices/execution-worker/src/services/lineage-trace-publisher.tsGoverned runs publish execution-scoped root and step spans. workflow-observability.ts also emits policy and approval attributes through OpenTelemetry.Current source
Sealed Evidence Bundle and offline verificationpackages/evidence-contract/src/index.tsThe bundle manifest binds tenant, export, artifacts, Merkle root, manifest hash, signature metadata, factory request, omissions, and redactions. packages/evidence-verifier performs the independent checks.Current source

Deliberate abstractions and unsupported fields

  • KLA does not currently emit this public envelope as one native wire record. The reference normalizes several authoritative producers into one audit unit.
  • Accountable owner, complete model and prompt configuration digests, tool versions, business outcomes, rollback, and incident references are not uniformly populated across every KLA runtime path.
  • Decision Request reassignment, override, and appeal are portable lifecycle fields. Current KLA producers do not expose all three as one normalized action-level contract.
  • The contract records the required role and human reviewer identity. Production consumers must verify that the reviewer held the required role when the decision occurred.
  • KLA signs and verifies the Sealed Evidence Bundle manifest and validates ledger and artifact proofs. Current KLA records do not all carry the per-record Ed25519 signature shape used by these portable examples.
  • The examples publish a sample public key so the files are self-verifying. Production systems must resolve trusted keys through an independently governed key registry and test revocation at the event time.

Apply the contract

Place the record inside a complete audit method.

Use the enterprise framework to define scope and control tests. Use the audit program to reconcile populations, sample actions, evaluate evidence, and report exceptions.

AI Agent Audit Log Schema: Actions, Tools, Approvals, and Outcomes