TemporalCheckpointSaver¶
Read-oriented checkpoint saver that queries Temporal Workflows for state.
TemporalCheckpointSaver
¶
Bases: BaseCheckpointSaver
CheckpointSaver that reads state from Temporal Workflows.
This is a read-oriented adapter. Writes are handled implicitly by
Temporal's event history. The primary use case is enabling
get_state() and get_state_history() to work transparently.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
Client
|
A Temporal client instance. |
required |
Source code in langgraph/temporal/checkpoint.py
get_tuple
¶
Retrieve current state by querying the Temporal Workflow.
Source code in langgraph/temporal/checkpoint.py
aget_tuple
async
¶
Async version of get_tuple.
Source code in langgraph/temporal/checkpoint.py
list
¶
list(
config: RunnableConfig | None,
*,
filter: dict[str, Any] | None = None,
before: RunnableConfig | None = None,
limit: int | None = None,
) -> Iterator[CheckpointTuple]
List checkpoints from Temporal event history.
Currently returns at most the current state. Full event history traversal (including continue-as-new chains) is planned for v0.3.
Source code in langgraph/temporal/checkpoint.py
alist
async
¶
alist(
config: RunnableConfig | None,
*,
filter: dict[str, Any] | None = None,
before: RunnableConfig | None = None,
limit: int | None = None,
) -> AsyncIterator[CheckpointTuple]
Async version of list.
Source code in langgraph/temporal/checkpoint.py
put
¶
put(
config: RunnableConfig,
checkpoint: Checkpoint,
metadata: CheckpointMetadata,
new_versions: ChannelVersions,
) -> RunnableConfig
No-op. Temporal handles state persistence via event history.
Source code in langgraph/temporal/checkpoint.py
aput
async
¶
aput(
config: RunnableConfig,
checkpoint: Checkpoint,
metadata: CheckpointMetadata,
new_versions: ChannelVersions,
) -> RunnableConfig
No-op. Temporal handles state persistence via event history.
Source code in langgraph/temporal/checkpoint.py
put_writes
¶
put_writes(
config: RunnableConfig,
writes: Sequence[tuple[str, Any]],
task_id: str,
task_path: str = "",
) -> None
No-op. Temporal handles write persistence via event history.
aput_writes
async
¶
aput_writes(
config: RunnableConfig,
writes: Sequence[tuple[str, Any]],
task_id: str,
task_path: str = "",
) -> None
No-op. Temporal handles write persistence via event history.