Replies: 1 comment 3 replies
-
Could you share example code? At a quick glance, this looks like the graph you've compiled lacks a store instance, but your node is requesting a store instance. def my_node(state, store: BaseStore):
...
builder.compile() # missing: compile(..., store=InMemoryStore())
builder.invoke() Also please do note that the memorysaver/inmemorystore implementations of the BaseCheckpointSaver and BaseStore are both are ephemeral (which is why they are "in memory") and useful for testing & prototyping but not something for use in production. In prod you'd want a DB-backed instance (like the postgressaver and postgresstore, etc.) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently working on a web application that utilizes langgraph and enables multi-user persistence. Initially, I attempted to solve this using only a thread ID. The idea was that by providing a thread ID and enabling
MemorySaver
when compiling the graph, the code could access an "outdated" prompt history even if other prompts were used in the meantime, including memory. However, I found that when accessing this "outdated" prompt history, the information in the state was reset to None instead of being set as it was before or even been overwritten.After some further research, I discovered a feature called
InMemoryStore
, which is supposed to allow memory sharing across threads. While this is not something I necessarily need, I thought it might help resolve my issue since it also requires specifying a user ID.Now, I am facing the problem that when calling
graph.update_state
with my thread ID and user ID, I encounter the following error:ValueError: Missing required config key '__pregel_store' for 'initiate_all_interviews'.
This key should ideally be automatically handled by the library and is not something that should need to be manually specified in the thread. I suspect this might be related to the fact that
InMemoryStore
is relatively new and may still have some unresolved issues that could lead to such errors.I would appreciate any help or guidance on how this issue could be resolved or whether it might be a bug that the team could address.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions