LangGraph 1 · Memory and persistence

Persist to PostgreSQL

Use PostgreSQL for production. Install the package, then create the tables once with setup().

pip install -U langgraph-checkpoint-postgres

from langgraph.checkpoint.postgres import PostgresSaver

with PostgresSaver.from_conn_string(DB_URI) as checkpointer:
    checkpointer.setup()

Official LangGraph 1 documentation

More memory and persistence commands

All memory and persistence commands · LangGraph 1 cheatsheet

Was this page helpful?