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
+10 -6
View File
@@ -7,9 +7,13 @@
"source": [
"# How to run multiple agents on the same thread\n",
"\n",
"In LangGraph API, a thread is not explicitly associated with a particular agent.\n",
"This means that you can run multiple agents on the same thread.\n",
"In this example, we will create two agents and then call them both on the same thread."
"In LangGraph Cloud, a thread is not explicitly associated with a particular agent.\n",
"This means that you can run multiple agents on the same thread, which allows a different\n",
"agent to continue from an initial agent's progress.\n",
"\n",
"In this example, we will create two agents and then call them both on the same thread.\n",
"You'll see that the second agent will respond using information from the [checkpoint](https://langchain-ai.github.io/langgraph/concepts/low_level/#checkpointer-state) generated in the thread\n",
"by the first agent as context."
]
},
{
@@ -37,7 +41,7 @@
"id": "4f10d346-69e6-44f4-8ff0-ef539ba938df",
"metadata": {},
"source": [
"We can see that these agents are different"
"We can see that these agents are different:"
]
},
{
@@ -97,7 +101,7 @@
"id": "5e655e61-c2ee-488a-90f6-6189c84841da",
"metadata": {},
"source": [
"We can now run it on the OpenAI assistant first."
"We can now run the OpenAI assistant on the thread first."
]
},
{
@@ -133,7 +137,7 @@
"id": "c53709e9-ddb2-4429-9042-456eb6c91244",
"metadata": {},
"source": [
"Now, we can run it on a different Anthropic-based assistant."
"Now, we can run it on a second Anthropic-based assistant and see that this second assistant is aware of the initial question, and can answer the question, `and you?`:"
]
},
{