Bumps the all-dependencies group in /libs/checkpoint with 2 updates: [langchain-core](https://github.com/langchain-ai/langchain) and [ruff](https://github.com/astral-sh/ruff). Updates `langchain-core` from 1.2.19 to 1.2.20 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/langchain-ai/langchain/releases">langchain-core's releases</a>.</em></p> <blockquote> <h2>langchain-core==1.2.20</h2> <p>Changes since langchain-core==1.2.19</p> <p>release(core): 1.2.20 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36085">#36085</a>) fix(core): trace invocation params in metadata (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36080">#36080</a>) feat: Add LangSmith integration metadata to create_agent and init_chat_model (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35810">#35810</a>) feat(core): harden anti-ssrf (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35960">#35960</a>) ci: avoid unnecessary dep installs in lint targets (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36046">#36046</a>) docs(core): document <code>base_url</code> in mermaid api (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35961">#35961</a>) chore: bump orjson from 3.11.5 to 3.11.6 in /libs/core (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35805">#35805</a>) chore: housekeeping (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35850">#35850</a>)</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/langchain-ai/langchain/commit/c4abc91ed96eaa27dc62676785b502982f02db6b"><code>c4abc91</code></a> release(core): 1.2.20 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36085">#36085</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/70c88c0e723a5d9477d13f4b6ba8893e40b76f50"><code>70c88c0</code></a> fix(core): trace invocation params in metadata (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36080">#36080</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/2319fdc9788e526103f079bde9acecfe4a6a3958"><code>2319fdc</code></a> feat: Add LangSmith integration metadata to create_agent and init_chat_model ...</li> <li><a href="https://github.com/langchain-ai/langchain/commit/dd136337d78e9375ecc95fe29c69e93689c9b39c"><code>dd13633</code></a> feat(core): harden anti-ssrf (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35960">#35960</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/cf1f510d7742e68be1718a4034225eeb14da171b"><code>cf1f510</code></a> fix(infra): resolve module crash blocking external PR enforcement (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36059">#36059</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/54a5f83f2eba06b9ef30170a98236723f05df3a0"><code>54a5f83</code></a> ci(infra): drop redundant opened trigger from issue-link check (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36054">#36054</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/a81203bf6a08ae65b7ed3832448558570e2208f9"><code>a81203b</code></a> ci: decouple codspeed from ci gate (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36051">#36051</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/67f5e317d3887d9c713929ade619ab50e5556072"><code>67f5e31</code></a> chore(text-splitters): speed up ci (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36050">#36050</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/b7e0b41d3af76e79a91ec0f9b9aee92fb8a98df0"><code>b7e0b41</code></a> ci: use codspeed <code>walltime</code> mode for slow partners (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36049">#36049</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/2476f558ad00f569680f25f18e57140d024db951"><code>2476f55</code></a> ci: replace deprecated codspeed <code>instrumentation</code> mode with <code>simulation</code> (<a href="https://redirect.github.com/langchain-ai/langchain/issues/36">#36</a>...</li> <li>Additional commits viewable in <a href="https://github.com/langchain-ai/langchain/compare/langchain-core==1.2.19...langchain-core==1.2.20">compare view</a></li> </ul> </details> <br /> Updates `ruff` from 0.15.6 to 0.15.7 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>0.15.7</h2> <h2>Release Notes</h2> <p>Released on 2026-03-19.</p> <h3>Preview features</h3> <ul> <li>Display output severity in preview (<a href="https://redirect.github.com/astral-sh/ruff/pull/23845">#23845</a>)</li> <li>Don't show <code>noqa</code> hover for non-Python documents (<a href="https://redirect.github.com/astral-sh/ruff/pull/24040">#24040</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>pycodestyle</code>] Recognize <code>pyrefly:</code> as a pragma comment (<code>E501</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/24019">#24019</a>)</li> </ul> <h3>Server</h3> <ul> <li>Don't return code actions for non-Python documents (<a href="https://redirect.github.com/astral-sh/ruff/pull/23905">#23905</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Add company AI policy to contributing guide (<a href="https://redirect.github.com/astral-sh/ruff/pull/24021">#24021</a>)</li> <li>Document editor features for Markdown code formatting (<a href="https://redirect.github.com/astral-sh/ruff/pull/23924">#23924</a>)</li> <li>[<code>pylint</code>] Improve phrasing (<code>PLC0208</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/24033">#24033</a>)</li> </ul> <h3>Other changes</h3> <ul> <li>Use PEP 639 license information (<a href="https://redirect.github.com/astral-sh/ruff/pull/19661">#19661</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/tmimmanuel"><code>@tmimmanuel</code></a></li> <li><a href="https://github.com/DimitriPapadopoulos"><code>@DimitriPapadopoulos</code></a></li> <li><a href="https://github.com/amyreese"><code>@amyreese</code></a></li> <li><a href="https://github.com/statxc"><code>@statxc</code></a></li> <li><a href="https://github.com/dylwil3"><code>@dylwil3</code></a></li> <li><a href="https://github.com/hunterhogan"><code>@hunterhogan</code></a></li> <li><a href="https://github.com/renovate"><code>@renovate</code></a></li> </ul> <h2>Install ruff 0.15.7</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.15.7/ruff-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.15.7/ruff-installer.ps1 | iex" </tr></table> </code></pre> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.15.7</h2> <p>Released on 2026-03-19.</p> <h3>Preview features</h3> <ul> <li>Display output severity in preview (<a href="https://redirect.github.com/astral-sh/ruff/pull/23845">#23845</a>)</li> <li>Don't show <code>noqa</code> hover for non-Python documents (<a href="https://redirect.github.com/astral-sh/ruff/pull/24040">#24040</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>pycodestyle</code>] Recognize <code>pyrefly:</code> as a pragma comment (<code>E501</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/24019">#24019</a>)</li> </ul> <h3>Server</h3> <ul> <li>Don't return code actions for non-Python documents (<a href="https://redirect.github.com/astral-sh/ruff/pull/23905">#23905</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Add company AI policy to contributing guide (<a href="https://redirect.github.com/astral-sh/ruff/pull/24021">#24021</a>)</li> <li>Document editor features for Markdown code formatting (<a href="https://redirect.github.com/astral-sh/ruff/pull/23924">#23924</a>)</li> <li>[<code>pylint</code>] Improve phrasing (<code>PLC0208</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/24033">#24033</a>)</li> </ul> <h3>Other changes</h3> <ul> <li>Use PEP 639 license information (<a href="https://redirect.github.com/astral-sh/ruff/pull/19661">#19661</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/tmimmanuel"><code>@tmimmanuel</code></a></li> <li><a href="https://github.com/DimitriPapadopoulos"><code>@DimitriPapadopoulos</code></a></li> <li><a href="https://github.com/amyreese"><code>@amyreese</code></a></li> <li><a href="https://github.com/statxc"><code>@statxc</code></a></li> <li><a href="https://github.com/dylwil3"><code>@dylwil3</code></a></li> <li><a href="https://github.com/hunterhogan"><code>@hunterhogan</code></a></li> <li><a href="https://github.com/renovate"><code>@renovate</code></a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/0ef39de46c006994fb1e90f7bd4ba09c0b2c1f79"><code>0ef39de</code></a> Bump 0.15.7 (<a href="https://redirect.github.com/astral-sh/ruff/issues/24049">#24049</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/beb543b5c666be9fd3f13c88df818f202b63e9d0"><code>beb543b</code></a> [ty] ecosystem-analyzer: Fail on newly panicking projects (<a href="https://redirect.github.com/astral-sh/ruff/issues/24043">#24043</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/378fe730929ccd67a7f2426b3012093da814b31d"><code>378fe73</code></a> Don't show noqa hover for non-Python documents (<a href="https://redirect.github.com/astral-sh/ruff/issues/24040">#24040</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/b5665bd18eecab4d3b5ab1256b36904cd99a4c57"><code>b5665bd</code></a> [<code>pylint</code>] Improve phrasing (<code>PLC0208</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/24033">#24033</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/6e20f2219020e61eeae29458013d2d3684f75a79"><code>6e20f22</code></a> test: migrate <code>show_settings</code> and <code>version</code> tests to use <code>CliTest</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/23702">#23702</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/f99b284c1fe1399a82da7f6669467488017d44a7"><code>f99b284</code></a> Drain file watcher events during test setup (<a href="https://redirect.github.com/astral-sh/ruff/issues/24030">#24030</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/744c996c35016a8c0e05aa2823f4f822ac7b842c"><code>744c996</code></a> [ty] Filter out unsatisfiable inference attempts during generic call narrowin...</li> <li><a href="https://github.com/astral-sh/ruff/commit/16160958bdafb6106b6fffc72ffe2e4db0c0ac33"><code>1616095</code></a> [ty] Avoid inferring intersection types for call arguments (<a href="https://redirect.github.com/astral-sh/ruff/issues/23933">#23933</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/7f275f431bf8c60d59601b74d441e9f4bef89f35"><code>7f275f4</code></a> [ty] Pin mypy_primer in <code>setup_primer_project.py</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/24020">#24020</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/7255e362e4b171a641222279cd28d2ca88a74fdc"><code>7255e36</code></a> [<code>pycodestyle</code>] Recognize <code>pyrefly:</code> as a pragma comment (<code>E501</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/24019">#24019</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/0.15.6...0.15.7">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
LangGraph Checkpoint
This library defines the base interface for LangGraph checkpointers. Checkpointers provide a persistence layer for LangGraph. They allow you to interact with and manage the graph's state. When you use a graph with a checkpointer, the checkpointer saves a checkpoint of the graph state at every superstep, enabling several powerful capabilities like human-in-the-loop, "memory" between interactions and more.
Key concepts
Checkpoint
Checkpoint is a snapshot of the graph state at a given point in time. Checkpoint tuple refers to an object containing checkpoint and the associated config, metadata and pending writes.
Thread
Threads enable the checkpointing of multiple different runs, making them essential for multi-tenant chat applications and other scenarios where maintaining separate states is necessary. A thread is a unique ID assigned to a series of checkpoints saved by a checkpointer. When using a checkpointer, you must specify a thread_id and optionally checkpoint_id when running the graph.
thread_idis simply the ID of a thread. This is always required.checkpoint_idcan optionally be passed. This identifier refers to a specific checkpoint within a thread. This can be used to kick off a run of a graph from some point halfway through a thread.
You must pass these when invoking the graph as part of the configurable part of the config, e.g.
{"configurable": {"thread_id": "1"}} # valid config
{"configurable": {"thread_id": "1", "checkpoint_id": "0c62ca34-ac19-445d-bbb0-5b4984975b2a"}} # also valid config
Serde
langgraph_checkpoint also defines protocol for serialization/deserialization (serde) and provides an default implementation (langgraph.checkpoint.serde.jsonplus.JsonPlusSerializer) that handles a wide variety of types, including LangChain and LangGraph primitives, datetimes, enums and more.
Pending writes
When a graph node fails mid-execution at a given superstep, LangGraph stores pending checkpoint writes from any other nodes that completed successfully at that superstep, so that whenever we resume graph execution from that superstep we don't re-run the successful nodes.
Interface
Each checkpointer should conform to langgraph.checkpoint.base.BaseCheckpointSaver interface and must implement the following methods:
.put- Store a checkpoint with its configuration and metadata..put_writes- Store intermediate writes linked to a checkpoint (i.e. pending writes)..get_tuple- Fetch a checkpoint tuple using for a given configuration (thread_idandcheckpoint_id)..list- List checkpoints that match a given configuration and filter criteria..delete_thread()- Delete all checkpoints and writes associated with a thread..get_next_version()- Generate the next version ID for a channel.
If the checkpointer will be used with asynchronous graph execution (i.e. executing the graph via .ainvoke, .astream, .abatch), checkpointer must implement asynchronous versions of the above methods (.aput, .aput_writes, .aget_tuple, .alist). Similarly, the checkpointer must implement .adelete_thread() if asynchronous thread cleanup is desired. The base class provides a default implementation of .get_next_version() that generates an integer sequence starting from 1, but this method should be overridden for custom versioning schemes.
Usage
from langgraph.checkpoint.memory import InMemorySaver
write_config = {"configurable": {"thread_id": "1", "checkpoint_ns": ""}}
read_config = {"configurable": {"thread_id": "1"}}
checkpointer = InMemorySaver()
checkpoint = {
"v": 4,
"ts": "2024-07-31T20:14:19.804150+00:00",
"id": "1ef4f797-8335-6428-8001-8a1503f9b875",
"channel_values": {
"my_key": "meow",
"node": "node"
},
"channel_versions": {
"__start__": 2,
"my_key": 3,
"start:node": 3,
"node": 3
},
"versions_seen": {
"__input__": {},
"__start__": {
"__start__": 1
},
"node": {
"start:node": 2
}
},
}
# store checkpoint
checkpointer.put(write_config, checkpoint, {}, {})
# load checkpoint
checkpointer.get(read_config)
# list checkpoints
list(checkpointer.list(read_config))