Skip to content
Browse the documentation

Audit Log

The AgentLock audit log: an immutable record of every request, decision and execution, with the full list of event types.

What is the Audit Log?

The Audit Log is an immutable record of all events in your workspace. Unlike the Timeline (which tracks action executions), the Audit Log records everything:

  • Agent requests (created, allowed, blocked)
  • Approval decisions (approved, denied, expired)
  • Action executions and undos
  • Credential operations (created, deleted, rotated)
  • Agent lifecycle (created, revoked, restored)
  • Settings changes (safe mode, data settings)
  • Member management (invited, role changed)

Audit events are append-only — they cannot be modified or deleted through the application. Database-level constraints enforce this immutability.

Full list of audit event types

Every event written to the audit log uses one of these event_type values:

Gateway requests

  • request.created — an agent submitted an action
  • request.allowed — policy auto-allowed it without approval
  • request.blocked — policy blocked it
  • request.approved / request.denied — a human decided
  • browser.action — an action inside an active browser session

Execution

  • action.executed — connector finished (success or failure is in the metadata); action_type is the effective type of the approval, declared_action_type the one the agent sent
  • action.failed — a read-only action failed and AgentLock runs it again; the error of that attempt is in the metadata
  • action.undone — Undo completed
  • action.undo_requested — someone clicked Undo in the Timeline

Agents

  • agent.registered — a new agent was created
  • agent.active / agent.revoked / agent.suspended — status changed
  • agent.deleted — hard delete (agent_id becomes NULL in subsequent audit rows)
  • agent.category_floor_enabled / agent.category_floor_disabled — per-agent trust flag toggled
  • token.created / token.revoked — API bearer token lifecycle

Permission routing (Claude Code, Codex, Gemini, OpenCode hooks)

  • agent.permission_routing.user_allow — a Bash/Edit/Write call was auto-allowed by a policy rule
  • agent.permission_routing.user_deny — a call was blocked by a policy rule
  • agent.permission_routing.forward — a call was forwarded to the approvals inbox
  • agent.permission_routing.ask_local — terminal mode surfaced the call in the harness's own prompt
  • agent.permission_routing.mode_changed — the agent's routing mode was switched (Bypass / Gateway / Terminal)

Policies & credentials

  • policy.created / policy.updated / policy.deleted
  • policy.claude_bash_rule_added / policy.claude_bash_rule_replaced — written by the Approve & remember button on an approval card
  • credential.created / credential.updated / credential.deleted

Members & workspace

  • member.added / member.removed
  • user.account_deleted / user.account_deletion_failed — a member deleted their account; recorded in the workspaces of other owners they belonged to, the second one with the reason when the deletion failed afterwards
  • workspace.data_settings_updated — Timeline or retention changed
  • workspace.exported — JSON export downloaded
  • billing.plan_changed / billing.payment_failed — Stripe webhook events

Each row includes: workspace_id, event_type, actor_id + actor_type (user or agent), resource_type, resource_id, metadata (JSON), and created_at. Security-sensitive flips always record the prior value in metadata so you can reconstruct state transitions.

Can I disable the Audit Log?

No. Every event is recorded, and the Audit Log switch under Settings > Data & Privacy stays on. Audit events are kept until the workspace is deleted; the retention period applies to execution history and approvals, not to the audit log.

Audit Log | AgentLock Docs