[PR #1348] [CLOSED] feat: add a new checkpoint implementation based on file-system #1393

Closed
opened 2026-02-15 20:15:35 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/1348
Author: @postbird
Created: 7/5/2025
Status: Closed

Base: mainHead: feat-checkpoint-filesystem


📝 Commits (3)

  • a739926 feat: add new checkpoint implementation based on file-system
  • cf1d9f4 fix(checkpoint-fs): add file io lock to process parallel I/O
  • 5bb8792 fix: langchain object serialize issue

📊 Changes

22 files changed (+1831 additions, -0 deletions)

View changed files

libs/checkpoint-filesystem/.env.example (+6 -0)
libs/checkpoint-filesystem/.eslintrc.cjs (+68 -0)
libs/checkpoint-filesystem/.gitignore (+8 -0)
libs/checkpoint-filesystem/.prettierrc (+19 -0)
libs/checkpoint-filesystem/.release-it.json (+13 -0)
libs/checkpoint-filesystem/LICENSE (+21 -0)
libs/checkpoint-filesystem/README.md (+94 -0)
libs/checkpoint-filesystem/langchain.config.js (+21 -0)
libs/checkpoint-filesystem/package.json (+83 -0)
libs/checkpoint-filesystem/src/index.ts (+481 -0)
libs/checkpoint-filesystem/src/tests/checkpoints.test.ts (+113 -0)
libs/checkpoint-filesystem/src/types.ts (+25 -0)
libs/checkpoint-filesystem/src/utils/base.ts (+21 -0)
libs/checkpoint-filesystem/src/utils/fast-safe-stringify/LICENSE (+23 -0)
libs/checkpoint-filesystem/src/utils/fast-safe-stringify/index.ts (+235 -0)
libs/checkpoint-filesystem/src/utils/file.ts (+343 -0)
libs/checkpoint-filesystem/src/utils/serde.ts (+146 -0)
libs/checkpoint-filesystem/tsconfig.cjs.json (+9 -0)
libs/checkpoint-filesystem/tsconfig.json (+24 -0)
libs/checkpoint-filesystem/turbo.json (+12 -0)

...and 2 more files

📄 Description

This is a implementation of the CheckPoint based on file-system.

I have been deeply learning Persistence before, there were some pain points for me during the learning stage.

  • I wanted to know the storage details especially the structured stored data, but there was not any good way. There are several implementations of the checkpoint, but we have to install some third-part dependencies, it's complex and we can not get the structured original data.
  • The data will be cleaned during the development stage if we are using the MemorySaver due to the application restarted.
  • Mostly, we need to create a integration with our internal cloud storage service, not just the common PostgreSQL, Mongo service, we should to learn about more about the checkpoint, and the file i/o storage is a good way.

Features:

  1. File I/O-based storage implemented in pure native Node.js
  2. Supports fast (near-concurrent) putWrites operations based on the file lock mechanism
  3. A clear structure can help developers quickly understand the stored procedure and storage structure.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/1348 **Author:** [@postbird](https://github.com/postbird) **Created:** 7/5/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat-checkpoint-filesystem` --- ### 📝 Commits (3) - [`a739926`](https://github.com/langchain-ai/langgraphjs/commit/a739926e5ff209bd443be0b940e3f205f8291423) feat: add new checkpoint implementation based on file-system - [`cf1d9f4`](https://github.com/langchain-ai/langgraphjs/commit/cf1d9f41866238246ccd16ebd35aae4cf721930e) fix(checkpoint-fs): add file io lock to process parallel I/O - [`5bb8792`](https://github.com/langchain-ai/langgraphjs/commit/5bb8792df825bbcd23375d818824cdb4db4874e3) fix: langchain object serialize issue ### 📊 Changes **22 files changed** (+1831 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `libs/checkpoint-filesystem/.env.example` (+6 -0) ➕ `libs/checkpoint-filesystem/.eslintrc.cjs` (+68 -0) ➕ `libs/checkpoint-filesystem/.gitignore` (+8 -0) ➕ `libs/checkpoint-filesystem/.prettierrc` (+19 -0) ➕ `libs/checkpoint-filesystem/.release-it.json` (+13 -0) ➕ `libs/checkpoint-filesystem/LICENSE` (+21 -0) ➕ `libs/checkpoint-filesystem/README.md` (+94 -0) ➕ `libs/checkpoint-filesystem/langchain.config.js` (+21 -0) ➕ `libs/checkpoint-filesystem/package.json` (+83 -0) ➕ `libs/checkpoint-filesystem/src/index.ts` (+481 -0) ➕ `libs/checkpoint-filesystem/src/tests/checkpoints.test.ts` (+113 -0) ➕ `libs/checkpoint-filesystem/src/types.ts` (+25 -0) ➕ `libs/checkpoint-filesystem/src/utils/base.ts` (+21 -0) ➕ `libs/checkpoint-filesystem/src/utils/fast-safe-stringify/LICENSE` (+23 -0) ➕ `libs/checkpoint-filesystem/src/utils/fast-safe-stringify/index.ts` (+235 -0) ➕ `libs/checkpoint-filesystem/src/utils/file.ts` (+343 -0) ➕ `libs/checkpoint-filesystem/src/utils/serde.ts` (+146 -0) ➕ `libs/checkpoint-filesystem/tsconfig.cjs.json` (+9 -0) ➕ `libs/checkpoint-filesystem/tsconfig.json` (+24 -0) ➕ `libs/checkpoint-filesystem/turbo.json` (+12 -0) _...and 2 more files_ </details> ### 📄 Description This is a implementation of the `CheckPoint` based on file-system. I have been deeply learning [Persistence](https://langchain-ai.github.io/langgraphjs/concepts/persistence/) before, there were some pain points for me during the learning stage. - I wanted to know the storage details especially the structured stored data, but there was not any good way. There are several implementations of the checkpoint, but we have to install some third-part dependencies, it's complex and we can not get the structured original data. - The data will be cleaned during the development stage if we are using the `MemorySaver` due to the application restarted. - Mostly, we need to create a integration with our internal cloud storage service, not just the common PostgreSQL, Mongo service, we should to learn about more about the checkpoint, and the file i/o storage is a good way. Features: 1. File I/O-based storage implemented in pure native Node.js 2. Supports fast (near-concurrent) putWrites operations based on the file lock mechanism 3. A clear structure can help developers quickly understand the stored procedure and storage structure. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 20:15:35 -05:00
yindo closed this issue 2026-02-15 20:15:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#1393