Skip to Content
hronika

Concepts

Loops, checkpoints and the cursor.

Loop

A loop is one run of your agent. init() creates it and returns its loopId. Every other call takes that id.

Checkpoint

A checkpoint is one step of the loop. Its type is one of:

TypeStores
inference_requestparameters
tool_call_requestparameters
inference_resultresult
tool_call_resultresult

Each saved checkpoint gets an id and a createdAt timestamp (an ISO date string). You can also pass agentState, any value you want to keep with that step.

Cursor

Each loop has a cursor that points at its current checkpoint.

  • save() adds the checkpoint at the end of the loop and moves the cursor to it.
  • undo() moves the cursor one checkpoint back. It fails if the cursor is already on the first checkpoint.
  • redo() moves the cursor one checkpoint forward. It fails if the cursor is already on the last checkpoint.
  • current() returns the checkpoint under the cursor.

Where checkpoints live

The SDK is a small client. Every call is an HTTP request to the Hronika API at HRONIKA_API, which stores the loops and checkpoints.

On this page