The runtime that makes every
agent action reversible.

SAFE
@undolog_tool(tier=ToolTier.SAFE)
async def get_customer(id: str) -> dict:
row = await db.fetch_one(
"SELECT * FROM customers WHERE id = $1", id
)
return dict(row)
Read-onlyNo effect log. Auto-replayed on cache hit. Zero side effects.

Classify every action by reversibility. Enforce exactly-once rollback. Gate irreversible operations behind human approval.

How it worksView on GitHub

Every tool call has a tier.

Each tool call is classified at declaration time as safe, compensable, or irreversible, defining exactly how it can be rolled back.

Learn about tiers
SAFE

Safe

Read-only operations. No side effects. Executed without hesitation.

COMPENSABLE

Compensable

Writes with a known undo. Rollback is guaranteed and exactly-once.

IRREVERSIBLE

Irreversible

Sending emails, payments, deletions. Gated behind human-in-the-loop.

Python
1from undolog_sdk import undolog_tool, ToolTier, CompensationDescriptor
2
3@undolog_tool(tier=ToolTier.SAFE)
4async def read_user(id: str) -> dict:
5 """Retrieve a user by ID. Read-only, no side effects."""
6 row = await db.fetch_one(
7 "SELECT * FROM users WHERE id = $1", id
8 )
9 if not row:
10 raise UserNotFoundError(id)
11 return dict(row)
12
13@undolog_tool(
14 tier=ToolTier.COMPENSABLE,
15 compensation=CompensationDescriptor.new("delete_user"),
16)
17async def create_user(payload: dict) -> dict:
18 """Create a new user. Auto-compensated on failure."""
19 user_id = uuid4().hex
20 await db.execute(
21 "INSERT INTO users (id, name, email) "
22 "VALUES ($1, $2, $3)",
23 user_id, payload["name"], payload["email"],
24 )
25 return {"id": user_id, **payload}
26
27@undolog_tool(tier=ToolTier.IRREVERSIBLE)
28async def send_payout(amount: float, to: str) -> bool:
29 """Send a payout. Cannot be undone."""
30 await payout_provider.transfer(
31 recipient=to,
32 amount_cents=int(amount * 100),
33 )
34 return True
35
Python 3.12UTF-8Ln 35, Col 1

ACID guarantees for tool calls.

UndoLog provides database-grade safety guarantees for every agent action: rollback, replay, and audit built in.

Read the docs

Exactly-once rollback

If an undo is triggered, it runs exactly once: even if the system crashes mid-compensation. Backed by a persistent undo log.

Persistent Undo Stack

Every action is journaled with its inverse. Replayable. Auditable. The stack survives restarts.

Human-in-the-loop

Irreversible actions automatically pause. A human must explicitly sign off. No silent disasters.

The UndoBase system.

UndoLog is the first product: the innermost orbit of a platform built for safe agent execution.

Explore UndoBase
UndoBaseUndoLogUndoScanUndoRouteUndoWatch

Start in under a minute.

Install the SDK and classify your first tool call in seconds. No DSL, no scaffolding; just a single decorator.

Get started
bash
bashinstalling...

Apache 2.0. Free forever. Built in the open.

Star on GitHub and follow along. Grounded in ACRFence research. Built from first principles.

Star on GitHub