Agent Server persists graph state using a checkpointer backend. By default, LangSmith stores checkpoints in PostgreSQL alongside other server data. You can switch to MongoDB or provide a custom implementation.Documentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-mdrxyo-1777658790-7be347c.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Regardless of the checkpointer backend, LangSmith always requires PostgreSQL for threads, runs, assistants, crons, and the memory store. The checkpointer backend only controls where checkpoint data is stored.
Available backends
| Backend | Storage | Configuration | Use case |
|---|---|---|---|
default | PostgreSQL | None (built-in) | Standard deployments |
mongo | MongoDB | langgraph.json or LS_DEFAULT_CHECKPOINTER_BACKEND env var | Teams with existing MongoDB infrastructure |
custom | User-provided | langgraph.json | Custom storage backends (see custom checkpointer) |
Default (PostgreSQL)
PostgreSQL is the default checkpointer backend. No configuration is needed. To use a custom PostgreSQL instance, set thePOSTGRES_URI_CUSTOM environment variable.
Set up MongoDB checkpointing
Requires Agent Server v0.7.64 or later.
Prerequisites
- A MongoDB replica set (standalone
mongodis not supported). This can be a self-managed replica set, amongosrouter, or a managed service like MongoDB Atlas. - A connection URI that includes the database name in the path (e.g.,
/langgraph).
Select the backend
Set the backend to"mongo" using one of these methods:
In langgraph.json (app-level—bundled with your application code):
langgraph.json. If langgraph.json includes a backend value, it takes precedence.
Provide the MongoDB URI
Set theLS_MONGODB_URI environment variable at deploy time:
Connection URI requirements
The URI must:- Point to a replica set member or
mongosrouter - Include the target database name in the path
Deploy by environment
- Standalone (Kubernetes)
- Standalone (Docker)
- Cloud
The langgraph-cloud Helm chart (v0.2.6+) has built-in MongoDB support. Enable it in your values file:Bundled MongoDB (development and testing):The chart deploys a single-node MongoDB replica set and automatically configures the server to use it.External MongoDB (production):Or reference an existing Kubernetes secret:The secret must contain a
mongodb_connection_url key.Custom checkpointer
To use a storage backend other than PostgreSQL or MongoDB, implement a custom BaseCheckpointSaver. See Add custom checkpointer for details.Related
- Configure TTLs for checkpoint and store item expiration
- Persistence concepts in LangGraph
- Data plane architecture
- Environment variables reference
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

