Docs menuAudit
Docs/Govern

Audit

Track control-plane operations and, when enabled, export a hash-chained audit log.

Control-plane audit

control_plane_audit records org, run, path, actor user, actor role, backend, and created_at. It provides a straightforward event stream for privileged control-plane operations.

Each record carries two identities, the person the run belongs to and the agent backend that made the call, so every privileged operation traces to both.

FieldWhy it matters
org_idKeeps events scoped to a tenant or organization
run_idLinks the event to the agent run that caused it
pathIdentifies the control-plane operation
actor_user_id / actor_rolePreserves human context when available
backendIdentifies the executing backend

Audit chain

audit_chain is feature gated by audit_chain. When enabled, each event stores payload_hash, prev_hash, and chain_hash. The chain hash is computed from the previous hash, sequence number, and payload hash.

Chain formula
payload_hash = sha256(canonical_payload)
chain_hash = sha256(prev_hash + NUL + seq + NUL + payload_hash)

Export and verify

The runtime includes functions to verify an audit chain and export it as NDJSON. Use those exports for review workflows that need a tamper-evident event trail rather than only relational audit rows.

  • Verify sequence continuity before trusting an export.
  • Treat missing feature enablement as a deployment state: the schema is present and the feature is switched off.
  • Pair action_execution rows with audit events when reviewing external side effects.
  • Keep exported NDJSON outside mutable application volumes when it is used for compliance evidence.