Get the state of a thread.
This method calls POST /threads/{thread_id}/state/checkpoint if a
checkpoint is specified in the config or GET /threads/{thread_id}/state
if no checkpoint is specified.
get_state(
self,
config: RunnableConfig,
*,
subgraphs: bool = False,
headers: dict[str, str] | None = None,
params: QueryParamTypes | None = None
) -> StateSnapshot| Name | Type | Description |
|---|---|---|
config* | RunnableConfig | A |
subgraphs | bool | Default: FalseInclude subgraphs in the state. |
headers | dict[str, str] | None | Default: NoneOptional custom headers to include with the request. |
params | QueryParamTypes | None | Default: NoneOptional query parameters to include with the request. |