GraphCheckpoint<TState>

Models & Types ยท AiDotNet.Agentic.Graph.Checkpointing

An immutable snapshot of a graph run at a point in time: which node runs next and the state as of that point. Saved after each step so a run can be resumed, inspected, or replayed.

For Beginners

Like a save-game. It remembers exactly where the graph was about to go next and what the data looked like, so you can stop and pick up later (or rewind to an earlier save).

How It Works

A checkpoint records the NextNode (where execution will continue) plus the State at that boundary, tagged with a ThreadId (the run/conversation) and a monotonically increasing Step. The sequence of checkpoints for a thread is its history โ€” the basis for durable resume and time-travel.

Constructors

Constructor Summary
GraphCheckpoint(string threadId, string checkpointId, int step, string nextNode, TState state) Initializes a new checkpoint.

Properties

Property Summary
TState State { get; } Gets the state captured at this boundary.
bool IsComplete { get; } Gets a value indicating whether this checkpoint represents a completed run.
int Step { get; } Gets the zero-based, monotonically increasing step index.
string CheckpointId { get; } Gets the unique id of this checkpoint within the thread.
string NextNode { get; } Gets the node that will execute next (or End when the run is complete).
string ThreadId { get; } Gets the run/thread this checkpoint belongs to.