GthSqliteSaver
Defined in: packages/core/src/history/checkpointSaver.ts:328
A LangGraph BaseCheckpointSaver persisting to a node:sqlite database.
Obtain one through openCheckpointSaver, which is fail-soft; the constructor is private so there is no way to hold one whose tables were never created.
Extends
Section titled “Extends”BaseCheckpointSaver
Properties
Section titled “Properties”serde:
SerializerProtocol
Defined in: node_modules/.pnpm/@langchain+langgraph-checkpoint@1.1.5_@langchain+core@1.2.13_openai@7.20.0_undici@8.11.2_ws@8.21.3_zod@4.6.5__ws@8.21.3_/node_modules/@langchain/langgraph-checkpoint/dist/base.d.ts:58
Inherited from
Section titled “Inherited from”BaseCheckpointSaver.serde
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: packages/core/src/history/checkpointSaver.ts:447
Close every held connection (fail-soft), and drop the in-memory copy with them, so a closed saver answers no read from memory that it could not answer from disk.
Returns
Section titled “Returns”void
deleteThread()
Section titled “deleteThread()”deleteThread(
threadId):Promise<void>
Defined in: packages/core/src/history/checkpointSaver.ts:859
Delete a thread’s state from memory and from disk: its file, whole (see removeThreadState).
Parameters
Section titled “Parameters”threadId
Section titled “threadId”string
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”BaseCheckpointSaver.deleteThread
get(
config):Promise<Checkpoint<string,string> |undefined>
Defined in: node_modules/.pnpm/@langchain+langgraph-checkpoint@1.1.5_@langchain+core@1.2.13_openai@7.20.0_undici@8.11.2_ws@8.21.3_zod@4.6.5__ws@8.21.3_/node_modules/@langchain/langgraph-checkpoint/dist/base.d.ts:65
Parameters
Section titled “Parameters”config
Section titled “config”RunnableConfig
Returns
Section titled “Returns”Promise<Checkpoint<string, string> | undefined>
Inherited from
Section titled “Inherited from”BaseCheckpointSaver.get
getDeltaChannelHistory()
Section titled “getDeltaChannelHistory()”getDeltaChannelHistory(
options):Promise<Record<string,DeltaChannelHistory>>
Defined in: node_modules/.pnpm/@langchain+langgraph-checkpoint@1.1.5_@langchain+core@1.2.13_openai@7.20.0_undici@8.11.2_ws@8.21.3_zod@4.6.5__ws@8.21.3_/node_modules/@langchain/langgraph-checkpoint/dist/base.d.ts:107
Walk the parent chain returning per-channel writes + seed, used to
reconstruct DeltaChannel state from checkpoint_writes.
For each requested channel, walks ancestors of the checkpoint identified
by config (following parentConfig) and accumulates the pending writes
for that channel. The walk terminates per-channel at the nearest ancestor
whose channel_values[ch] is populated; that value is returned as seed.
If the walk reaches the root without finding a stored value, seed is
omitted from that channel’s entry — the consumer treats the absence as
“start empty”.
Walks the parent chain (not list({ before })): for forked threads, only
on-path ancestors contribute.
The default implementation walks getTuple + parentConfig once for all
channels — each ancestor visited once, not once per channel. Savers with
direct storage access (e.g. MemorySaver) override for performance; the
return contract is fixed here.
Parameters
Section titled “Parameters”options
Section titled “options”channels
Section titled “channels”string[]
Channel names to walk for. Empty → empty mapping.
config
Section titled “config”RunnableConfig
Configuration identifying the target checkpoint.
Returns
Section titled “Returns”Promise<Record<string, DeltaChannelHistory>>
Per-channel DeltaChannelHistory for every requested name.
Remarks
Section titled “Remarks”Beta. The signature, return shape, and interaction with
DeltaSnapshot blobs may change. Override at your own risk; the default
implementation will continue to work against the public
BaseCheckpointSaver contract.
Inherited from
Section titled “Inherited from”BaseCheckpointSaver.getDeltaChannelHistory
getNextVersion()
Section titled “getNextVersion()”getNextVersion(
current):number
Defined in: node_modules/.pnpm/@langchain+langgraph-checkpoint@1.1.5_@langchain+core@1.2.13_openai@7.20.0_undici@8.11.2_ws@8.21.3_zod@4.6.5__ws@8.21.3_/node_modules/@langchain/langgraph-checkpoint/dist/base.d.ts:117
Generate the next version ID for a channel.
Default is to use integer versions, incrementing by 1. If you override, you can use str/int/float versions, as long as they are monotonically increasing.
Parameters
Section titled “Parameters”current
Section titled “current”number | undefined
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”BaseCheckpointSaver.getNextVersion
getTuple()
Section titled “getTuple()”getTuple(
config):Promise<CheckpointTuple|undefined>
Defined in: packages/core/src/history/checkpointSaver.ts:511
Parameters
Section titled “Parameters”config
Section titled “config”RunnableConfig
Returns
Section titled “Returns”Promise<CheckpointTuple | undefined>
Overrides
Section titled “Overrides”BaseCheckpointSaver.getTuple
list()
Section titled “list()”list(
config,options?):AsyncGenerator<CheckpointTuple>
Defined in: packages/core/src/history/checkpointSaver.ts:588
History, read from SQLite only. Nothing in this repo lists a thread’s checkpoints
(getStateHistory is never called), and memory holds only each thread’s latest checkpoint, so
after a cut this omits what reached memory alone.
Parameters
Section titled “Parameters”config
Section titled “config”RunnableConfig
options?
Section titled “options?”CheckpointListOptions
Returns
Section titled “Returns”AsyncGenerator<CheckpointTuple>
Overrides
Section titled “Overrides”BaseCheckpointSaver.list
put(
config,checkpoint,metadata,_newVersions):Promise<RunnableConfig<Record<string,any>>>
Defined in: packages/core/src/history/checkpointSaver.ts:661
Parameters
Section titled “Parameters”config
Section titled “config”RunnableConfig
checkpoint
Section titled “checkpoint”Checkpoint
metadata
Section titled “metadata”CheckpointMetadata
_newVersions
Section titled “_newVersions”ChannelVersions
Returns
Section titled “Returns”Promise<RunnableConfig<Record<string, any>>>
Overrides
Section titled “Overrides”BaseCheckpointSaver.put
putWrites()
Section titled “putWrites()”putWrites(
config,writes,taskId):Promise<void>
Defined in: packages/core/src/history/checkpointSaver.ts:742
Store intermediate writes linked to a checkpoint.
Parameters
Section titled “Parameters”config
Section titled “config”RunnableConfig
writes
Section titled “writes”PendingWrite[]
taskId
Section titled “taskId”string
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”BaseCheckpointSaver.putWrites
reclaimUnresumableThreads()
Section titled “reclaimUnresumableThreads()”reclaimUnresumableThreads(
options?):ReclaimSummary
Defined in: packages/core/src/history/checkpointSaver.ts:877
GS2-107 — remove the state of every thread no conversation row names, past the grace window. The retention module owns the policy and the reasoning; this runs it over this saver’s store, releasing any connection this saver holds to a thread before its file is touched.
Every thread this saver wrote is excluded, always, on top of whatever the caller names. A
caller cannot supply that set: the runner rotates threads without telling anyone, so the only
place that knows which thread the session ended on is the object the writes went through. The
union is the contract — excludeThreadIds adds to the protection and can never subtract from
it.
Parameters
Section titled “Parameters”options?
Section titled “options?”excludeThreadIds?
Section titled “excludeThreadIds?”readonly string[]
graceMs?
Section titled “graceMs?”number
number
Returns
Section titled “Returns”storeStats()
Section titled “storeStats()”storeStats(
topN?):CheckpointStoreStats
Defined in: packages/core/src/history/checkpointSaver.ts:888
GS2-107 — what this saver’s store holds.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”toJSON()
Section titled “toJSON()”toJSON():
string
Defined in: node_modules/.pnpm/@langchain+langgraph-checkpoint@1.1.5_@langchain+core@1.2.13_openai@7.20.0_undici@8.11.2_ws@8.21.3_zod@4.6.5__ws@8.21.3_/node_modules/@langchain/langgraph-checkpoint/dist/base.d.ts:64
Prevent JSON.stringify from traversing backend clients (e.g. pg Pool
timers) when a checkpointer is present in runnable configurable.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”BaseCheckpointSaver.toJSON
open()
Section titled “open()”
staticopen(storePath,options?):GthSqliteSaver|null
Defined in: packages/core/src/history/checkpointSaver.ts:434
Open the saver over the store at storePath, creating the store (and splitting a single-file
store from an earlier release) as needed. Returns null on any failure — a store that cannot
be created, a split another process is running, a path that is not a store — so the caller can
fall back to a MemorySaver without a try/catch of its own. Thread files are opened lazily.
Parameters
Section titled “Parameters”storePath
Section titled “storePath”string
options?
Section titled “options?”Returns
Section titled “Returns”GthSqliteSaver | null