Your agents can take action.They shouldn’t leave a mess behind.

When an agent fails halfway through a multi-tool run, its earlier writes are already real. AgentRein records the run and compensates for the changes it can safely reverse.

One failed step leaves every earlier write behind.

An onboarding agent creates an issue, posts an announcement, then fails while creating the handoff page. The failure is visible, but the cleanup is now somebody’s manual job.

The partial run
  1. GitHub issue createdStill open
  2. Slack announcement sentStill visible
  3. Notion handoff pageFailed to create

Manual cleanup. No shared execution record.

With AgentRein

The session has one execution record. Confirmed writes are compensated in reverse order, and anything unsafe to undo waits for a person.

01 issue created

02 announcement posted

03 handoff page failed

↳ compensate 02, then 01

Rollback is compensation, not time travel.

AgentRein does not pretend independent services are one database transaction. It records what each connected app needs to safely compensate for its own write.

A provider can reject a compensation or a resource can change later. Each recovery step is recorded with its own result.

  1. 01

    Capture recovery context

    Save the before-state for updates and deletes, or the provider resource ID for a create.

    BEFORE-STATE · PROVIDER RESOURCE ID

  2. 02

    Record confirmed writes

    Keep successful mutations together in one ordered session trace.

    CONFIRMED WRITES · ORDERED TRACE

  3. 03

    Compensate newest first

    Ask each provider to apply its supported inverse in LIFO order.

    LIFO · PER-ACTION RESULT

Keep your SDK. Add a recovery layer.

Add recovery to the SDK you already use, with confirmed writes and rollback results recorded together for every run.

  1. Start a session

    Give each agent run an ID and a stated intent.

  2. Wrap the client you already use

    AgentRein transparently observes the SDK calls your agent already makes.

  3. Run with a recovery record

    Confirmed writes, approval decisions, and rollback results stay together.

const session = await agentrein.newSession({
  agentId: 'onboarding-agent',
  intent: 'Prepare a new customer workspace',
});

const github = agentrein.wrap(octokit, session, {
  connector: 'github',
});

await github.issues.create({
  owner: 'acme', repo: 'onboarding',
  title: 'Prepare workspace',
});
Open the full quickstart

Only undo what can be undone safely.

Provider support decides what can be compensated. AgentRein makes that boundary visible before an unsafe action is allowed to create more work.

  • Reverted

    Supported recovery

    Restored from a snapshot or an explicit provider inverse.

    • github.issues.create → close
    • notion.pages.archive → restore
    • gmail.messages.trash → untrash
  • Unreverted

    Approval required

    Held for a human instead of being auto-undone.

    • github.pullRequests.merge
    • slack.files.delete
    • stripe.charges.create

Rollback uses each provider’s own API. Unsupported operations are never presented as safely reversible.

Start free. Add controls as you grow.

Every plan starts with session rollback. Add approvals and governance when your agents need them.

Compare plans

Starter

  • Sandbox rollback (simulated)
  • Standard connectors

Pro

  • Approval gates
  • Recovery metrics

Team

  • Intent drift visibility
  • Audit log

Build your first recoverable agent.

Start with the SDKs your agents already use, then give every real-world action a recovery path.