From fd05009be24d6dbec0ede7f07f429ec0487b548b Mon Sep 17 00:00:00 2001 From: Casper Nielsen Date: Tue, 25 Nov 2025 13:17:06 +0100 Subject: [PATCH 1/3] feat: add dapr-ext-langgraph documentation Signed-off-by: Casper Nielsen --- .../python-sdk-extensions/python-langgraph.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md diff --git a/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md b/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md new file mode 100644 index 00000000000..22b49390ee7 --- /dev/null +++ b/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md @@ -0,0 +1,72 @@ +--- +type: docs +title: "Dapr Python SDK integration with LangGraph" +linkTitle: "LangGraph" +weight: 500000 +description: How to let Dapr handle LangGraph Checkpointer (Memory) +--- + +The Dapr Python SDK provides integration with LangGraph Checkpointer using the `dapr-ext-langgraph` extension. + +## Installation + +You can download and install the Dapr LangGraph extension with: + +{{< tabpane text=true >}} + +{{% tab header="Stable" %}} + +```bash +pip install dapr-ext-langgraph +``` + +{{% /tab %}} + +{{% tab header="Development" %}} +{{% alert title="Note" color="warning" %}} +The development package will contain features and behavior that will be compatible with the pre-release version of the Dapr runtime. Make sure to uninstall any stable versions of the Python SDK extension before installing the `dapr-dev` package. +{{% /alert %}} + +```bash +pip install dapr-ext-langgraph-dev +``` + +{{% /tab %}} + +{{< /tabpane >}} + +## Example + +### Setting DaprCheckPointer + +To let Dapr handle the checkpointer (memory in LangGraph) you only need to utilize the `DaprCheckpointer` as the checkpointer object when compiling the graph. Given the below Component for redis State Manager: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: statestore +spec: + type: state.redis + version: v1 + metadata: + - name: redisHost + value: localhost:6379 +``` + +You then pass the checkpointer just like any other checkpointer provider: + +```python +from langgraph.graph import StateGraph, MessageState +from dapr.ext.langgraph import DaprCheckpointer + +# Build the graph with nodes and edges +builder = StateGraph(MessagesState) + +memory = DaprCheckpointer(store_name='statestore', key_prefix='dapr') +graph = builder.compile(checkpointer=memory) +``` + +For a full working example refer to the [langgraph example](). + +For available State Managers refer to the [supported state stores](https://docs.dapr.io/reference/components-reference/supported-state-stores/). From 928f98654d7c391c2b796f9e29cc3e51b022e951 Mon Sep 17 00:00:00 2001 From: Casper Nielsen Date: Tue, 25 Nov 2025 13:27:46 +0100 Subject: [PATCH 2/3] fix: remove link to state stores Signed-off-by: Casper Nielsen --- .../python-sdk-docs/python-sdk-extensions/python-langgraph.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md b/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md index 22b49390ee7..5550178a6c5 100644 --- a/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md +++ b/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md @@ -68,5 +68,3 @@ graph = builder.compile(checkpointer=memory) ``` For a full working example refer to the [langgraph example](). - -For available State Managers refer to the [supported state stores](https://docs.dapr.io/reference/components-reference/supported-state-stores/). From 7fa62166c2a336ca7d11c88ad98cfdb9c2c7f1ca Mon Sep 17 00:00:00 2001 From: Casper Nielsen Date: Tue, 25 Nov 2025 14:26:41 +0100 Subject: [PATCH 3/3] fix: remove redundant header & wording correction Signed-off-by: Casper Nielsen --- .../python-sdk-docs/python-sdk-extensions/python-langgraph.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md b/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md index 5550178a6c5..05f6d03072c 100644 --- a/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md +++ b/sdkdocs/python/content/en/python-sdk-docs/python-sdk-extensions/python-langgraph.md @@ -37,8 +37,6 @@ pip install dapr-ext-langgraph-dev ## Example -### Setting DaprCheckPointer - To let Dapr handle the checkpointer (memory in LangGraph) you only need to utilize the `DaprCheckpointer` as the checkpointer object when compiling the graph. Given the below Component for redis State Manager: ```yaml @@ -67,4 +65,4 @@ memory = DaprCheckpointer(store_name='statestore', key_prefix='dapr') graph = builder.compile(checkpointer=memory) ``` -For a full working example refer to the [langgraph example](). +For a full example refer to the [langgraph example]().