Concepts

Checkpoints

State snapshots, branch points, hashes, schema metadata, and placement strategy.

A checkpoint is a named state snapshot that replay can use as a branch point. It is the record that says: "from this moment, with this state, test a controlled change."

Checkpoint Fields

FieldWhy it matters
nameHuman-readable selector such as before-tool-choice or before-final-answer.
parentEventIdEvent after which this state became true.
stateArtifactIdRedacted JSON state payload.
stateHashStable comparison key for stale-checks and state diffs.
schemaName / schemaVersionState shape compatibility.
codeVersionCode compatibility for replay across releases.
packageVersionsFramework and package version context.

Placement Strategy

Good checkpoint placement makes replay narrow. Poor placement forces broad, ambiguous branches.

Place checkpointUse it for
After request normalizationTesting input interpretation.
Before retrievalTesting retrieval query, memory, or prompt clauses.
After retrievalTesting model decision with fixed context.
Before tool proposalTesting tool selection or arguments.
After tool resultTesting final reasoning with fixed tool evidence.
Before external mutationTesting safety gates before side effects.
Before final answerTesting output wording or final policy application.

Naming Conventions

Use stable, action-oriented names:

after-request-normalization
before-retrieval
after-retrieval
before-tool-choice
before-external-mutation
before-final-answer

Avoid names like checkpoint1 or middle. They make later branch creation harder for humans and analyst agents.

Practical Caveats

  • A checkpoint is only useful if the stored state is enough to resume or compare.
  • A checkpoint hash is not a semantic proof. It only says the serialized captured state matched.
  • Schema and code versions are optional in the current schema, but they are important when replay crosses deployments.
  • Managed runtimes may expose checkpoint-like hooks differently. Check the integration's capability page.

On this page