| Name | Type | Description |
|---|---|---|
thread_id* | str | The ID of the thread to get the state history for. |
checkpoint | Checkpoint | None | Default: NoneReturn states for this subgraph. If empty defaults to root. |
limit | int | Default: 10The maximum number of states to return. |
before | str | Checkpoint | None | Default: None |
metadata | Mapping[str, Any] | None | Default: None |
headers | Mapping[str, str] | None | Default: None |
Get the state history of a thread.
thread_state = client.threads.get_history(
thread_id="my_thread_id",
limit=5,
before="my_timestamp",
metadata={"name":"my_name"}
)Return states before this checkpoint.
Filter states by metadata key-value pairs.
Optional custom headers to include with the request.