Checkpointer
org.llm4s.agent.graph.Checkpointer
trait Checkpointer
Durable storage for graph threads: each thread's latest checkpoint, the pending writes recorded against it, and its durable event log. One store owns all three so that a commit is atomic.
Implementations must be safe to call from several threads, and must:
- apply a Commit entirely or not at all;
- accept a new checkpoint only when its
parentis the thread's latest checkpoint id (GraphError.CheckpointConflict otherwise), and only pending writes naming the resulting latest checkpoint (GraphError.InvalidCommit); - number a thread's events
1, 2, 3, ...in commit order, inside the commit, never reusing a number - including after compaction or a failed commit; - keep events until compactEvents removes them, and report the earliest sequence still available when asked to replay from before it (GraphError.ReplayUnavailable).
Fencing a commit with a run-claim token is Stage 2; the parent check is its precursor.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class InMemoryCheckpointer
Members list
In this article