IGraphCheckpointer<TState>
Interfaces ยท AiDotNet.Agentic.Graph.Checkpointing
Persists and retrieves GraphCheckpoints, enabling durable resume and time-travel
for graph runs. Implementations back onto memory, SQLite, Postgres, Redis, etc.
Known implementations: InMemoryGraphCheckpointer<TState>, JsonFileGraphCheckpointer<TState>
For Beginners
The save-game store. The graph asks it to save a checkpoint after each step, to fetch the latest checkpoint when resuming, and to list the full history when rewinding.
Methods
| Method | Summary |
|---|---|
Task SaveAsync(GraphCheckpoint<TState> checkpoint, CancellationToken cancellationToken) |
Saves (appends) a checkpoint. |
Task<GraphCheckpoint<TState>> GetAsync(string threadId, string checkpointId, CancellationToken cancellationToken) |
Gets a specific checkpoint by id (used for time-travel / replay from a past point). |
Task<GraphCheckpoint<TState>> GetLatestAsync(string threadId, CancellationToken cancellationToken) |
Gets the most recent checkpoint for a thread, or null if the thread has none. |
Task<IReadOnlyList<GraphCheckpoint<TState>>> GetHistoryAsync(string threadId, CancellationToken cancellationToken) |
Gets the full GraphCheckpoint history for threadId in append (chronological) order โ i.e. |