{ "cells": [ { "cell_type": "markdown", "id": "176e8dbb-1a0a-49ce-a10e-2417e8ea17a0", "metadata": {}, "source": [ "# How to add thread-level persistence to subgraphs" ] }, { "cell_type": "markdown", "id": "8c67581a-49fb-4597-a7fc-6774581c2160", "metadata": {}, "source": [ "
Prerequisites
\n", "\n", " This guide assumes familiarity with the following:\n", "
Set up LangSmith for LangGraph development
\n", "\n", " Sign up for LangSmith to quickly spot issues and improve the performance of your LangGraph projects. LangSmith lets you use trace data to debug, test, and monitor your LLM apps built with LangGraph — read more about how to get started here. \n", "
\n", "Note
\n", "\n",
" You shouldn't provide a checkpointer when compiling a subgraph. Instead, you must define a **single** checkpointer that you pass to parentGraph.compile()
, and LangGraph will automatically propagate the checkpointer to the child subgraphs. If you pass the checkpointer to the subgraph.compile()
, it will simply be ignored. This also applies when you add a node that invokes the subgraph explicitly.\n",
"