Golem Undo Agent State

Reverting agent state by undoing operations. Use when reverting invocations, rolling back agent state, or recovering from errors by undoing recorded operations.

golemcloud cdd8f14 1.2 KB Updated

File contents

Undoing Agent State

Both golem and golem-cli can be used — all commands below work with either binary.

The <AGENT_ID> format depends on the agent's language — refer to the language-specific invocation skills for the exact syntax.

agent revert — Undo Operations

Reverts an agent by undoing its last recorded operations. Useful for recovering from errors or unwanted state changes.

golem agent revert <AGENT_ID> [OPTIONS]

Flags

Flag Description
--last-oplog-index <INDEX> Revert to a specific oplog index. Cannot be combined with --number-of-invocations.
--number-of-invocations <N> Revert the last N invocations. Cannot be combined with --last-oplog-index.

Examples

Revert the last invocation:

golem agent revert <AGENT_ID> --number-of-invocations 1

Revert to a specific oplog index (use agent oplog to find the index):

golem agent revert <AGENT_ID> --last-oplog-index 42

golemcloud/golem/tree/main/golem-skills/skills/common/golem-undo-agent-state commit cdd8f1443f

Frequently asked questions

npx skillmds@latest add golemcloud/golem-undo-agent-state