Replies: 2 comments 2 replies
-
Each invocation starts the graph anew. Using the same thread loads the last checkpoint from the previous execution of that thread. See: https://langchain-ai.github.io/langgraph/concepts/memory/ |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks @hinthornw for the links! I already went through these, but somehow didn't connect the "short term memory" concept with this behaviour and that subsequent invocations of the same graph will inherit the state of the previous invocations. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am struggling to understand the relation between running a graph and running a graph via agent-chat-ui in a thread. Take the following simple chat graph:
If this was executed by hand (say, from a notebook), providing the input for the the "chat" node, this graph would end with the AI's reponse.
However, if I run this using langgraph platform and the agent-chat-ui, the execution continues infinitely and it remembers all previous messages, although there's an explicit END to the graph. I would expect that once the graph is END-ed it resets its state so that when I give it the 2nd or 3rd user input it would not remember previous messages. However, it does:
I expected that to the "What is my name?" question it would not give the correct answer as the previous graph has ended. However, it has the same messages in state and it answers correctly.
So, what is going on here? How are threads relate to graph execution and state?
Beta Was this translation helpful? Give feedback.
All reactions