--- id: langgraph-checkpoint-postgres version: "3.1.2" license: MIT license_treatment: permissive maintenance: active --- # langgraph-checkpoint-postgres — Library with a Postgres implementation of LangGraph checkpoint saver. License: permissive · Maintenance: active · Downloads: 7.9M/mo ## 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 above — 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 pip install langgraph-checkpoint-postgres uv add langgraph-checkpoint-postgres 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_current - Install friction: low - Maintenance: active - Downloads: 7.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags langgraph postgres checkpoint storage, state persistence for langgraph workflows, postgres checkpoint saver, langgraph durable memory backend, workflow state persistence database, langgraph async checkpoint postgres, langgraph-integration, state-persistence, async-support [View on SkillFed](https://skillfed.io/packages/langgraph-checkpoint-postgres) · [View on PyPI](https://pypi.org/project/langgraph-checkpoint-postgres/)