skillfed

langgraph-checkpoint-postgres

Library with a Postgres implementation of LangGraph checkpoint saver.

langgraph-checkpoint-postgres v3.1.2 7.9M downloads/30d#1,682 on PyPI39,690
Permissive license MIT Active released

What it is and what it does

This package integrates Postgres as a durable backend for LangGraph's checkpoint system, allowing you to persist the state of long-running workflows and agents across restarts and failures. It provides both synchronous (PostgresSaver) and asynchronous (AsyncPostgresSaver) implementations that store and retrieve checkpoint data—including channel values, versions, and execution history—directly in Postgres tables.

The package depends on psycopg (Psycopg 3) for database connectivity, orjson for efficient serialization, and langgraph-checkpoint for the checkpoint interface contract. Setup requires calling .setup() once to create the necessary tables, and subsequent operations use simple put/get/list methods to manage checkpoints. The documentation emphasizes security: you should set LANGGRAPH_STRICT_MSGPACK=true or provide an explicit allowed_msgpack_modules list to prevent code execution if the database is compromised.

Use it for:

  • Store agent execution state in Postgres so multi-step workflows survive application restarts or crashes.
  • Implement resumable LLM workflows where you can pause, inspect, and resume from any checkpoint.
  • Build multi-tenant systems where each tenant's workflow state is isolated and persisted in a shared Postgres instance.
  • Enable async workflows with AsyncPostgresSaver for non-blocking checkpoint operations in high-concurrency applications.
  • Audit and replay workflow execution by querying checkpoint history from Postgres.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Postgres-backed checkpoint saver for LangGraph, enabling durable state persistence for long-running workflows and agents.

Yes, if you are building LangGraph applications that require durable state persistence. The package is actively maintained, has no known vulnerabilities, installs with low friction, and is MIT-licensed. Install it when you need Postgres-backed checkpoints for production workflows; skip it if you only need in-memory state or are using a different checkpoint backend.

Install

langgraph-checkpoint-postgres on PyPI

pip

pip install langgraph-checkpoint-postgres

uv

uv add langgraph-checkpoint-postgres

poetry

poetry add langgraph-checkpoint-postgres

Installing langgraph-checkpoint-postgres

Before you install

Low friction install with a pure-Python wheel and four straightforward runtime dependencies. The package is actively maintained with a recent release and no known vulnerabilities.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open-source and commercial projects.

Quickstart

from langgraph.checkpoint.postgres import PostgresSaver

DB_URI = "postgres://user:pass@localhost:5432/db?sslmode=disable"
with PostgresSaver.from_conn_string(DB_URI) as checkpointer:
    checkpointer.setup()
    checkpointer.put({"configurable": {"thread_id": "1"}}, checkpoint_data, {}, {})

Requires Python >=3.10 and a running Postgres database. When manually creating connections, must pass autocommit=True and row_factory=dict_row to psycopg; omitting these causes TypeError during checkpoint operations.

Verify before relying

  • Performance characteristics and scalability limits for high-volume checkpoint operations.
  • Whether msgpack deserialization restrictions (LANGGRAPH_STRICT_MSGPACK) are enforced by default or require explicit configuration.
  • Compatibility with specific Postgres versions or deployment environments (cloud-hosted, self-managed).

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — langgraph-checkpoint, orjson, psycopg-pool, psycopg
Maintenance actively maintained — 7 days since the last release
Last repo commit
First released
Downloads 7,916,243/month — #1,682 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: langgraph_checkpoint_postgres-3.1.2-py3-none-any.whl

Tags

langgraph postgres checkpoint storagestate persistence for langgraph workflowspostgres checkpoint saverlanggraph durable memory backendworkflow state persistence databaselanggraph async checkpoint postgres
langgraph-integrationstate-persistenceasync-support

More Database packages

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

redis

Python client library for connecting to and…

permissive · top 1,000 on PyPI

ydb

YDB Python SDK is the official client library…

permissive · top 1,000 on PyPI

snowflake-connector-python

Connects Python applications to Snowflake data…

permissive · top 1,000 on PyPI

sqlparse

sqlparse tokenizes SQL text into a tree of…

permissive · top 1,000 on PyPI

dbt-adapters

Provides base adapter protocols and shared…

permissive · top 1,000 on PyPI

langgraph-checkpoint

Provides the base interface and serialization…

permissive · top 1,000 on PyPI

langgraph-checkpoint-sqlite

Provides a SQLite-backed checkpoint saver for…

permissive · top 5,000 on PyPI

langgraph-checkpoint-mongodb

Provides a MongoDB-backed checkpoint storage…

unclear · top 15,000 on PyPI

langgraph-checkpoint-aws

Provides AWS-based persistence backends for…

permissive · top 15,000 on PyPI

langgraph-checkpoint-redis

Provides Redis-backed checkpoint storage and…

permissive · top 5,000 on PyPI

langgraph

LangGraph is a low-level orchestration…

permissive · top 1,000 on PyPI

langgraph-cli

Command-line interface for creating,…

permissive · top 5,000 on PyPI

langgraph-supervisor

Builds hierarchical multi-agent systems where a…

permissive · top 15,000 on PyPI

llama-index-storage-docstore-postgres

Provides a Postgres-backed document store…

permissive · top 15,000 on PyPI

dbos

DBOS adds durable workflows and queues to…

permissive · top 5,000 on PyPI