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:
| Field | Description |
|---|---|
| action_id | UUID — unique identifier for this action |
| agent_id | FK to the agent registry |
| agent_identity | DID of the agent at time of action |
| model_version | Model name + version hash (e.g., gpt-4o@sha256:abc123) |
| prompt_fingerprint | Deterministic hash of the prompt template |
| data_sources | Array of data store IDs accessed during the action |
| action_type | read | write | delete | api_call | email_send | financial_tx |
| target | The system/API endpoint/data store targeted |
| before_state | Full state of the target record(s) before the action |
| after_state | Full state of the target record(s) after the action |
| rollback_sql | Pre-computed reversal operation for instant rollback |
| timestamp | Server-side timestamp (not agent-provided) |
| previous_hash | SHA-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.
- 1Security team opens the agent detail page in the SinzAI console
- 2Filters the action ledger to show all email_send actions in the last 15 minutes
- 3Selects the 500 email actions → clicks "Rollback Selected"
- 4SinzAI sends retraction emails, updates the ledger with 500 rollback entries
- 5Audit report is automatically updated. Compliance posture: unchanged.