From aabfe4adc0383400da9a1dec4e81b33001592b5e Mon Sep 17 00:00:00 2001 From: Rahul Verma Date: Fri, 5 Dec 2025 17:32:20 -0500 Subject: [PATCH 1/3] Add information about setup for persistance --- src/oss/langgraph/add-memory.mdx | 9 +++++++++ src/oss/langgraph/persistence.mdx | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/oss/langgraph/add-memory.mdx b/src/oss/langgraph/add-memory.mdx index 0e1c096930..b2566389dc 100644 --- a/src/oss/langgraph/add-memory.mdx +++ b/src/oss/langgraph/add-memory.mdx @@ -2141,3 +2141,12 @@ await checkpointer.deleteThread(threadId); **LangMem** is a LangChain-maintained library that offers tools for managing long-term memories in your agent. See the [LangMem documentation](https://langchain-ai.github.io/langmem/) for usage examples. ::: + +## Database management + +If you are using Postgres or Redis to store short and/or long-term memory, you will need to call the LangGraph-provided `saver` or `store`'s `setup` method before you can use it with your database. +That function sets up the schema necessary for the checkpoint to store data. It will also run any migrations on an existing database if you have upgraded your LangGraph version and the schema has changed. + +We recommend calling this method in a way consistent with your organization's best practices for managing database schemas e.g. calling it when your application first starts +or including a call to it in any existing process you have that automatically runs database migrations. + diff --git a/src/oss/langgraph/persistence.mdx b/src/oss/langgraph/persistence.mdx index f359bf5ebd..b58263bf62 100644 --- a/src/oss/langgraph/persistence.mdx +++ b/src/oss/langgraph/persistence.mdx @@ -9,8 +9,8 @@ LangGraph has a built-in persistence layer, implemented through checkpointers. W ![Checkpoints](/oss/images/checkpoints.jpg) -**LangGraph API handles checkpointing automatically** -When using the LangGraph API, you don't need to implement or configure checkpointers manually. The API handles all persistence infrastructure for you behind the scenes. +**Agent Server handles checkpointing automatically** +When using the [Agent Server](/langsmith/agent-server), you don't need to implement or configure checkpointers manually. The server handles all persistence infrastructure for you behind the scenes. ## Threads From 3543f287046ed5506b9c0f4d216385bfc2f9fa36 Mon Sep 17 00:00:00 2001 From: Lauren Hirata Singh Date: Mon, 8 Dec 2025 12:10:10 -0500 Subject: [PATCH 2/3] fixes based on wfh feedback --- src/oss/langgraph/add-memory.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/oss/langgraph/add-memory.mdx b/src/oss/langgraph/add-memory.mdx index b2566389dc..2d87118c9a 100644 --- a/src/oss/langgraph/add-memory.mdx +++ b/src/oss/langgraph/add-memory.mdx @@ -2144,9 +2144,9 @@ await checkpointer.deleteThread(threadId); ## Database management -If you are using Postgres or Redis to store short and/or long-term memory, you will need to call the LangGraph-provided `saver` or `store`'s `setup` method before you can use it with your database. -That function sets up the schema necessary for the checkpoint to store data. It will also run any migrations on an existing database if you have upgraded your LangGraph version and the schema has changed. +If you are using any database-backed persistence implementation (such as Postgres or Redis) to store short and/or long-term memory, you will need to run migrations to set up the required schema before you can use it with your database. -We recommend calling this method in a way consistent with your organization's best practices for managing database schemas e.g. calling it when your application first starts -or including a call to it in any existing process you have that automatically runs database migrations. +The convention is to define a `setup()` method on the checkpointer or store instance to run the required migrations. However, you should check with your specific implementation of @[`BaseCheckpointSaver`] or @[`BaseStore`] to confirm the exact method name and usage. + +We recommend running migrations as a dedicated deployment step, or you can ensure they're run as part of server startup. From b6e0ad23f3ad0f94409580e17d137031d9f14c1f Mon Sep 17 00:00:00 2001 From: rahul-langchain Date: Mon, 8 Dec 2025 14:15:49 -0500 Subject: [PATCH 3/3] Update add-memory.mdx Minor tweak --- src/oss/langgraph/add-memory.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/oss/langgraph/add-memory.mdx b/src/oss/langgraph/add-memory.mdx index 2d87118c9a..c812334a5e 100644 --- a/src/oss/langgraph/add-memory.mdx +++ b/src/oss/langgraph/add-memory.mdx @@ -2146,7 +2146,7 @@ await checkpointer.deleteThread(threadId); If you are using any database-backed persistence implementation (such as Postgres or Redis) to store short and/or long-term memory, you will need to run migrations to set up the required schema before you can use it with your database. -The convention is to define a `setup()` method on the checkpointer or store instance to run the required migrations. However, you should check with your specific implementation of @[`BaseCheckpointSaver`] or @[`BaseStore`] to confirm the exact method name and usage. +By convention, most database-specific libraries define a `setup()` method on the checkpointer or store instance that runs the required migrations. However, you should check with your specific implementation of @[`BaseCheckpointSaver`] or @[`BaseStore`] to confirm the exact method name and usage. -We recommend running migrations as a dedicated deployment step, or you can ensure they're run as part of server startup. +We recommend running migrations as a dedicated deployment step, or you can ensure they're run as part of server startup.