Skip to content
Discussion options

You must be logged in to vote

@cris-m how are you invoking it? i tested your code and it works as intended:

thread_config = {"configurable": {"thread_id": "1"}}

await graph.ainvoke({"messages": [("user", "hi, my name is John")]}, thread_config)
await graph.ainvoke({"messages": [("user", "what's my name?")]}, thread_config)
# the model correctly remembers the name for the same thread

perhaps you're looking for cross-thread persistence, where the model remembers information from one thread in another? in that case, check out this how-to guide https://langchain-ai.github.io/langgraph/how-tos/cross-thread-persistence/

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@cris-m
Comment options

@vbarda
Comment options

Answer selected by cris-m
Comment options

You must be logged in to vote
1 reply
@vbarda
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants