LangMemLangMem 0.0.30 · LangGraph 1.2 · Python 3.10+
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
19 small wins to finish your pathNext lesson →

Integrations

Integrations are the production replacements for the in-memory and free-tier pieces this course ran on: a database-backed store, a persistent checkpointer, and whichever chat and embedding models your provider offers.

Last updated: 30 Sep, 2026 · LangMem 0.0.30

Every example so far used InMemoryStore, which forgets everything when the process ends. LangMem only talks to the BaseStore interface and to LangChain models, so moving to production means swapping those objects; the managers, tools and executor do not change.

What to swap for production

Used in this courseProduction replacementPackage
InMemoryStorePostgresStore / AsyncPostgresStore; SqliteStore for a single machinelanggraph-checkpoint-postgres, langgraph-checkpoint-sqlite
InMemorySaverPostgresSaver / SqliteSaverThe same two packages
groq:openai/gpt-oss-120bAny init_chat_model provider, e.g. anthropic:..., openai:...langchain-anthropic, langchain-openai
google_genai:gemini-embedding-2Any init_embeddings provider, e.g. openai:text-embedding-3-small (1536 dims)langchain-openai
ReflectionExecutor on a local threadThe remote executor on LangGraph Platformlanggraph-sdk

Syntax:

python
from langgraph.store.sqlite import SqliteStore

with SqliteStore.from_conn_string("memories.db") as store:
    store.setup()   # creates the tables once
    ...             # use it wherever InMemoryStore was used

Installing the SQLite store

pip install "langgraph-checkpoint-sqlite==3.1.1"

Saving with a memory tool

The memory tool from Memory tools takes the SQLite store exactly as it took the in-memory one.

python
save = create_manage_memory_tool(namespace=("memories", "{user_id}"), store=store)
save.invoke({"content": "Wants us to text her", "action": "create"}, config=asha)

A memory that survives a restart

The first with block writes through the tool and closes the database; the second opens it again, as a new process would, and finds the memory.

Example
from langgraph.store.sqlite import SqliteStore
from langmem import create_manage_memory_tool

asha = {"configurable": {"user_id": "asha"}}

with SqliteStore.from_conn_string("memories.db") as store:
    store.setup()
    save = create_manage_memory_tool(namespace=("memories", "{user_id}"), store=store)
    print(save.invoke({"content": "Wants us to text her", "action": "create"}, config=asha)[:15])

with SqliteStore.from_conn_string("memories.db") as store:
    for item in store.search(("memories", "asha")):
        print("found after reopening:", item.value)

What persisted

  • The tool wrote to a file. memories.db is an SQLite database; closing the first block closed the connection.
  • The second block is a fresh connection, and the memory was there, which an InMemoryStore cannot do.
  • No LangMem code changed. The same tool worked on the new store.

Semantic search on a persistent store

Pass the same index setting to the persistent store to keep semantic search, for example PostgresStore.from_conn_string(DB_URI, index={"dims": 3072, "embed": "google_genai:gemini-embedding-2"}). PostgreSQL needs the pgvector extension for it.

Choosing a store

  • One process on one machine, such as a prototype or a small internal tool: SQLite.
  • Several app servers sharing memories: PostgreSQL.
  • Deployed on LangGraph Platform: a PostgreSQL-backed store is provided for you.
Watch out. Memories are personal data. A persistent store keeps what customers said until you delete it, so plan for deletion requests, using the delete support from Updates and deletes and store.delete.
Try it yourself
  • Run the example twice and count how many memories the second block finds.
  • Add index={"dims": 3072, "embed": "google_genai:gemini-embedding-2"} to both from_conn_string calls and search with a query.
  • Open memories.db with the sqlite3 command-line tool and list its tables.

You understood something today that you didn't yesterday.