OpenParable
Skip to content
← Back to skills

Golem Debug Agent History

Testing & Quality
golem-debug-agent-history

Golem Debug Agent History is an Agent Skill for testing & quality published in the golemcloud/golem repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Querying the operation log. Use when dumping or searching the oplog, or debugging agent behavior from its recorded history.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/golemcloud/golem/blob/HEAD/golem-skills/skills/common/golem-debug-agent-history/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/golem-debug-agent-history, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Debugging Agent History

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.

To check agent metadata and status, load the golem-get-agent-metadata skill. To revert agent state, load the golem-undo-agent-state skill.

agent oplog — Query the Operation Log

Stream or search an agent's operation log (oplog). The oplog records every operation the agent has performed — invocations, side effects, persistence boundaries, etc.

golem agent oplog <AGENT_ID> [OPTIONS]

Flags

FlagDescription
--from <INDEX>Start from a specific oplog entry index. Cannot be combined with --query.
--query <LUCENE_QUERY>Search oplog entries using a Lucene query string. Cannot be combined with --from.

If neither --from nor --query is provided, the entire oplog is streamed.

Output

Each text entry is printed with its index (e.g. #00042:) followed by a labeled header and fields. In structured formats (json, yaml, toon), agent oplog emits one output document per entry with $type: "agent.oplog", index, and entry; parse stdout as a sequence of documents, not as one array or object. The entry types rendered are:

EntryDescription
CREATEAgent creation — shows timestamp, component revision, env vars, parent, initial plugins
CALLHost function call — shows function name, input, and result
INVOKEAgent method invocation started — shows method name, idempotency key, and input
INVOKE COMPLETEDInvocation finished — shows consumed fuel and result
ENQUEUED INVOCATIONPending method invocation — shows method name and idempotency key
ENQUEUED AGENT INITIALIZATIONPending agent initialization
ENQUEUED SAVE SNAPSHOT / ENQUEUED LOAD SNAPSHOTPending snapshot operations
ENQUEUED MANUAL UPDATEPending manual update — shows target revision
SUSPENDAgent suspended
ERRORError with retry info — shows retry-from index and error details
LOGLog entry — shows level and message
GROW MEMORYMemory growth — shows size increase
CREATE RESOURCE / DROP RESOURCEResource lifecycle — shows resource id
BEGIN ATOMIC REGION / END ATOMIC REGIONAtomic operation boundaries
BEGIN REMOTE WRITE / END REMOTE WRITERemote write boundaries
ENQUEUED UPDATE / SUCCESSFUL UPDATE / FAILED UPDATEComponent update lifecycle
ACTIVATE PLUGIN / DEACTIVATE PLUGINPlugin lifecycle — shows plugin name, version, priority
REVERTOplog revert — shows target oplog index
CANCEL INVOCATIONCancelled pending invocation — shows idempotency key
START SPAN / FINISH SPAN / SET SPAN ATTRIBUTETracing span operations
CHANGE PERSISTENCE LEVELPersistence level change
BEGIN REMOTE TRANSACTION / COMMITTED REMOTE TRANSACTION / ROLLED BACK REMOTE TRANSACTIONRemote transaction lifecycle
SNAPSHOTSnapshot data — shows mime type and data (JSON or binary size)
OPLOG PROCESSOR CHECKPOINTPlugin oplog processor checkpoint — shows plugin, target agent, confirmed/sending indices
SET RETRY POLICY / REMOVE RETRY POLICYRetry policy changes
RESTARTAgent restart
INTERRUPTED / EXITEDAgent interrupted or exited
NOPNo-operation marker
JUMPOplog jump — shows from/to indices
STORAGE USAGE UPDATEFilesystem storage usage change

Examples

Stream the full oplog:

golem agent oplog <AGENT_ID>

Dump starting from entry 100:

golem agent oplog <AGENT_ID> --from 100

Search for specific entries:

golem agent oplog <AGENT_ID> --query "error"