Behaviour for checkpoint persistence backends.
Implement this behaviour to add custom storage (e.g., S3, DynamoDB).
Built-in implementations: LangEx.Checkpointer.Redis, LangEx.Checkpointer.Postgres.
Summary
Callbacks
Deletes every checkpoint belonging to the thread in the config.
Lists checkpoints for a thread, most recent first.
Loads the latest checkpoint for the given thread.
Persists a checkpoint.
Types
@type config() :: keyword()
Callbacks
Deletes every checkpoint belonging to the thread in the config.
@callback list( config(), keyword() ) :: [LangEx.Checkpoint.t()] | {:error, term()}
Lists checkpoints for a thread, most recent first.
@callback load(config()) :: {:ok, LangEx.Checkpoint.t()} | :none | {:error, term()}
Loads the latest checkpoint for the given thread.
When the config includes a :checkpoint_id, that specific checkpoint
is loaded instead (time travel / forking).
@callback save(config(), LangEx.Checkpoint.t()) :: :ok | {:error, term()}
Persists a checkpoint.