Update intro to same thread example, update conceptual docs to include checkpoint (#827)

This commit is contained in:
Jacob Lee
2024-06-25 22:20:50 -07:00
committed by GitHub
parent fcdf7a8ced
commit c217e4a58d
4 changed files with 21 additions and 10 deletions
+4
View File
@@ -12,6 +12,10 @@ The LangGraph Cloud API provides several endpoints for creating and managing ass
### Threads
A thread contains the accumulated state of a group of runs. If a run is executed on a thread, then the [state](../../../concepts/#persistence) of the underlying graph of the assistant will be persisted to the thread. A thread's current and historical state can be retrieved. To persist state, a thread must be created prior to executing a run.
The state of a thread at a particular point in time is called a checkpoint.
For more on threads and checkpoints, see this section of the [LangGraph conceptual guide](https://langchain-ai.github.io/langgraph/concepts/low_level/#checkpointer).
The LangGraph Cloud API provides several endpoints for creating and managing threads and thread state. See the <a href="../reference/api/api_ref.html#tag/threadscreate" target="_blank">API reference</a> for more details.
### Runs
+6 -3
View File
@@ -272,12 +272,15 @@ See [this guide](/langgraph/how-tos/persistence) for how to use threads.
When you use a checkpointer with a graph, you can interact with the state of that graph.
This usually done when enabling different human-in-the-loop interaction patterns.
When interacting with the checkpointer state, you must specify [thread identifiers](#threads)
Each time you run the graph, the checkpointer creates several checkpoints every time a
node or set of nodes finishes running.
The most recent checkpoint is the current state of the thread.
When interacting with the checkpointer state, you must specify a [thread identifier](#threads).
Each checkpoint has two properties:
-**values**: This is the value of the state at this point in time.
-**next**: This is a tuple of the nodes to execute next in the graph.
- **values**: This is the value of the state at this point in time.
- **next**: This is a tuple of the nodes to execute next in the graph.
### Get state