Undo changes
undo_changesUse to reverse one agent's changes in a time window, for example after a bad import or a runaway loop, or to restore the store to a checkpoint saved with save_checkpoint by reversing every change made after it. Pass since for a window, or checkpoint to restore; with a checkpoint, actor is optional and limits the restore to that agent. By default this is a dry run that lists what would be reversed and returns the absolute until (and since) it used. Call again with those exact values, its plan_id and confirm: true to write the reversals; a confirmed call refuses a relative since. Each reversal is a new retraction, so an undo can itself be undone. Only facts can be undone; other events are listed as skipped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | The actor whose changes to reverse, as shown by list_changes. Required with since; optional with checkpoint. | |
| since | No | Start of the window: an RFC 3339 time, or a duration back from now such as 30m, 2h or 24h. Give since or checkpoint, not both. | |
| until | No | End of the window, RFC 3339. Defaults to now on a dry run. Required with confirm, with the value the dry run returned. | |
| reason | No | Why the changes are being undone. Recorded on every reversal. | |
| confirm | No | Set true to write the reversals. Leave unset for a dry run. | |
| plan_id | No | The plan_id the dry run returned. When set, confirm refuses to write if the changes in the window are no longer the ones the dry run showed. | |
| entity_id | No | Only reverse changes to this entity. | |
| workspace | No | Optional. The workspace to act on, as list_workspaces names it. Leave it out to use this connection's first workspace. | |
| checkpoint | No | Name of a checkpoint saved with save_checkpoint. Reverses the changes made after it, restoring the facts to that state. Give since or checkpoint, not both. |