Skip to content

Commit 0773246

Browse files
authored
oss(langgraph): clarify usage of thread_id in checkpointer configuration (#1658)
1 parent 15ca411 commit 0773246

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/oss/langgraph/persistence.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ When using the LangGraph API, you don't need to implement or configure checkpoin
1717

1818
A thread is a unique ID or thread identifier assigned to each checkpoint saved by a checkpointer. It contains the accumulated state of a sequence of [runs](/langsmith/assistants#execution). When a run is executed, the [state](/oss/langgraph/graph-api#state) of the underlying graph of the assistant will be persisted to the thread.
1919

20-
When invoking a graph with a checkpointer, you **must** specify a `thread_id` as part of the `configurable` portion of the config.
20+
When invoking a graph with a checkpointer, you **must** specify a `thread_id` as part of the `configurable` portion of the config:
2121

2222
:::python
2323
```python
@@ -35,7 +35,9 @@ When invoking a graph with a checkpointer, you **must** specify a `thread_id` as
3535
```
3636
:::
3737

38-
A thread's current and historical state can be retrieved. To persist state, a thread must be created prior to executing a run. The LangSmith API provides several endpoints for creating and managing threads and thread state. See the [API reference](https://langchain-ai.github.io/langgraph/cloud/reference/api/) for more details.
38+
A thread's current and historical state can be retrieved. To persist state, a thread must be created prior to executing a run. The LangSmith API provides several endpoints for creating and managing threads and thread state. See the [API reference](https://reference.langchain.com/python/langsmith/) for more details.
39+
40+
The checkpointer uses `thread_id` as the primary key for storing and retrieving checkpoints. Without it, the checkpointer cannot save state or resume execution after an [interrupt](/oss/langgraph/interrupts), since the checkpointer uses `thread_id` to load the saved state.
3941

4042
## Checkpoints
4143

0 commit comments

Comments
 (0)