Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/oss/langgraph/add-memory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.

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.

4 changes: 2 additions & 2 deletions src/oss/langgraph/persistence.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ LangGraph has a built-in persistence layer, implemented through checkpointers. W
![Checkpoints](/oss/images/checkpoints.jpg)

<Info>
**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**
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated but noticed while I was doing this so I decided to fix as well!

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.
</Info>

## Threads
Expand Down