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 course | Production replacement | Package |
|---|---|---|
InMemoryStore | PostgresStore / AsyncPostgresStore; SqliteStore for a single machine | langgraph-checkpoint-postgres, langgraph-checkpoint-sqlite |
InMemorySaver | PostgresSaver / SqliteSaver | The same two packages |
groq:openai/gpt-oss-120b | Any init_chat_model provider, e.g. anthropic:..., openai:... | langchain-anthropic, langchain-openai |
google_genai:gemini-embedding-2 | Any init_embeddings provider, e.g. openai:text-embedding-3-small (1536 dims) | langchain-openai |
ReflectionExecutor on a local thread | The remote executor on LangGraph Platform | langgraph-sdk |
Syntax:
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 usedInstalling 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.
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.
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)created memory
found after reopening: {'content': 'Wants us to text her'}What persisted
- The tool wrote to a file.
memories.dbis an SQLite database; closing the first block closed the connection. - The second block is a fresh connection, and the memory was there, which an
InMemoryStorecannot 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.
store.delete.Related
- Previous: Prompt optimization
- Next: Project: support assistant
- Reference: LangGraph persistence
- Run the example twice and count how many memories the second block finds.
- Add
index={"dims": 3072, "embed": "google_genai:gemini-embedding-2"}to bothfrom_conn_stringcalls and search with a query. - Open
memories.dbwith thesqlite3command-line tool and list its tables.
You understood something today that you didn't yesterday.