LangGraphLangGraph 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
38 small wins to finish your pathNext lesson →

Integrations: swapping in real backends

An integration is the real backend that replaces a local stand-in: a persistent checkpointer, a real chat model, or a vector store, each a drop-in for the in-memory piece you already used.

Last updated: 27 Sep, 2026 · LangGraph 1.2

The course ran on in-memory pieces so it needed no setup. To ship, you swap each one for a real backend. The graph code does not change; only the piece you pass in does.

The pieces you used, and their real versions

What you usedA real onePackage
InMemorySaverSqliteSaver, PostgresSaverlanggraph-checkpoint-sqlite, langgraph-checkpoint-postgres
InMemoryStorea Postgres or Redis storelanggraph store backends
the stand-in chat modela hosted model via init_chat_modellangchain-openai, langchain-groq
the keyword search in RAGa real vector storelangchain-postgres (PGVector), langchain-chroma

Why the swap is drop-in

Every real checkpointer subclasses the same BaseCheckpointSaver that InMemorySaver does, so the graph accepts any of them in the same checkpointer= slot.

Example
from langgraph.checkpoint.base import BaseCheckpointSaver
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.checkpoint.sqlite import SqliteSaver

for saver in (InMemorySaver, SqliteSaver):
    print(saver.__name__, "is a checkpointer:", issubclass(saver, BaseCheckpointSaver))

Using a persistent checkpointer

Install the backend's package, open the saver, and compile with it. The checkpointer= call is the one from the checkpointer lesson, now pointing at a file.

python
# pip install langgraph-checkpoint-sqlite
from langgraph.checkpoint.sqlite import SqliteSaver

# same compile call, a real file instead of memory
with SqliteSaver.from_conn_string("checkpoints.db") as saver:
    graph = builder.compile(checkpointer=saver)

InMemorySaver vs SqliteSaver vs PostgresSaver

InMemorySaverSqliteSaverPostgresSaver
Survives a restartNoYes, one fileYes, a server
SetupNoneA file pathA database
Use forTests and demosLocal and single-machineProduction and many users

When to switch a piece

  • Anything a user comes back to needs a persistent checkpointer, not InMemorySaver.
  • A real assistant needs a hosted chat model in place of the stand-in.
  • RAG over real documents needs a vector store, not the keyword search.
Watch out. InMemorySaver and InMemoryStore lose everything when the process exits. They are for tests and demos; a persistent backend is what keeps a thread across restarts.
Try it yourself
  • Install langgraph-checkpoint-sqlite and compile a graph with SqliteSaver, then run it twice and confirm the thread survives.
  • Add PostgresSaver to the drop-in check and confirm it is also a BaseCheckpointSaver.
  • Swap the stand-in model for a hosted one with init_chat_model.

Every expert started right here.