Open source · MIT

Cmd+Z for AI agents.

A drop-in SDK that records every action your AI agent takes — DB writes, charges, emails, tickets — and lets you reverse a run in one Slack command. Works with the OpenAI Agents SDK, LangGraph, Claude Agent SDK, and CrewAI.

npmnpm i recant
pippip install recant

The problem is real

What recant does

Wraps every external action your agent takes. Auto-synthesizes the inverse. Lets anyone on your team rewind a run from Slack.

1

Wrap your clients

One line per service. recant proxies your existing Postgres / Stripe / Slack / Resend / Linear clients and records every write to an append-only ledger.

2

Auto-synthesize the inverse

INSERT → DELETE. Charge → refund. Customer.create → customer.delete. We ship hand-written compensations for the top tools; OpenAPI-based auto-generation for the rest.

3

Rewind from Slack

/rewind agent-run-1287 in any channel. Watch the action timeline reverse in real time. Audit-logged, signed, replayable.

How it looks in your code

Drop-in. Five lines of integration. Same SDK clients you already use, just through the wrapped surface.

typescript
import { Undo } from "recant";
import { Client } from "pg";

const undo = new Undo();
const run = undo.startRun();

const pg     = run.pg(new Client({ connectionString: process.env.DATABASE_URL }));
const stripe = run.stripe();
const slack  = run.slack();

// Your agent runs as normal:
const user = await pg.insert("users", { id, email });
const customer = await stripe.createCustomer(user.email);
await stripe.charge(customer.id, 4900);
await slack.send("#general", `Welcomed ${user.email}, charged $49`);

// If something went wrong:
await undo.rewind(run.id, { pgClient: pg.client });

Supported tools

Five today, more shipping based on what users request. The honesty model is first-class — Slack and email messages can't be unsent, and we say so.

ToolOperationsReversibility
postgresINSERT / UPDATE / DELETEfull
stripecharges, customersfull (real refunds + deletes)
slackchat.postMessagepartial — threaded correction reply
resendemail sendpartial — correction email
linearissue create, archivefull (real delete + unarchive)

Who this is for

Engineers running production agents on the OpenAI Agents SDK, LangGraph, Claude Agent SDK, CrewAI, or LlamaIndex — who don't want to be on-call for an agent's mistakes.

Not what we are

This is the section every honest dev tool needs. We're not trying to be everything.

Not an observability tool. Plug us next to Langfuse, not instead of it.
Not a durable execution engine. Use us with Temporal / Restate, not instead of them.
Not a backup product. Rubrik Agent Rewind sells to the CISO. recant ships to the engineer.
Not a guarantee. Emails and Slack messages can't be unsent. We post corrections and label them honestly.

Try it in 60 seconds.

No signup. Live demo runs in your browser against a real Railway-hosted Postgres + Slack workspace.

Don't want to self-host?

We're shipping a hosted version with multi-workspace Slack OAuth, BYO-Postgres, and SSO. Get notified when it's ready — no spam, one email at launch.