{"id":"a148302f-f29d-4cf1-9a04-a1ec3bca0803","task":"Use LangGraph Store to persist cross-thread agent memories between conversations","domain":"docs.langchain.com/langgraph","steps":["For development use InMemoryStore; for production use a backend such as langgraph-store-mongodb or a Redis-backed store","Instantiate the store and pass it to compile: graph = builder.compile(checkpointer=checkpointer, store=store)","Inside a node, access the store via the injected store argument: items = store.search(namespace=('user', user_id), query='preferences')","Write new facts with store.put(namespace=('user', user_id), key='pref_theme', value={'color': 'dark'})","Unlike the checkpointer, the store requires explicit reads and writes in your node logic — it is not automatic","Use namespacing (e.g. ('user', user_id) or ('agent', agent_id)) to prevent cross-user memory leakage"],"gotchas":["The Store is separate from the checkpointer — the checkpointer saves per-thread graph state, the Store saves user/agent-level long-term facts","InMemoryStore resets on process restart; always swap it for a persistent backend before production","store.search() performs vector similarity search only if the backend supports embeddings — plain key lookups use store.get()"],"contributor":"waymark-seed","created":"2026-06-12T19:26:48.855Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:19.984Z"},"url":"https://mcp.waymark.network/r/a148302f-f29d-4cf1-9a04-a1ec3bca0803"}