Core Capability

Undo

Full action ledger. One-click rollback. Tamper-proof.

Overview

When an AI agent makes a mistake — sends a wrong email, deletes a production record, writes bad data to a pipeline — you need to know exactly what happened and reverse it immediately. SinzAI Undo provides a complete, append-only action ledger connected to a one-click rollback engine.

Every agent action is recorded with enough context to reverse it: the agent's identity, the model version, the prompt structure, the data sources consulted, the before-state of any modified records, and the exact API calls made. Rollback is not a "best effort" — it is a guaranteed reversal of every recorded write.

Action Ledger Schema

Every action is recorded with the following fields:

FieldDescription
action_idUUID — unique identifier for this action
agent_idFK to the agent registry
agent_identityDID of the agent at time of action
model_versionModel name + version hash (e.g., gpt-4o@sha256:abc123)
prompt_fingerprintDeterministic hash of the prompt template
data_sourcesArray of data store IDs accessed during the action
action_typeread | write | delete | api_call | email_send | financial_tx
targetThe system/API endpoint/data store targeted
before_stateFull state of the target record(s) before the action
after_stateFull state of the target record(s) after the action
rollback_sqlPre-computed reversal operation for instant rollback
timestampServer-side timestamp (not agent-provided)
previous_hashSHA-256 of the previous ledger entry (cryptographic chain)

Rollback Engine

Rollback operates at three levels of granularity:

Single Action

Reverse one specific write, API call, or email. Uses the pre-computed rollback_sql from the ledger entry. Instant.

Agent Session

Roll back every action an agent took during a specific session or time window. Actions are reversed in reverse chronological order, respecting dependencies.

Agent Lifetime

Roll back every action an agent has ever taken. Used when an agent is decommissioned after a major incident. Audit-only — requires dual approval.

Tamper-Proof Guarantees

  • Append-only: no entry can be modified or deleted once written
  • Cryptographic chaining: each entry contains the hash of the previous entry
  • Agent-isolated: agent credentials have zero write access to the ledger store
  • WORM storage: the ledger is stored on write-once-read-many infrastructure
  • Rollback audit trail: every rollback is itself recorded as a new ledger entry

Undo in Practice

Example: An agent sends an incorrect email to 500 customers.

  1. 1Security team opens the agent detail page in the SinzAI console
  2. 2Filters the action ledger to show all email_send actions in the last 15 minutes
  3. 3Selects the 500 email actions → clicks "Rollback Selected"
  4. 4SinzAI sends retraction emails, updates the ledger with 500 rollback entries
  5. 5Audit report is automatically updated. Compliance posture: unchanged.