Compare commits

..
Author SHA1 Message Date
William Fu-Hinthorn 52910f3b04 InMemorySaver 2024-10-06 20:49:11 -07:00
William FHandGitHub 57727be9db Checkpoint 2.0.1 (#2018) 2024-10-06 14:10:48 -07:00
William FHandGitHub 05dbc1d498 Validate in async batched store (#2017) 2024-10-06 14:09:35 -07:00
b35fe5864d docs: update how-to for passing runtime values (#1984)
Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2024-10-05 01:23:55 +00:00
Andrew NguonlyandGitHub db3271ace5 docs: Update field descriptions for API spec (#2013) 2024-10-04 22:32:20 +00:00
bacf92c441 langgraph: add support for passing store via state_modifier (#1992)
Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2024-10-04 15:28:56 -07:00
Andrew NguonlyandGitHub c847f7df4e docs: Updates to API spec (#2012) 2024-10-04 22:12:13 +00:00
Vadym BardaandGitHub c2dc498b1c docs: clean up memory docs (#2000) 2024-10-04 16:58:22 -04:00
Andrew NguonlyandGitHub c2171f4a20 docs: Create API spec (#2009) 2024-10-04 20:40:01 +00:00
William FHandGitHub d8d4714a73 Update JS sdk version (#2008) 2024-10-04 11:04:10 -07:00
William FHandGitHub 018e9ac42e Check is string in store namespace validation (on put) (#2007) 2024-10-04 17:55:30 +00:00
Brace SproulandGitHub f9afd3c215 Merge pull request #1993 from langchain-ai/brace/after-seconds-js
fix(js): Add afterSeconds run arg
2024-10-03 11:18:02 -07:00
Eugene YurtsevandGitHub ac7903b3dc docs: how to guide batch 4 (#1991)
Updated the following guides:

docs/docs/how-tos/streaming-content.ipynb

docs/docs/how-tos/streaming-events-from-within-tools-without-langchain.ipynb
docs/docs/how-tos/streaming-events-from-within-tools.ipynb
docs/docs/how-tos/streaming-tokens-without-langchain.ipynb
2024-10-03 14:11:53 -04:00
Eugene YurtsevandGitHub 4a8510b690 docs: minor formatting change for how to docs 2024-10-03 13:47:59 -04:00
bracesproul 92e75aac17 cr 2024-10-03 09:40:37 -07:00
bracesproul 3e8be7fd79 fix(js): Add afterSeconds run arg 2024-10-03 09:40:10 -07:00
Vadym BardaandGitHub 99fd0eedbd docs: clean up and standardize more how-tos (#1959) 2024-10-03 13:40:34 +00:00
f55586ea23 [Docs] Drop memory doc (#1986)
---------

Co-authored-by: vbarda <vadym@langchain.dev>
2024-10-03 03:05:49 +00:00
Vadym BardaandGitHub 055b2ae74f ci: filter to added/modified for notebooks (#1987) 2024-10-03 02:27:57 +00:00
Isaac FranciscoandGitHub c39e08ec8e export checkpoint type from js-sdk (#1973) 2024-10-02 18:47:34 -07:00
William FHandGitHub c74aba8cc5 [Docs] Storage ref docs (#1985) 2024-10-02 16:53:39 -07:00
Eugene YurtsevandGitHub d683630094 docs: how-to fix some issues (#1983)
Fixes some issues introduced while updating how-to docs
2024-10-02 22:06:03 +00:00
104 changed files with 3760 additions and 2848 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
get-changed-files:
runs-on: ubuntu-latest
outputs:
changed-files: ${{ steps.changed-files.outputs.all }}
changed-files: ${{ steps.changed-files.outputs.added_modified }}
steps:
- uses: actions/checkout@v4
- name: Get changed files
+3 -3
View File
@@ -60,7 +60,7 @@ from typing import Annotated, Literal, TypedDict
from langchain_core.messages import HumanMessage
from langchain_anthropic import ChatAnthropic
from langchain_core.tools import tool
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.graph import END, START, StateGraph, MessagesState
from langgraph.prebuilt import ToolNode
@@ -125,7 +125,7 @@ workflow.add_conditional_edges(
workflow.add_edge("tools", 'agent')
# Initialize memory to persist state between graph runs
checkpointer = MemorySaver()
checkpointer = InMemorySaver()
# Finally, we compile it!
# This compiles it into a LangChain Runnable,
@@ -201,7 +201,7 @@ final_state["messages"][-1].content
<summary>Compile the graph.</summary>
- When we compile the graph, we turn it into a LangChain [Runnable](https://python.langchain.com/v0.2/docs/concepts/#runnable-interface), which automatically enables calling `.invoke()`, `.stream()` and `.batch()` with your inputs
- We can also optionally pass checkpointer object for persisting state between graph runs, and enabling memory, human-in-the-loop workflows, time travel and more. In our case we use `MemorySaver` - a simple in-memory checkpointer
- We can also optionally pass checkpointer object for persisting state between graph runs, and enabling memory, human-in-the-loop workflows, time travel and more. In our case we use `InMemorySaver` - a simple in-memory checkpointer
</details>
6. <details>
@@ -0,0 +1 @@
eNqFVG1sU1UYLkIIGkA0GkkY7Fid8Qenve1tR9uQYO0Ax6gbW0GKEXJ27rnttfeLe07HPiTKwKAjkVxJGCrG6LqWlA26AGrAKYmQGPWHhhgsBELUGP/4C6KJBua5XcsgW2Z/NPee9+t5n+c5t7/QRSyqGPqcEUVnxEKY8Rdq9xcssjNLKNuX1whLG1KurbUjMZS1lHJDmjGTRrxeZCoepLO0ZZgK9mBD83b5vBqhFKUIzXUaUk/5hz63hrp3MCNDdOqOAJ/gD6wE7loSP3m5z20ZKuFP7iwllptHscGR6Mw5ekF5ErQTjWidxIoArQfoSCNAoeB5o9O9+xWnlSER1UnFKspKBIowCKmh64RBPx8mNPoFpyftoYxoTl7SyAJkEYBAmqimnFUBolShjG8CGFIzip4CzAAsTYADyAM283+g6LLBi3cX0gRJnLGDubRBmT02jYOTCGNiMkh0bEi8lz2a6lXMlUAisooYKWIHW4Vku5ghxIRIVbpIfrLKLiHTVBWMnLj3Vb7HSJUMyHpMMj1cdCBCTqXO7M+iNRzeth4umQ4Ejxjw+EvdkG+n6ConHaqIQ8qblfi5ewMmwhneB1btYOcni0/cm2NQeziOcGvHfS2RhdP2MLK0xsCpe8+trM4UjdiFWNv0cdXg1DjR4/N5wmP3NaY9OraHZaRSMnaX5LslRa6vCIVGKPhO1FhSiZ5iaXvIL4SOWYSa3Mpkb563ZFnan+OKkO+/KVTd90lrS03N665Hc01cHXt8naWsBEIAtGIGHP8AXyjiD0cEP1gfT4zEqmMSM4oxlrCQTmUuyNqa+AWczuoZIhVjM8pedk+tZfH5qqIpDFZvHhfLebVzAUEQys/MmmkRjbPmTMyJ4XD4f/pyZgizTzv7QZ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YjYYiUT+Jy9jBlNn1u0P8hzkhNhCl3VCfxGsFrlwhst4ci4ehmjjGp5LeCreYE3v1fFwgf5CGTRUJedjtt7J8W1Iifa0b+sVd0vp7e2tAdqeDCvy+TQUNSMlQcruMQxLgkhTpwjiclyuY28wGBLCKBQOcjyW5XBIkgUUiGBhfEBFToH38SBhGAkNn4m2wCgSFQy7S7Jx8k197Y1tW6KTvbDLiBuMvxhiPBOD4Fw3tpgcnUKpNDvgFs6x8K7GPme2XpTCQTHIx+vrOSEYEWFzT9d0RUCLAsm6t0PpvnyNydRiW5euPnZovaf0rHvh8FPJz559YGT+4Nv/PCQVM39t7al5/7TAPz56iOgjEzuaLyQ2jNzed3QL+PbT8P1y04PXvrn+0ZMPX50jF38+4c/fuvGr9f0vP8798Vt6//Dgn0K+te74PfcNzwbXF8b6dw1HNzv96St6q3MDv3ryNHfsJ/zi1MEDZ/dHoXbprvnQ7bHqwcu/v5N+dNO9jxw4fLbl3Ngr36G9ezqPfVL9xCnu6VERq7v+rd568s0Pa9Lt+txRsvnW6Bs3pbe+eL332pfnhzfePHIid/1uj2d+fp3n76+rL1dVeTz/AbjckGA=
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
eNrtVnlwE9cZN5BylHFKw5EEEliUMKbglXd1WqZukC9ssJHxBQg7YrX7JC1e7a73sCUbwYTYMRBKWAihgXAbG4wxR8wZIDRcBh+QTGvCkQBJGww0QElIIIXQt7IM9pB00hn6R9vsjLR67/u9736ffrOqCoEg0hzbpYZmJSAQpAQX4sJZVQIokIEolVZ6geThqIp0W2bWWlmgT4/wSBIvxkRFETyt5XjAErSW5LxRhXgU6SGkKPibZ0BQTYWTo/xnupSXaLxAFAk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YXDVGKgDtj+rstZvlvol9Ijs4NKssqIp77tuw6FVioiLJWUnEUkN9BCsKzoaj2QYxhMNiJFovvhRvE+JYzhMh7bHNnWzZsrG5MxE/0iNU0kZImuUX4KRBmaHmchNpftdb7pSsUUeB2WiRCbCVat7iHo7JDWFcF41GY6FwJNygCK2bU4dmrV0n2RgfrN5T8OGJ8gj/1bxHVzz+xSrvW2B3Hze+IS25dGXpbW//5PlHvvClgdHVP11W/QS659LCXfdd/veTT5SO316sPdL3z78uSD029jW154xZHZ6h36r66tdnqj84semdydiOaytPnMqf/bT36n8+/u72N46V/vvJ0NHhof9d+bhgTD82erTprYu9f371g7Wtf/qFvXdb2897tk7+9px1qmc6t2f9p3/pC7wSvDi04+Syj3YfXf3shv7H9/+RmXfnFje1VVXRK8LyA7/cPLPrX2n3zlbtkdzI5wv7QqdHl33vjhbhwOuNe55MuAOXfv9+4OHTT/edXnBi4ZW944t+8OHK6NINX3kRPXp0+W27V74yM/4ds7pjVfvyh860f3n83hNXf/QHa9ddS3A1WfTMO8WnVoaO7Hw3NH+xdOflqwc2fRgk773pNv1N34t27HlrUVpFb/4mU2iaPzT10eJrt2dTF9ZebPts+YFlv5s4u/O5hhWXRp9ZkSCvXr7jjc+eGzi79/ySf/y9+sJusatYePpn2befbSvse5eev++bF34cX5PYJjd9vqCq6tq1BVXzTp5+351fVfV/OX+JnA==
@@ -392,7 +392,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langgraph.checkpoint.memory import MemorySaver"
"from langgraph.checkpoint.memory import InMemorySaver"
]
},
{
@@ -402,7 +402,7 @@
"metadata": {},
"outputs": [],
"source": [
"checkpointer = MemorySaver()\n",
"checkpointer = InMemorySaver()\n",
"graph_with_memory = create_react_agent(model, tools, checkpointer=checkpointer)"
]
},
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,19 @@
<!doctype html>
<html>
<head>
<title>Open Assistants API Specification</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1" />
</head>
<body>
<script id="api-reference" data-url="./open_agent_api.json"></script>
<script>
var configuration = {}
document.getElementById('api-reference').dataset.configuration =
JSON.stringify(configuration)
</script>
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
</body>
</html>
+1 -1
View File
@@ -148,7 +148,7 @@ LangGraph's [persistence layer](https://langchain-ai.github.io/langgraph/concept
```python
# Compile the graph with a checkpointer
checkpointer = MemorySaver()
checkpointer = InMemorySaver()
graph = workflow.compile(checkpointer=checkpointer)
# Invoke the graph with a thread ID
+4 -4
View File
@@ -26,7 +26,7 @@ Let's see what checkpoints are saved when a simple graph is invoked as follows:
```python
from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
from typing import Annotated
from typing_extensions import TypedDict
from operator import add
@@ -49,7 +49,7 @@ workflow.add_edge(START, "node_a")
workflow.add_edge("node_a", "node_b")
workflow.add_edge("node_b", END)
checkpointer = MemorySaver()
checkpointer = InMemorySaver()
graph = workflow.compile(checkpointer=checkpointer)
config = {"configurable": {"thread_id": "1"}}
@@ -220,7 +220,7 @@ The final thing you can optionally specify when calling `update_state` is `as_no
Under the hood, checkpointing is powered by checkpointer objects that conform to [BaseCheckpointSaver][langgraph.checkpoint.base.BaseCheckpointSaver] interface. LangGraph provides several checkpointer implementations, all implemented via standalone, installable libraries:
* `langgraph-checkpoint`: The base interface for checkpointer savers ([BaseCheckpointSaver][langgraph.checkpoint.base.BaseCheckpointSaver]) and serialization/deserialization interface ([SerializerProtocol][langgraph.checkpoint.serde.base.SerializerProtocol]). Includes in-memory checkpointer implementation ([MemorySaver][langgraph.checkpoint.memory.MemorySaver]) for experimentation. LangGraph comes with `langgraph-checkpoint` included.
* `langgraph-checkpoint`: The base interface for checkpointer savers ([BaseCheckpointSaver][langgraph.checkpoint.base.BaseCheckpointSaver]) and serialization/deserialization interface ([SerializerProtocol][langgraph.checkpoint.serde.base.SerializerProtocol]). Includes in-memory checkpointer implementation ([InMemorySaver][langgraph.checkpoint.memory.InMemorySaver]) for experimentation. LangGraph comes with `langgraph-checkpoint` included.
* `langgraph-checkpoint-sqlite`: An implementation of LangGraph checkpointer that uses SQLite database ([SqliteSaver][langgraph.checkpoint.sqlite.SqliteSaver] / [AsyncSqliteSaver][langgraph.checkpoint.sqlite.aio.AsyncSqliteSaver]). Ideal for experimentation and local workflows. Needs to be installed separately.
* `langgraph-checkpoint-postgres`: An advanced checkpointer that uses Postgres database ([PostgresSaver][langgraph.checkpoint.postgres.PostgresSaver] / [AsyncPostgresSaver][langgraph.checkpoint.postgres.aio.AsyncPostgresSaver]), used in LangGraph Cloud. Ideal for using in production. Needs to be installed separately.
@@ -236,7 +236,7 @@ Each checkpointer conforms to [BaseCheckpointSaver][langgraph.checkpoint.base.Ba
If the checkpointer is used with asynchronous graph execution (i.e. executing the graph via `.ainvoke`, `.astream`, `.abatch`), asynchronous versions of the above methods will be used (`.aput`, `.aput_writes`, `.aget_tuple`, `.alist`).
!!! note Note
For running your graph asynchronously, you can use `MemorySaver`, or async versions of Sqlite/Postgres checkpointers -- `AsyncSqliteSaver` / `AsyncPostgresSaver` checkpointers.
For running your graph asynchronously, you can use `InMemorySaver`, or async versions of Sqlite/Postgres checkpointers -- `AsyncSqliteSaver` / `AsyncPostgresSaver` checkpointers.
### Serializer
+2 -2
View File
@@ -18,8 +18,8 @@
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/high_level/\">\n",
" LangGraph Concepts\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/\">\n",
" LangGraph Glossary\n",
" </a>\n",
" </li>\n",
" <li>\n",
+12 -3
View File
@@ -18,15 +18,24 @@
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/high_level/\">\n",
" LangGraph Concepts\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/#nodes\">\n",
" Node\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/#edges\">\n",
" Edge\n",
" </a>\n",
" </li> \n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/#reducers\">\n",
" Reducer\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"\n",
"Parallel execution of nodes is essential to speed up overall graph operation. LangGraph offers native support for parallel execution of nodes, which can significantly enhance the performance of graph-based workflows. This parallelization is achieved through fan-out and fan-in mechanisms, utilizing both standard edges and [conditional_edges](https://langchain-ai.github.io/langgraph/reference/graphs/#langgraph.graph.MessageGraph.add_conditional_edges). Below are some examples showing how to add create branching dataflows that work for you. \n",
"\n",
"![Screenshot 2024-07-09 at 2.55.56 PM.png](attachment:51f122de-b2ce-4c21-a5a7-c3be70c28a91.png)"
@@ -135,9 +135,9 @@
"tools = [get_weather]\n",
"\n",
"# We need a checkpointer to enable human-in-the-loop patterns\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Define the graph\n",
"\n",
@@ -142,9 +142,9 @@
"\n",
"# We can add \"chat memory\" to the graph with LangGraph's checkpointer\n",
"# to retain the chat context between interactions\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Define the graph\n",
"\n",
@@ -0,0 +1,358 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "d2eecb96-cf0e-47ed-8116-88a7eaa4236d",
"metadata": {},
"source": [
"# How to add cross-thread persistence to your graph\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/persistence/\">\n",
" Persistence\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/memory/\">\n",
" Memory\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models/\">\n",
" Chat Models\n",
" </a>\n",
" </li> \n",
" </ul>\n",
" </p>\n",
"</div>\n",
"\n",
"In the [previous guide](https://langchain-ai.github.io/langgraph/how-tos/persistence/) you learned how to persist graph state across multiple interactions on a single [thread](). LangGraph also allows you to persist data across **multiple threads**. For instance, you can store information about users (their names or preferences) in a shared memory and reuse them in the new conversational threads.\n",
"\n",
"In this guide, we will show how to construct and use a graph that has a shared memory implemented using the [Store](https://langchain-ai.github.io/langgraph/reference/store/#langgraph.store.base.BaseStore) interface.\n",
"\n",
"<div class=\"admonition note\">\n",
" <p class=\"admonition-title\">Note</p>\n",
" <p>\n",
" Support for the <code><a href=\"https://langchain-ai.github.io/langgraph/reference/store/#langgraph.store.base.BaseStore\">Store</a></code> API that is used in this guide was added in LangGraph <code>v0.2.32</code>.\n",
" </p>\n",
"</div>\n",
"\n",
"## Setup\n",
"\n",
"First, let's install the required packages and set our API keys"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "3457aadf",
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"%pip install -U langchain_openai langgraph"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "aa2c64a7",
"metadata": {},
"outputs": [
{
"name": "stdin",
"output_type": "stream",
"text": [
"ANTHROPIC_API_KEY: ········\n"
]
}
],
"source": [
"import getpass\n",
"import os\n",
"\n",
"\n",
"def _set_env(var: str):\n",
" if not os.environ.get(var):\n",
" os.environ[var] = getpass.getpass(f\"{var}: \")\n",
"\n",
"\n",
"_set_env(\"ANTHROPIC_API_KEY\")"
]
},
{
"cell_type": "markdown",
"id": "51b6817d",
"metadata": {},
"source": [
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Set up <a href=\"https://smith.langchain.com\">LangSmith</a> for LangGraph development</p>\n",
" <p style=\"padding-top: 5px;\">\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 <a href=\"https://docs.smith.langchain.com\">here</a>. \n",
" </p>\n",
"</div> "
]
},
{
"cell_type": "markdown",
"id": "c4c550b5-1954-496b-8b9d-800361af17dc",
"metadata": {},
"source": [
"## Define store\n",
"\n",
"In this example we will create a graph that will be able to retrieve information about a user's preferences. We will do so by defining an `InMemoryStore` - an object that can store data in memory and query that data. We will then pass the store object when compiling the graph. This allows each node in the graph to access the store: when you define node functions, you can define `store` keyword argument, and LangGraph will automatically pass the store object you compiled the graph with.\n",
"\n",
"When storing objects using the `Store` interface you define two things:\n",
"\n",
"* the namespace for the object, a tuple (similar to directories)\n",
"* the object key (similar to filenames)\n",
"\n",
"In our example, we'll be using `(\"memories\", <user_id>)` as namespace and random UUID as key for each new memory.\n",
"\n",
"Importantly, to determine the user, we will be passing `user_id` via the config keyword argument of the node function.\n",
"\n",
"Let's first define an `InMemoryStore` which is already populated with some memories about the users."
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "a7f303d6-612e-4e34-bf36-29d4ed25d802",
"metadata": {},
"outputs": [],
"source": [
"from langgraph.store.memory import InMemoryStore\n",
"\n",
"in_memory_store = InMemoryStore()"
]
},
{
"cell_type": "markdown",
"id": "3389c9f4-226d-40c7-8bfc-ee8aac24f79d",
"metadata": {},
"source": [
"## Create graph"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "2a30a362-528c-45ee-9df6-630d2d843588",
"metadata": {},
"outputs": [],
"source": [
"import uuid\n",
"from typing import Annotated\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langchain_anthropic import ChatAnthropic\n",
"from langchain_core.runnables import RunnableConfig\n",
"from langgraph.graph import StateGraph, MessagesState, START\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.store.base import BaseStore\n",
"\n",
"\n",
"model = ChatAnthropic(model=\"claude-3-5-sonnet-20240620\")\n",
"\n",
"\n",
"# NOTE: we're passing the Store param to the node --\n",
"# this is the Store we compile the graph with\n",
"def call_model(state: MessagesState, config: RunnableConfig, *, store: BaseStore):\n",
" user_id = config[\"configurable\"][\"user_id\"]\n",
" namespace = (\"memories\", user_id)\n",
" memories = store.search(namespace)\n",
" info = \"\\n\".join([d.value[\"data\"] for d in memories])\n",
" system_msg = f\"You are a helpful assistant talking to the user. User info: {info}\"\n",
"\n",
" # Store new memories if the user asks the model to remember\n",
" last_message = state[\"messages\"][-1]\n",
" if \"remember\" in last_message.content.lower():\n",
" memory = \"User name is Bob\"\n",
" store.put(namespace, str(uuid.uuid4()), {\"data\": memory})\n",
"\n",
" response = model.invoke(\n",
" [{\"type\": \"system\", \"content\": system_msg}] + state[\"messages\"]\n",
" )\n",
" return {\"messages\": response}\n",
"\n",
"\n",
"builder = StateGraph(MessagesState)\n",
"builder.add_node(\"call_model\", call_model)\n",
"builder.add_edge(START, \"call_model\")\n",
"\n",
"# NOTE: we're passing the store object here when compiling the graph\n",
"graph = builder.compile(checkpointer=InMemorySaver(), store=in_memory_store)\n",
"# If you're using LangGraph Cloud or LangGraph Studio, you don't need to pass the store or checkpointer when compiling the graph, since it's done automatically."
]
},
{
"cell_type": "markdown",
"id": "f22a4a18-67e4-4f0b-b655-a29bbe202e1c",
"metadata": {},
"source": [
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Note</p>\n",
" <p>\n",
" If you're using LangGraph Cloud or LangGraph Studio, you <strong>don't need</strong> to pass store when compiling the graph, since it's done automatically.\n",
" </p>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "552d4e33-556d-4fa5-8094-2a076bc21529",
"metadata": {},
"source": [
"## Run the graph!"
]
},
{
"cell_type": "markdown",
"id": "1842c626-6cd9-4f58-b549-58978e478098",
"metadata": {},
"source": [
"Now let's specify a user ID in the config and tell the model our name:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "c871a073-a466-46ad-aafe-2b870831057e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"================================\u001b[1m Human Message \u001b[0m=================================\n",
"\n",
"Hi! Remember: my name is Bob\n",
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
"\n",
"Hello Bob! It's nice to meet you. I'll remember that your name is Bob. How can I assist you today?\n"
]
}
],
"source": [
"config = {\"configurable\": {\"thread_id\": \"1\", \"user_id\": \"1\"}}\n",
"input_message = {\"type\": \"user\", \"content\": \"Hi! Remember: my name is Bob\"}\n",
"for chunk in graph.stream({\"messages\": [input_message]}, config, stream_mode=\"values\"):\n",
" chunk[\"messages\"][-1].pretty_print()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "d862be40-1f8a-4057-81c4-b7bf073dc4c1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"================================\u001b[1m Human Message \u001b[0m=================================\n",
"\n",
"what is my name?\n",
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
"\n",
"Your name is Bob.\n"
]
}
],
"source": [
"config = {\"configurable\": {\"thread_id\": \"2\", \"user_id\": \"1\"}}\n",
"input_message = {\"type\": \"user\", \"content\": \"what is my name?\"}\n",
"for chunk in graph.stream({\"messages\": [input_message]}, config, stream_mode=\"values\"):\n",
" chunk[\"messages\"][-1].pretty_print()"
]
},
{
"cell_type": "markdown",
"id": "80fd01ec-f135-4811-8743-daff8daea422",
"metadata": {},
"source": [
"We can now inspect our in-memory store and verify that we have in fact saved the memories for the user:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "76cde493-89cf-4709-a339-207d2b7e9ea7",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'data': 'User name is Bob'}\n"
]
}
],
"source": [
"for memory in in_memory_store.search((\"memories\", \"1\")):\n",
" print(memory.value)"
]
},
{
"cell_type": "markdown",
"id": "23f5d7eb-af23-4131-b8fd-2a69e74e6e55",
"metadata": {},
"source": [
"Let's now run the graph for another user to verify that the memories about the first user are self contained:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "d362350b-d730-48bd-9652-983812fd7811",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"================================\u001b[1m Human Message \u001b[0m=================================\n",
"\n",
"what is my name?\n",
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
"\n",
"I apologize, but I don't have any information about your name. As an AI assistant, I don't have access to personal information about users unless it has been specifically shared in our conversation. If you'd like, you can tell me your name and I'll be happy to use it in our discussion.\n"
]
}
],
"source": [
"config = {\"configurable\": {\"thread_id\": \"3\", \"user_id\": \"2\"}}\n",
"input_message = {\"type\": \"user\", \"content\": \"what is my name?\"}\n",
"for chunk in graph.stream({\"messages\": [input_message]}, config, stream_mode=\"values\"):\n",
" chunk[\"messages\"][-1].pretty_print()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -124,7 +124,7 @@
"source": [
"from typing_extensions import TypedDict\n",
"from langgraph.graph import StateGraph, START, END\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from IPython.display import Image, display\n",
"\n",
"\n",
@@ -157,7 +157,7 @@
"builder.add_edge(\"step_3\", END)\n",
"\n",
"# Set up memory\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Add\n",
"graph = builder.compile(checkpointer=memory, interrupt_before=[\"step_3\"])\n",
@@ -270,7 +270,7 @@
"from langgraph.graph import MessagesState, START\n",
"from langgraph.prebuilt import ToolNode\n",
"from langgraph.graph import END, StateGraph\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"\n",
"@tool\n",
@@ -352,7 +352,7 @@
"workflow.add_edge(\"action\", \"agent\")\n",
"\n",
"# Set up memory\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Finally, we compile it!\n",
"# This compiles it into a LangChain Runnable,\n",
@@ -78,7 +78,7 @@
"from IPython.display import Image, display\n",
"\n",
"from langgraph.graph import StateGraph, START, END\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.errors import NodeInterrupt\n",
"\n",
"\n",
@@ -118,7 +118,7 @@
"builder.add_edge(\"step_3\", END)\n",
"\n",
"# Set up memory\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Compile the graph with memory\n",
"graph = builder.compile(checkpointer=memory)\n",
@@ -126,7 +126,7 @@
"source": [
"from typing_extensions import TypedDict\n",
"from langgraph.graph import StateGraph, START, END\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from IPython.display import Image, display\n",
"\n",
"\n",
@@ -159,7 +159,7 @@
"builder.add_edge(\"step_3\", END)\n",
"\n",
"# Set up memory\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Add\n",
"graph = builder.compile(checkpointer=memory, interrupt_before=[\"step_2\"])\n",
@@ -279,7 +279,7 @@
"from langchain_core.tools import tool\n",
"from langgraph.graph import MessagesState, START, END, StateGraph\n",
"from langgraph.prebuilt import ToolNode\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"\n",
"@tool\n",
@@ -361,7 +361,7 @@
"workflow.add_edge(\"action\", \"agent\")\n",
"\n",
"# Set up memory\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Finally, we compile it!\n",
"# This compiles it into a LangChain Runnable,\n",
@@ -120,7 +120,7 @@
"source": [
"from typing_extensions import TypedDict, Literal\n",
"from langgraph.graph import StateGraph, START, END, MessagesState\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langchain_anthropic import ChatAnthropic\n",
"from langchain_core.tools import tool\n",
"from langchain_core.messages import AIMessage\n",
@@ -195,7 +195,7 @@
"builder.add_edge(\"run_tool\", \"call_llm\")\n",
"\n",
"# Set up memory\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Add\n",
"graph = builder.compile(checkpointer=memory, interrupt_before=[\"human_review_node\"])\n",
@@ -115,7 +115,7 @@
"from langgraph.graph import MessagesState, START\n",
"from langgraph.prebuilt import ToolNode\n",
"from langgraph.graph import END, StateGraph\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"\n",
"@tool\n",
@@ -201,7 +201,7 @@
"workflow.add_edge(\"action\", \"agent\")\n",
"\n",
"# Set up memory\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Finally, we compile it!\n",
"# This compiles it into a LangChain Runnable,\n",
@@ -120,7 +120,7 @@
"source": [
"from typing_extensions import TypedDict\n",
"from langgraph.graph import StateGraph, START, END\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from IPython.display import Image, display\n",
"\n",
"\n",
@@ -154,7 +154,7 @@
"builder.add_edge(\"step_3\", END)\n",
"\n",
"# Set up memory\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Add\n",
"graph = builder.compile(checkpointer=memory, interrupt_before=[\"human_feedback\"])\n",
@@ -475,9 +475,9 @@
"workflow.add_edge(\"ask_human\", \"agent\")\n",
"\n",
"# Set up memory\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"# Finally, we compile it!\n",
"# This compiles it into a LangChain Runnable,\n",
+12 -7
View File
@@ -18,17 +18,22 @@ These how-to guides show how to achieve that controllability.
## Persistence
LangGraph makes it easy to persist state across graph runs. The guide below shows how to add persistence to your graph.
LangGraph makes it easy to persist state across graph runs (thread-level persistence) and across threads (cross-thread persistence). These how-to guides show how to add persistence to your graph.
- [How to add persistence ("memory") to your graph](persistence.ipynb)
- [How to manage conversation history](memory/manage-conversation-history.ipynb)
- [How to delete messages](memory/delete-messages.ipynb)
- [How to add summary conversation memory](memory/add-summary-conversation-history.ipynb)
- [How to share state between threads](memory/shared-state.ipynb)
- [How to add thread-level persistence to your graph](persistence.ipynb)
- [How to add cross-thread persistence to your graph](cross-thread-persistence.ipynb)
- [How to use Postgres checkpointer for persistence](persistence_postgres.ipynb)
- [How to create a custom checkpointer using MongoDB](persistence_mongodb.ipynb)
- [How to create a custom checkpointer using Redis](persistence_redis.ipynb)
## Memory
LangGraph makes it easy to manage conversation [memory](../concepts/memory.md) in your graph. These how-to guides show how to implement different strategies for that.
- [How to manage conversation history](memory/manage-conversation-history.ipynb)
- [How to delete messages](memory/delete-messages.ipynb)
- [How to add summary conversation memory](memory/add-summary-conversation-history.ipynb)
## Human in the Loop
One of LangGraph's main benefits is that it makes human-in-the-loop workflows easy.
@@ -62,7 +67,7 @@ These guides show how to use different streaming modes.
- [How to call tools using ToolNode](tool-calling.ipynb)
- [How to handle tool calling errors](tool-calling-errors.ipynb)
- [How to pass graph state to tools](pass-run-time-values-to-tools.ipynb)
- [How to pass runtime values to tools](pass-run-time-values-to-tools.ipynb)
- [How to pass config to tools](pass-config-to-tools.ipynb)
- [How to handle large numbers of tools](many-tools.ipynb)
@@ -99,10 +99,10 @@
"\n",
"from langchain_anthropic import ChatAnthropic\n",
"from langchain_core.messages import SystemMessage, RemoveMessage\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import MessagesState, StateGraph, START, END\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"\n",
"# We will add a `summary` attribute (in addition to `messages` key,\n",
@@ -106,11 +106,11 @@
"from langchain_anthropic import ChatAnthropic\n",
"from langchain_core.tools import tool\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import MessagesState, StateGraph, START, END\n",
"from langgraph.prebuilt import ToolNode\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"\n",
"@tool\n",
@@ -97,11 +97,11 @@
"from langchain_anthropic import ChatAnthropic\n",
"from langchain_core.tools import tool\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import MessagesState, StateGraph, START, END\n",
"from langgraph.prebuilt import ToolNode\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"\n",
"@tool\n",
@@ -228,11 +228,11 @@
"from langchain_anthropic import ChatAnthropic\n",
"from langchain_core.tools import tool\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import MessagesState, StateGraph, START\n",
"from langgraph.prebuilt import ToolNode\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"\n",
"@tool\n",
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -151,14 +151,6 @@
"print()\n",
"print(f\"Output of graph invocation: {response}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4ce80b5c-73cc-4f78-9d14-26c4ba46f478",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
File diff suppressed because one or more lines are too long
+10 -3
View File
@@ -30,10 +30,17 @@
"\n",
"This reference implementation shows how to use MongoDB as the backend for persisting checkpoint state. Make sure that you have MongoDB running on port `27017` for going through this guide.\n",
"\n",
"NOTE: this is just an reference implementation. You can implement your own checkpointer using a different database or modify this one as long as it conforms to the `BaseCheckpointSaver` interface.\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Note</p>\n",
" <p>\n",
" This is a **reference** implementation. You can implement your own checkpointer using a different database or modify this one as long as it conforms to the <a href=\"https://langchain-ai.github.io/langgraph/reference/checkpoints/#langgraph.checkpoint.base.BaseCheckpointSaver\">BaseCheckpointSaver</a> interface.\n",
" </p>\n",
"</div>\n",
"\n",
"For demonstration purposes we add persistence to the [pre-built create react agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent).\n",
"\n",
"In general, you can add a checkpointer to any custom graph that you build like this:\n",
"\n",
"For demonstration purposes we add persistence to the [pre-built create react agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent), but you can add a checkpointer to any custom graph that you build.\n",
" \n",
"```python\n",
"from langgraph.graph import StateGraph\n",
"\n",
+3 -1
View File
@@ -30,7 +30,9 @@
"\n",
"This how-to guide shows how to use `Postgres` as the backend for persisting checkpoint state using the [`langgraph-checkpoint-postgres`](https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-postgres) library.\n",
"\n",
"For demonstration purposes we add persistence to the [pre-built create react agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent), but you can add a checkpointer to any custom graph that you build.\n",
"For demonstration purposes we add persistence to the [pre-built create react agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent). \n",
"\n",
"In general, you can add a checkpointer to any custom graph that you build like this:\n",
"\n",
"```python\n",
"from langgraph.graph import StateGraph\n",
+11 -6
View File
@@ -16,7 +16,7 @@
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/persistence/\">\n",
" Persistence\n",
" </a>\n",
" </li> \n",
" </li>\n",
" <li>\n",
" <a href=\"https://redis.io/\">\n",
" Redis\n",
@@ -30,18 +30,23 @@
"\n",
"This reference implementation shows how to use Redis as the backend for persisting checkpoint state. Make sure that you have Redis running on port `6379` for going through this guide.\n",
"\n",
"NOTE: this is just an reference implementation. You can implement your own checkpointer using a different database or modify this one as long as it conforms to the `BaseCheckpointSaver` interface.\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Note</p>\n",
" <p>\n",
" This is a **reference** implementation. You can implement your own checkpointer using a different database or modify this one as long as it conforms to the <a href=\"https://langchain-ai.github.io/langgraph/reference/checkpoints/#langgraph.checkpoint.base.BaseCheckpointSaver\">BaseCheckpointSaver</a> interface.\n",
" </p>\n",
"</div>\n",
"\n",
"For demonstration purposes we add persistence to the [pre-built create react agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent).\n",
"\n",
"For demonstration purposes we add persistence to the [pre-built create react agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent), but you can add a checkpointer to any custom graph that you build.\n",
"\n",
"In general, you can add a checkpointer to any custom graph that you build like this:\n",
"\n",
"```python\n",
"from langgraph.graph import StateGraph\n",
"\n",
"builder = StateGraph(....)\n",
"# ... define the graph\n",
"checkpointer = # mongodb checkpointer (see examples below)\n",
"checkpointer = # redis checkpointer (see examples below)\n",
"graph = builder.compile(checkpointer=checkpointer)\n",
"...\n",
"```"
@@ -1037,7 +1042,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
+15 -5
View File
@@ -25,7 +25,7 @@
" <li>\n",
" <a href=\"https://github.com/pydantic/pydantic\">\n",
" Pydantic\n",
" </a> -- this is a very popular Python library for run time validation.\n",
" </a>: this is a popular Python library for run time validation.\n",
" </li>\n",
" </ul>\n",
" </p>\n",
@@ -41,10 +41,20 @@
"<div class=\"admonition note\">\n",
" <p class=\"admonition-title\">Known Limitations</p>\n",
" <p>\n",
" * This notebook uses Pydantic v2 <code>BaseModel</code>, which requires <code>langchain-core >= 0.3</code>. Using <code>langchain-core < 0.3</code> will result in errors due to mixing of Pydantic v1 and v2 <code>BaseModels</code>.\n",
" * Currently, the `output` of the graph will **NOT** be an instance of a pydantic model.\n",
" * Run-time validation only occurs on **inputs** into nodes, not on the outputs.\n",
" * The validation error trace from pydantic does not show which node the error arises in.\n",
" <ul>\n",
" <li>\n",
" This notebook uses Pydantic v2 <code>BaseModel</code>, which requires <code>langchain-core >= 0.3</code>. Using <code>langchain-core < 0.3</code> will result in errors due to mixing of Pydantic v1 and v2 <code>BaseModels</code>. \n",
" </li> \n",
" <li>\n",
" Currently, the `output` of the graph will **NOT** be an instance of a pydantic model.\n",
" </li>\n",
" <li>\n",
" Run-time validation only occurs on **inputs** into nodes, not on the outputs.\n",
" </li>\n",
" <li>\n",
" The validation error trace from pydantic does not show which node the error arises in.\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div>"
]
+82 -14
View File
@@ -7,13 +7,44 @@
"source": [
"# How to stream custom data\n",
"\n",
"The most common use case for streaming from inside a node is to stream LLM tokens, but you may also want to stream custom data. For example, you might have some long-running streaming functions you may wish to render for the user. \n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/streaming/\">\n",
" Streaming\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#astream_events\">\n",
" astream_events API\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models/\">\n",
" Chat Models\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#tools\">\n",
" Tools\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div>\n",
"\n",
"The most common use case for streaming from inside a node is to stream LLM tokens, but you may also want to stream custom data.\n",
"\n",
"For example, if you have a long-running tool call, you can dispatch custom events between the steps and use these custom events to monitor progress. You could also surface these custom events to an end user of your application to show them how the current task is progressing.\n",
"\n",
"You can do so in two ways:\n",
"* using graph's `.stream` / `.astream` methods with `stream_mode=\"custom\"`\n",
"* emitting custom events using [adispatch_custom_events](https://python.langchain.com/docs/how_to/callbacks_custom_events/).\n",
"\n",
"Below is a simple toy example that shows both.\n",
"Below we'll see how to use both APIs.\n",
"\n",
"## Setup\n",
"\n",
@@ -114,7 +145,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"id": "00a91b15-82c7-443c-acb6-a7406df15cee",
"metadata": {},
"outputs": [
@@ -122,7 +153,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Four|score|and|seven|years|ago|our|fathers|...|"
"Four\n",
"score\n",
"and\n",
"seven\n",
"years\n",
"ago\n",
"our\n",
"fathers\n",
"...\n"
]
}
],
@@ -131,30 +170,59 @@
"\n",
"inputs = [HumanMessage(content=\"What are you thinking about?\")]\n",
"async for chunk in app.astream({\"messages\": inputs}, stream_mode=\"custom\"):\n",
" print(chunk, end=\"|\", flush=True)"
" print(chunk, flush=True)"
]
},
{
"cell_type": "markdown",
"id": "29035302-3111-45bf-ac69-50ab940f8cb4",
"id": "c7b9f1f0-c170-40dc-9c22-289483dfbc99",
"metadata": {},
"source": [
"## Stream custom data using `.astream_events`"
"You will likely need to use [multiple streaming modes](https://langchain-ai.github.io/langgraph/how-tos/stream-multiple/) as you will\n",
"want access to both the custom data and the state updates."
]
},
{
"cell_type": "markdown",
"id": "822e91c3-03be-4778-9fa5-a6ec57be3e52",
"cell_type": "code",
"execution_count": 6,
"id": "f8ed22d4-6ce6-4b04-a68b-2ea516e3ab15",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"('custom', 'Four')\n",
"('custom', 'score')\n",
"('custom', 'and')\n",
"('custom', 'seven')\n",
"('custom', 'years')\n",
"('custom', 'ago')\n",
"('custom', 'our')\n",
"('custom', 'fathers')\n",
"('custom', '...')\n",
"('updates', {'model': {'messages': [AIMessage(content='Four score and seven years ago our fathers ...', additional_kwargs={}, response_metadata={})]}})\n"
]
}
],
"source": [
"If you are already using graph's `.astream_events` method in your workflow, you can also stream custom data by emitting custom events using `adispatch_custom_event`"
"from langchain_core.messages import HumanMessage\n",
"\n",
"inputs = [HumanMessage(content=\"What are you thinking about?\")]\n",
"async for chunk in app.astream({\"messages\": inputs}, stream_mode=[\"custom\", \"updates\"]):\n",
" print(chunk, flush=True)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0fb6c3e5-7377-4f93-a8c6-44582ee3bc1a",
"id": "ca976d6a-7c64-4603-8bb4-dee95428c33d",
"metadata": {},
"source": [
"## Stream custom data using `.astream_events`\n",
"\n",
"If you are already using graph's `.astream_events` method in your workflow, you can also stream custom data by emitting custom events using `adispatch_custom_event`\n",
"\n",
"<div class=\"admonition warning\">\n",
" <p class=\"admonition-title\">ASYNC IN PYTHON<=3.10</p>\n",
" <p>\n",
@@ -178,7 +246,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 19,
"id": "486a01a0",
"metadata": {},
"outputs": [],
@@ -229,7 +297,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 20,
"id": "ce773a40",
"metadata": {},
"outputs": [
@@ -270,7 +338,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
@@ -1,26 +1,49 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "b23ced4e-dc29-43be-9f94-0c36bb181b8a",
"metadata": {},
"source": [
"# How to stream events from within a tool (without LangChain LLMs / tools)"
]
},
{
"cell_type": "markdown",
"id": "7044eeb8-4074-4f9c-8a62-962488744557",
"metadata": {},
"source": [
"In this example we will stream tokens from within tools that an agent is using. We'll also be using OpenAI client library directly, without using LangChain chat models. We will use a ReAct agent as an example."
]
},
{
"cell_type": "markdown",
"id": "a37f60af-43ea-4aa6-847a-df8cc47065f5",
"id": "18e6e213-b398-4a7e-b342-ba225e97b424",
"metadata": {},
"source": [
"# How to stream events from within a tool (without LangChain LLMs / tools)\n",
"\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/streaming/\">\n",
" Streaming\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#astream_events\">\n",
" astream_events API\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models/\">\n",
" Chat Models\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#tools\">\n",
" Tools\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div>\n",
"\n",
"In this guide, we will demonstrate how to stream tokens from tools used by a custom ReAct agent, without relying on LangChains chat models or tool-calling functionalities. \n",
"\n",
"We will use the OpenAI client library directly for the chat model interaction. The tool execution will be implemented from scratch.\n",
"\n",
"This showcases how LangGraph can be utilized independently of built-in LangChain components like chat models or tools.\n",
"\n",
"## Setup\n",
"\n",
"First, let's install the required packages and set our API keys"
@@ -28,7 +51,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 7,
"id": "47f79af8-58d8-4a48-8d9a-88823d88701f",
"metadata": {},
"outputs": [],
@@ -39,7 +62,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"id": "0cf6b41d-7fcb-40b6-9a72-229cdd00a094",
"metadata": {},
"outputs": [],
@@ -70,24 +93,19 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "e3d02ebb-c2e1-4ef7-b187-810d55139317",
"metadata": {},
"source": [
"## Define the graph"
]
},
{
"cell_type": "markdown",
"id": "3ba684f1-d46b-42e4-95cf-9685209a5992",
"id": "7d766c7d-34ea-455b-8bcb-f2f12d100e1d",
"metadata": {},
"source": [
"## Define the graph\n",
"\n",
"### Define a node that will call OpenAI API"
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 9,
"id": "d59234f9-173e-469d-a725-c13e0979663e",
"metadata": {},
"outputs": [],
@@ -190,7 +208,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 10,
"id": "b90941d8-afe4-42ec-9262-9c3b87c3b1ec",
"metadata": {},
"outputs": [],
@@ -261,7 +279,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 14,
"id": "228260be-1f9a-4195-80e0-9604f8a5dba6",
"metadata": {},
"outputs": [],
@@ -299,12 +317,14 @@
"id": "d046e2ef-f208-4831-ab31-203b2e75a49a",
"metadata": {},
"source": [
"## Stream tokens from within the tool"
"## Stream tokens from within the tool\n",
"\n",
"Here, we'll use the `astream_events` API to stream back individual events. Please see [astream_events](https://python.langchain.com/docs/concepts/#astream_events) for more details."
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 15,
"id": "45c96a79-4147-42e3-89fd-d942b2b49f6c",
"metadata": {},
"outputs": [
@@ -344,7 +364,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
@@ -1,26 +1,53 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "b23ced4e-dc29-43be-9f94-0c36bb181b8a",
"metadata": {},
"source": [
"# How to stream events from within a tool"
]
},
{
"cell_type": "markdown",
"id": "7044eeb8-4074-4f9c-8a62-962488744557",
"metadata": {},
"source": [
"If your LangGraph graph needs to use tools that call LLMs (or any other LangChain `Runnable` objects -- other graphs, LCEL chains, retrievers, etc.), you might want to stream events from the underlying `Runnable`. This guide shows how you can do that."
]
},
{
"cell_type": "markdown",
"id": "a37f60af-43ea-4aa6-847a-df8cc47065f5",
"id": "04b012ac-e0b5-483e-a645-d13d0e215aad",
"metadata": {},
"source": [
"# How to stream data from within a tool\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/streaming/\">\n",
" Streaming\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models/\">\n",
" Chat Models\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#tools\">\n",
" Tools\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://api.python.langchain.com/en/latest/runnables/langchain_core.runnables.config.RunnableConfig.html#langchain_core.runnables.config.RunnableConfig\">\n",
" RunnableConfig\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#runnable-interface\">\n",
" RunnableInterface\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div>\n",
"\n",
"If your graph involves tools that invoke LLMs (or any other LangChain `Runnable` objects like other graphs, `LCEL` chains, or retrievers), you might want to surface partial results during the execution of the tool, especially if the tool takes a longer time to run.\n",
"\n",
"A common scenario is streaming LLM tokens generated by a tool calling an LLM, though this applies to any use of Runnable objects. \n",
"\n",
"This guide shows how to stream data from within a tool using the `astream` API with `stream_mode=\"messages\"` and also the more granular `astream_events` API. The `astream` API should be sufficient for most use cases.\n",
"\n",
"## Setup\n",
"\n",
"First, let's install the required packages and set our API keys"
@@ -28,7 +55,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 3,
"id": "47f79af8-58d8-4a48-8d9a-88823d88701f",
"metadata": {},
"outputs": [],
@@ -39,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "0cf6b41d-7fcb-40b6-9a72-229cdd00a094",
"metadata": {},
"outputs": [],
@@ -74,30 +101,9 @@
"id": "e3d02ebb-c2e1-4ef7-b187-810d55139317",
"metadata": {},
"source": [
"## Define the graph"
]
},
{
"cell_type": "markdown",
"id": "d74a1760-a063-4d05-8c6f-9d16bc31fa82",
"metadata": {},
"source": [
"We'll use a prebuilt ReAct agent for this guide"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "083757a9-26d7-481e-8f3d-3e34bcba154b",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.callbacks import Callbacks\n",
"from langchain_core.prompts import ChatPromptTemplate\n",
"from langchain_core.tools import tool\n",
"## Define the graph\n",
"\n",
"from langgraph.prebuilt import create_react_agent\n",
"from langchain_openai import ChatOpenAI"
"We'll use a prebuilt ReAct agent for this guide"
]
},
{
@@ -108,7 +114,7 @@
"<div class=\"admonition warning\">\n",
" <p class=\"admonition-title\">ASYNC IN PYTHON<=3.10</p>\n",
" <p>\n",
"Any Langchain RunnableLambda, a RunnableGenerator, or Tool that invokes other runnables and is running async in python<=3.10, will have to propagate callbacks to child objects manually. This is because LangChain cannot automatically propagate callbacks to child objects in this case.\n",
"Any Langchain `RunnableLambda`, a `RunnableGenerator`, or `Tool` that invokes other runnables and is running async in python<=3.10, will have to propagate callbacks to child objects **manually**. This is because LangChain cannot automatically propagate callbacks to child objects in this case.\n",
" \n",
"This is a common reason why you may fail to see events being emitted from custom runnables or tools.\n",
" </p>\n",
@@ -117,84 +123,61 @@
},
{
"cell_type": "code",
"execution_count": 14,
"id": "2cb38dd9-74d8-456d-9e39-4655f2bf3f37",
"execution_count": 5,
"id": "f1975577-a485-42bd-b0f1-d3e987faf52b",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.callbacks import Callbacks\n",
"from langchain_core.messages import HumanMessage\n",
"from langchain_core.tools import tool\n",
"\n",
"from langgraph.prebuilt import create_react_agent\n",
"from langchain_openai import ChatOpenAI\n",
"\n",
"\n",
"@tool\n",
"async def get_items(\n",
" place: str, callbacks: Callbacks\n",
") -> str: # <--- Accept callbacks (Python <= 3.10)\n",
" place: str,\n",
" callbacks: Callbacks, # <--- Manually accept callbacks (needed for Python <= 3.10)\n",
") -> str:\n",
" \"\"\"Use this tool to look up which items are in the given place.\"\"\"\n",
" template = ChatPromptTemplate.from_messages(\n",
" # Attention when using async, you should be invoking the LLM using ainvoke!\n",
" # If you fail to do so, streaming will not WORK.\n",
" return await llm.ainvoke(\n",
" [\n",
" (\n",
" \"human\",\n",
" \"Can you tell me what kind of items i might find in the following place: '{place}'. \"\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": f\"Can you tell me what kind of items i might find in the following place: '{place}'. \"\n",
" \"List at least 3 such items separating them by a comma. And include a brief description of each item..\",\n",
" )\n",
" ]\n",
" }\n",
" ],\n",
" {\"callbacks\": callbacks},\n",
" )\n",
" chain = template | llm.with_config(\n",
" {\n",
" \"run_name\": \"Get Items LLM\",\n",
" \"tags\": [\"tool_llm\"],\n",
" \"callbacks\": callbacks, # <-- Propagate callbacks (Python <= 3.10)\n",
" }\n",
" )\n",
" chunks = [chunk async for chunk in chain.astream({\"place\": place})]\n",
" return \"\".join(chunk.content for chunk in chunks)"
]
},
{
"cell_type": "markdown",
"id": "17279b8a-049d-483d-af63-8a875098e71f",
"metadata": {},
"source": [
"We're adding a custom tag (`tool_llm`) to our LLM runnable within the tool. This will allow us to filter events that we'll stream from the compiled graph (`agent`) Runnable below"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "7254310e-7016-45f7-9795-6d52a1160086",
"metadata": {},
"outputs": [],
"source": [
"llm = ChatOpenAI(model_name=\"gpt-3.5-turbo\")\n",
"\n",
"\n",
"llm = ChatOpenAI(model_name=\"gpt-4o\")\n",
"tools = [get_items]\n",
"agent = create_react_agent(llm, tools=tools)"
]
},
{
"cell_type": "markdown",
"id": "b7d88960-a66b-4699-adee-c12d40b4318a",
"id": "15cb55cc-b59d-4743-b6a3-13db75414d2c",
"metadata": {},
"source": [
"## Stream events from the graph"
"## Using stream_mode=\"messages\"\n",
"\n",
"Using `stream_mode=\"messages\"` is a good option if you don't have any complex LCEL logic inside of nodes (or you don't need super granular progress from within the LCEL chain)."
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "ec461f66",
"execution_count": 6,
"id": "4c9cdad3-3e9a-444f-9d9d-eae20b8d3486",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1|.| Books| -| A| collection| of| written| or| printed| works| bound| together| and| typically| held| upright| on| a| shelf| for| easy| access| and| storage|.\n",
"|2|.| Picture| frames| -| Decor|ative| frames| used| to| display| photographs| or| artwork| on| a| shelf|,| adding| a| personal| touch| to| the| space|.\n",
"|3|.| Decor|ative| figur|ines| -| Small| sculptures| or| statues| that| are| placed| on| a| shelf| for| decorative| purposes|,| adding| visual| interest| and| personality| to| the| room|.|"
]
}
],
"outputs": [],
"source": [
"from langchain_core.messages import HumanMessage\n",
"\n",
"inputs = [HumanMessage(content=\"what is the weather in sf\")]\n",
"final_message = \"\"\n",
"async for msg, metadata in agent.astream(\n",
" {\"messages\": [(\"human\", \"what items are on the shelf?\")]}, stream_mode=\"messages\"\n",
@@ -213,32 +196,58 @@
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "1b35d72f",
"attachments": {},
"cell_type": "markdown",
"id": "81656193-1cbf-4721-a8df-0e316fd510e5",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'The items on the shelf are:\\n1. Books\\n2. Picture frames\\n3. Decorative figurines'"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"final_message"
"## Using stream events API\n",
"\n",
"For simplicity, the `get_items` tool doesn't use any complex LCEL logic inside it -- it only invokes an LLM.\n",
"\n",
"However, if the tool were more complex (e.g., using a RAG chain inside it), and you wanted to see more granular events from within the chain, then you can use the astream events API.\n",
"\n",
"The example below only illustrates how to invoke the API.\n",
"\n",
"<div class=\"admonition warning\">\n",
" <p class=\"admonition-title\">Use async for the astream events API</p>\n",
" <p>\n",
" You should generally be using `async` code (e.g., using `ainvoke` to invoke the llm) to be able to leverage the astream events API properly.\n",
" </p>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "d7f9457c-5665-4cd5-9a99-d54c84270616",
"cell_type": "code",
"execution_count": 7,
"id": "c3acdec9-0a24-4348-921e-435c8ea6f9fe",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"|In| a| bedroom|,| you| might| find| the| following| items|:\n",
"\n",
"|1|.| **|Bed|**|:| The| central| piece| of| furniture| in| a| bedroom|,| typically| consisting| of| a| mattress| on| a| frame|,| where| people| sleep|.| It| often| includes| bedding| such| as| sheets|,| blankets|,| and| pillows| for| comfort|.\n",
"\n",
"|2|.| **|Ward|robe|**|:| A| large|,| tall| cupboard| or| fre|estanding| piece| of| furniture| used| for| storing| clothes|.| It| may| have| hanging| space|,| shelves|,| and| sometimes| drawers| for| organizing| garments| and| accessories|.\n",
"\n",
"|3|.| **|Night|stand|**|:| A| small| table| or| cabinet| placed| beside| the| bed|,| used| for| holding| items| like| a| lamp|,| alarm| clock|,| books|,| or| personal| belongings| that| might| be| needed| during| the| night| or| early| morning|.||"
]
}
],
"source": [
"You can see that the content of the final message is the same as the output we streamed above"
"from langchain_core.messages import HumanMessage\n",
"\n",
"async for event in agent.astream_events(\n",
" {\"messages\": [{\"role\": \"user\", \"content\": \"what's in the bedroom.\"}]}, version=\"v2\"\n",
"):\n",
" if (\n",
" event[\"event\"] == \"on_chat_model_stream\"\n",
" and event[\"metadata\"].get(\"langgraph_node\") == \"tools\"\n",
" ):\n",
" print(event[\"data\"][\"chunk\"].content, end=\"|\", flush=True)"
]
}
],
@@ -258,7 +267,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
@@ -13,7 +13,31 @@
"id": "964686a6-8fed-4360-84d2-958c48186008",
"metadata": {},
"source": [
"A common use case is streaming from an agent is to stream LLM tokens from inside the final node. This guide demonstrates how you can do this.\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/streaming/\">\n",
" Streaming\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models/\">\n",
" Chat Models\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#tools\">\n",
" Tools\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"A common use case when streaming from an agent is to stream LLM tokens from inside the final node. This guide demonstrates how you can do this.\n",
"\n",
"## Setup\n",
"\n",
@@ -33,7 +57,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "c87e4a47-4099-4d1a-907c-a99fa857165a",
"metadata": {},
"outputs": [],
@@ -60,7 +84,7 @@
" <p style=\"padding-top: 5px;\">\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 <a href=\"https://docs.smith.langchain.com\">here</a>. \n",
" </p>\n",
"</div> "
"</div>"
]
},
{
@@ -73,7 +97,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"id": "5e62618d-0e0c-483c-acd3-40a26e61894a",
"metadata": {},
"outputs": [],
@@ -120,7 +144,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"id": "8c7339d2-1835-4b5a-a99c-a60e150280af",
"metadata": {},
"outputs": [],
@@ -164,28 +188,28 @@
" return {\"messages\": [response]}\n",
"\n",
"\n",
"workflow = StateGraph(MessagesState)\n",
"builder = StateGraph(MessagesState)\n",
"\n",
"workflow.add_node(\"agent\", call_model)\n",
"workflow.add_node(\"tools\", tool_node)\n",
"builder.add_node(\"agent\", call_model)\n",
"builder.add_node(\"tools\", tool_node)\n",
"# add a separate final node\n",
"workflow.add_node(\"final\", call_final_model)\n",
"builder.add_node(\"final\", call_final_model)\n",
"\n",
"workflow.add_edge(START, \"agent\")\n",
"workflow.add_conditional_edges(\n",
"builder.add_edge(START, \"agent\")\n",
"builder.add_conditional_edges(\n",
" \"agent\",\n",
" should_continue,\n",
")\n",
"\n",
"workflow.add_edge(\"tools\", \"agent\")\n",
"workflow.add_edge(\"final\", END)\n",
"builder.add_edge(\"tools\", \"agent\")\n",
"builder.add_edge(\"final\", END)\n",
"\n",
"app = workflow.compile()"
"graph = builder.compile()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"id": "2ab6d079-ba06-48ba-abe5-e72df24407af",
"metadata": {},
"outputs": [
@@ -203,7 +227,7 @@
"source": [
"from IPython.display import display, Image\n",
"\n",
"display(Image(app.get_graph().draw_mermaid_png()))"
"display(Image(graph.get_graph().draw_mermaid_png()))"
]
},
{
@@ -214,19 +238,6 @@
"## Stream outputs from the final node"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "84d65cbe-4cfe-44f8-b49e-b37632887c91",
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"from langchain_core._api import LangChainBetaWarning\n",
"\n",
"warnings.filterwarnings(\"ignore\", category=LangChainBetaWarning)"
]
},
{
"cell_type": "markdown",
"id": "5cfaeb64-5506-4546-96c0-4891e6288ad9",
@@ -260,8 +271,8 @@
"source": [
"from langchain_core.messages import HumanMessage\n",
"\n",
"inputs = [HumanMessage(content=\"what is the weather in sf\")]\n",
"async for msg, metadata in app.astream({\"messages\": inputs}, stream_mode=\"messages\"):\n",
"inputs = {\"messages\": [HumanMessage(content=\"what is the weather in sf\")]}\n",
"for msg, metadata in graph.stream(inputs, stream_mode=\"messages\"):\n",
" if (\n",
" msg.content\n",
" and not isinstance(msg, HumanMessage)\n",
@@ -296,13 +307,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Well| folks|,| looks| like| we|'ve| got| some| cloudy| skies| in| the| Big| Apple| today|.| So| grab| your| umbrella| just| in| case|,| and| don|'t| let| those| clouds| rain| on| your| parade|!|"
"Looks| like| we|'ve| got| some| clouds| roll|in|'| in| over| the| Big| Apple| today|,| folks|!| Keep| an| eye| out| for| some| over|cast| skies| in| NYC|.|"
]
}
],
"source": [
"inputs = {\"messages\": [(\"human\", \"what's the weather in nyc?\")]}\n",
"async for event in app.astream_events(inputs, version=\"v2\"):\n",
"inputs = {\"messages\": [HumanMessage(content=\"what's the weather in nyc?\")]}\n",
"async for event in graph.astream_events(inputs, version=\"v2\"):\n",
" kind = event[\"event\"]\n",
" tags = event.get(\"tags\", [])\n",
" # filter on the custom tag\n",
+1 -1
View File
@@ -70,7 +70,7 @@
"source": [
"from typing import Optional, Annotated\n",
"from typing_extensions import TypedDict\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph, START, END\n",
"\n",
"\n",
@@ -347,7 +347,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
+26 -2
View File
@@ -11,7 +11,31 @@
"source": [
"# How to create subgraphs\n",
"\n",
"For more complex systems, subgraphs are a useful design principle. Subgraphs allow you to create and manage different states in different parts of your graph. This allows you build things like [multi-agent teams](https://langchain-ai.github.io/langgraph/tutorials/multi_agent/hierarchical_agent_teams/), where each team can track its own separate state.\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/#state\">\n",
" State\n",
" </a>\n",
" </li>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/#reducers\">\n",
" Reducers\n",
" </a>\n",
" </li>\n",
" <li> \n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/agentic_concepts/#sub-graphs\">\n",
" Subgraphs\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"For more complex systems, subgraphs are a useful design principle. Subgraphs allow you to create and manage different states in different parts of your graph. This allows you build things like [multi-agent teams](https://langchain-ai.github.io/langgraph/tutorials/multi_agent/hierarchical_agent_teams/), where each team can track its own separate state. This guide shows how you can add subgraphs to your graph.\n",
"\n",
"![Screenshot 2024-07-11 at 1.01.28 PM.png](attachment:71516aef-9c00-4730-a676-a54e90cb6472.png)"
]
@@ -80,7 +104,7 @@
"source": [
"from typing import Optional, Annotated\n",
"from typing_extensions import TypedDict\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph, START, END\n",
"\n",
"\n",
@@ -134,10 +134,10 @@
"source": [
"from typing import Literal\n",
"from typing_extensions import TypedDict\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"\n",
"class RouterState(MessagesState):\n",
@@ -739,10 +739,10 @@
"source": [
"from typing import Literal\n",
"from typing_extensions import TypedDict\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"\n",
"class RouterState(MessagesState):\n",
@@ -794,9 +794,9 @@
"metadata": {},
"outputs": [],
"source": [
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"\n",
"class GrandfatherState(MessagesState):\n",
@@ -823,7 +823,7 @@
" \"router_node\", route_after_prediction, [\"graph\", END]\n",
")\n",
"grandparent_graph.add_edge(\"graph\", END)\n",
"grandparent_graph = grandparent_graph.compile(checkpointer=MemorySaver())"
"grandparent_graph = grandparent_graph.compile(checkpointer=InMemorySaver())"
]
},
{
+2 -76
View File
@@ -7,7 +7,7 @@
"source": [
"# How to visualize your graph\n",
"\n",
"This notebook walks through how to visualize the graphs you create. This works with ANY [Graph](https://langchain-ai.github.io/langgraph/reference/graphs/).\n",
"This guide walks through how to visualize the graphs you create. This works with ANY [Graph](https://langchain-ai.github.io/langgraph/reference/graphs/).\n",
"\n",
"## Setup\n",
"\n",
@@ -32,7 +32,7 @@
"source": [
"## Set up Graph\n",
"\n",
"You can visualize any arbitrary Graph, including StateGraph's and MessageGraph's. Let's have some fun by drawing fractals :)."
"You can visualize any arbitrary [Graph](https://langchain-ai.github.io/langgraph/reference/graphs/), including [StateGraph](https://langchain-ai.github.io/langgraph/reference/graphs/#langgraph.graph.state.StateGraph). Let's have some fun by drawing fractals :)."
]
},
{
@@ -109,80 +109,6 @@
"app = build_fractal_graph(3)"
]
},
{
"cell_type": "markdown",
"id": "f4fc9378-b141-4b65-b86c-3afba77f7161",
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-18T12:18:30.605220Z",
"start_time": "2024-04-18T12:18:30.587191Z"
}
},
"source": [
"## Ascii\n",
"\n",
"We can easily visualize this graph in ascii"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a0b22e88-7f78-4215-afdd-4eedef9e2b9b",
"metadata": {},
"outputs": [],
"source": [
"%pip install --quiet grandalf"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "ca9b980d-1f0a-4286-9157-a870e3d55134",
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-19T11:25:37.303260Z",
"start_time": "2024-04-19T11:25:37.273032Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" +-----------+ \n",
" | __start__ | \n",
" +-----------+ \n",
" * \n",
" * \n",
" * \n",
" .......+------------+******** \n",
" ................ *****.| entry_node |....... **************** \n",
" ................ ***********...... +------------+ ****............ **************** \n",
" ............... ************ ..... . ****** ............. *************** \n",
" ................ ************ ...... . ****** ............ **************** \n",
" ................ ******* ...... . ****** ............ **************** \n",
" ........ +-------------------+ .... . **** ........ ******** \n",
" . | node_entry_node_B |****** .. . * .. ** \n",
" ... +-------------------+ ************. . * ... *** \n",
" . **** *** ... *********** . * ... *** \n",
" ... **** ** .. ************ . * .. ** \n",
" . ** ** .. ****** . * .. ** \n",
"+--------------------------+ +--------------------------+ +--------------------------+ **** +-------------------+ \n",
"| node_node_entry_node_B_B |........ | node_node_entry_node_B_C | | node_node_entry_node_B_A | ****** ......| node_entry_node_A | \n",
"+--------------------------+ ...+--------------------------+........ +--------------------------+ ****** ............... +-------------------+ \n",
" ............... .......... . ******* ............. \n",
" ............. ......... . ****** ............... \n",
" ............... ..... . **** ............. \n",
" .....+---------+........ \n",
" | __end__ | \n",
" +---------+ \n"
]
}
],
"source": [
"app.get_graph().print_ascii()"
]
},
{
"cell_type": "markdown",
"id": "edcd9ad2",
+6
View File
@@ -0,0 +1,6 @@
# Storage
::: langgraph.store.base
::: langgraph.store.postgres
@@ -256,7 +256,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph, START\n",
"from langgraph.graph.message import add_messages\n",
"from typing import Annotated\n",
@@ -267,7 +267,7 @@
" messages: Annotated[list, add_messages]\n",
"\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"workflow = StateGraph(State)\n",
"workflow.add_node(\"info\", info_chain)\n",
"workflow.add_node(\"prompt\", prompt_gen_chain)\n",
@@ -1119,7 +1119,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import END, StateGraph, START\n",
"from langgraph.prebuilt import tools_condition\n",
"\n",
@@ -1139,7 +1139,7 @@
"\n",
"# The checkpointer lets the graph persist its state\n",
"# this is a complete memory for the entire graph.\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"part_1_graph = builder.compile(checkpointer=memory)"
]
},
@@ -1938,7 +1938,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph\n",
"from langgraph.prebuilt import tools_condition\n",
"\n",
@@ -1962,7 +1962,7 @@
")\n",
"builder.add_edge(\"tools\", \"assistant\")\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"part_2_graph = builder.compile(\n",
" checkpointer=memory,\n",
" # NEW: The graph will always halt before executing the \"tools\" node.\n",
@@ -2524,7 +2524,7 @@
"source": [
"from typing import Literal\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph\n",
"from langgraph.prebuilt import tools_condition\n",
"\n",
@@ -2568,7 +2568,7 @@
"builder.add_edge(\"safe_tools\", \"assistant\")\n",
"builder.add_edge(\"sensitive_tools\", \"assistant\")\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"part_3_graph = builder.compile(\n",
" checkpointer=memory,\n",
" # NEW: The graph will always halt before executing the \"tools\" node.\n",
@@ -3466,7 +3466,7 @@
"source": [
"from typing import Literal\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph\n",
"from langgraph.prebuilt import tools_condition\n",
"\n",
@@ -3830,7 +3830,7 @@
"builder.add_conditional_edges(\"fetch_user_info\", route_to_workflow)\n",
"\n",
"# Compile graph\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"part_4_graph = builder.compile(\n",
" checkpointer=memory,\n",
" # Let the user approve or deny the use of sensitive tools\n",
-4
View File
@@ -53,10 +53,6 @@ Learn from example implementations of graphs designed for specific scenarios and
- [Language Agent Tree Search](lats/lats.ipynb): Use reflection and rewards to drive a tree search over agents
- [Self-Discover Agent](self-discover/self-discover.ipynb): Analyze an agent that learns about its own capabilities
#### Memory
- [Long-term memory](memory/long_term_memory_agent.ipynb): Build an agent that can store, retrieve, and use memories to enhance its interactions with users.
#### Evaluation
- [Agent-based](chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb): Evaluate chatbots via simulated user interactions
+16 -16
View File
@@ -793,7 +793,7 @@
"\n",
"We will see later that **checkpointing** is _much_ more powerful than simple chat memory - it lets you save and resume complex state at any time for error recovery, human-in-the-loop workflows, time travel interactions, and more. But before we get too ahead of ourselves, let's add checkpointing to enable multi-turn conversations.\n",
"\n",
"To get started, create a `MemorySaver` checkpointer."
"To get started, create a `InMemorySaver` checkpointer."
]
},
{
@@ -803,9 +803,9 @@
"metadata": {},
"outputs": [],
"source": [
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"memory = MemorySaver()"
"memory = InMemorySaver()"
]
},
{
@@ -1135,7 +1135,7 @@
"from langchain_core.messages import BaseMessage\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph\n",
"from langgraph.graph.message import add_messages\n",
"from langgraph.prebuilt import ToolNode\n",
@@ -1203,12 +1203,12 @@
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph, START\n",
"from langgraph.graph.message import add_messages\n",
"from langgraph.prebuilt import ToolNode, tools_condition\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"\n",
"\n",
"class State(TypedDict):\n",
@@ -1456,7 +1456,7 @@
"from langchain_core.messages import BaseMessage\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph\n",
"from langgraph.graph.message import add_messages\n",
"from langgraph.prebuilt import ToolNode, tools_condition\n",
@@ -1491,7 +1491,7 @@
"graph_builder.add_edge(\"tools\", \"chatbot\")\n",
"graph_builder.set_entry_point(\"chatbot\")\n",
"\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"graph = graph_builder.compile(\n",
" checkpointer=memory,\n",
" # This is new!\n",
@@ -1531,7 +1531,7 @@
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph, START\n",
"from langgraph.graph.message import add_messages\n",
"from langgraph.prebuilt import ToolNode, tools_condition\n",
@@ -1565,7 +1565,7 @@
")\n",
"graph_builder.add_edge(\"tools\", \"chatbot\")\n",
"graph_builder.add_edge(START, \"chatbot\")\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"graph = graph_builder.compile(\n",
" checkpointer=memory,\n",
" # This is new!\n",
@@ -2066,7 +2066,7 @@
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph, START\n",
"from langgraph.graph.message import add_messages\n",
"from langgraph.prebuilt import ToolNode, tools_condition\n",
@@ -2267,7 +2267,7 @@
"graph_builder.add_edge(\"tools\", \"chatbot\")\n",
"graph_builder.add_edge(\"human\", \"chatbot\")\n",
"graph_builder.add_edge(START, \"chatbot\")\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"graph = graph_builder.compile(\n",
" checkpointer=memory,\n",
" # We interrupt before 'human' here instead.\n",
@@ -2542,7 +2542,7 @@
"from pydantic import BaseModel\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph\n",
"from langgraph.graph.message import add_messages\n",
"from langgraph.prebuilt import ToolNode, tools_condition\n",
@@ -2629,7 +2629,7 @@
"graph_builder.add_edge(\"tools\", \"chatbot\")\n",
"graph_builder.add_edge(\"human\", \"chatbot\")\n",
"graph_builder.set_entry_point(\"chatbot\")\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"graph = graph_builder.compile(\n",
" checkpointer=memory,\n",
" interrupt_before=[\"human\"],\n",
@@ -2674,7 +2674,7 @@
"from pydantic import BaseModel\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import StateGraph, START\n",
"from langgraph.graph.message import add_messages\n",
"from langgraph.prebuilt import ToolNode, tools_condition\n",
@@ -2761,7 +2761,7 @@
"graph_builder.add_edge(\"tools\", \"chatbot\")\n",
"graph_builder.add_edge(\"human\", \"chatbot\")\n",
"graph_builder.add_edge(START, \"chatbot\")\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"graph = graph_builder.compile(\n",
" checkpointer=memory,\n",
" interrupt_before=[\"human\"],\n",
File diff suppressed because one or more lines are too long
@@ -322,7 +322,7 @@
"from typing import Annotated, List, Sequence\n",
"from langgraph.graph import END, StateGraph, START\n",
"from langgraph.graph.message import add_messages\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from typing_extensions import TypedDict\n",
"\n",
"\n",
@@ -361,7 +361,7 @@
"\n",
"builder.add_conditional_edges(\"generate\", should_continue)\n",
"builder.add_edge(\"reflect\", \"generate\")\n",
"memory = MemorySaver()\n",
"memory = InMemorySaver()\n",
"graph = builder.compile(checkpointer=memory)"
]
},
+2 -2
View File
@@ -1514,7 +1514,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"\n",
"builder_of_storm = StateGraph(ResearchState)\n",
"\n",
@@ -1534,7 +1534,7 @@
"\n",
"builder_of_storm.add_edge(START, nodes[0][0])\n",
"builder_of_storm.add_edge(nodes[-1][0], END)\n",
"storm = builder_of_storm.compile(checkpointer=MemorySaver())"
"storm = builder_of_storm.compile(checkpointer=InMemorySaver())"
]
},
{
+4 -4
View File
@@ -1029,7 +1029,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import END, StateGraph, START\n",
"\n",
"builder = StateGraph(State)\n",
@@ -1053,7 +1053,7 @@
"builder.add_conditional_edges(\"evaluate\", control_edge, {END: END, \"solve\": \"solve\"})\n",
"\n",
"\n",
"checkpointer = MemorySaver()\n",
"checkpointer = InMemorySaver()\n",
"graph = builder.compile(checkpointer=checkpointer)"
]
},
@@ -1327,7 +1327,7 @@
"outputs": [],
"source": [
"# This is all the same as before\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.checkpoint.memory import InMemorySaver\n",
"from langgraph.graph import END, StateGraph, START\n",
"\n",
"builder = StateGraph(State)\n",
@@ -1353,7 +1353,7 @@
"\n",
"\n",
"builder.add_conditional_edges(\"evaluate\", control_edge, {END: END, \"solve\": \"solve\"})\n",
"checkpointer = MemorySaver()"
"checkpointer = InMemorySaver()"
]
},
{
+8 -8
View File
@@ -118,8 +118,6 @@ nav:
- Reflexion: tutorials/reflexion/reflexion.ipynb
- Language Agent Tree Search: tutorials/lats/lats.ipynb
- Self-Discover Agent: tutorials/self-discover/self-discover.ipynb
- Memory:
- Long-term memory: tutorials/memory/long_term_memory_agent.ipynb
- Evaluation & Analysis:
- Chatbot Evaluation via Simulation:
- Agent-based: tutorials/chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb
@@ -138,14 +136,15 @@ nav:
- Create map-reduce branches for parallel execution: how-tos/map-reduce.ipynb
- Control graph recursion limit: how-tos/recursion-limit.ipynb
- Persistence:
- Add persistence ("memory"): how-tos/persistence.ipynb
- Manage conversation history: how-tos/memory/manage-conversation-history.ipynb
- Delete messages: how-tos/memory/delete-messages.ipynb
- Add summary of the conversation history: how-tos/memory/add-summary-conversation-history.ipynb
- Share state between threads: how-tos/memory/shared-state.ipynb
- Add thread-level persistence: how-tos/persistence.ipynb
- Add cross-thread persistence: how-tos/cross-thread-persistence.ipynb
- Use Postgres checkpointer for persistence: how-tos/persistence_postgres.ipynb
- Create custom checkpointer using MongoDB: how-tos/persistence_mongodb.ipynb
- Create custom checkpointer using Redis: how-tos/persistence_redis.ipynb
- Memory:
- Manage conversation history: how-tos/memory/manage-conversation-history.ipynb
- Delete messages: how-tos/memory/delete-messages.ipynb
- Add summary of the conversation history: how-tos/memory/add-summary-conversation-history.ipynb
- Human-in-the-loop:
- Add breakpoints: how-tos/human_in_the_loop/breakpoints.ipynb
- Add dynamic breakpoints: how-tos/human_in_the_loop/dynamic_breakpoints.ipynb
@@ -168,7 +167,7 @@ nav:
- Tool calling:
- Call tools using ToolNode: how-tos/tool-calling.ipynb
- Handle tool calling errors: how-tos/tool-calling-errors.ipynb
- Pass graph state to tools: how-tos/pass-run-time-values-to-tools.ipynb
- Pass runtime values to tools: how-tos/pass-run-time-values-to-tools.ipynb
- Pass config to tools: how-tos/pass-config-to-tools.ipynb
- Handle many tools: how-tos/many-tools.ipynb
- Subgraphs:
@@ -206,6 +205,7 @@ nav:
- Reference:
- Graphs: reference/graphs.md
- Checkpointing: reference/checkpoints.md
- Storage: reference/store.md
- Prebuilt Components: reference/prebuilt.md
- Channels: reference/channels.md
- Errors: reference/errors.md
@@ -154,7 +154,7 @@
"id": "2dff2209-44c7-4e2c-b607-ba6675f9e45f",
"metadata": {},
"outputs": [],
"source": ["from langgraph.checkpoint.memory import MemorySaver\nfrom langgraph.graph import END, StateGraph, START\n\nbuilder = StateGraph(GraphState)\n\n# Define the nodes\nbuilder.add_node(\"generate\", generate) # generation solution\nbuilder.add_node(\"check_code\", code_check) # check code\n\n# Build graph\nbuilder.add_edge(START, \"generate\")\nbuilder.add_edge(\"generate\", \"check_code\")\nbuilder.add_conditional_edges(\n \"check_code\",\n decide_to_finish,\n {\n \"end\": END,\n \"generate\": \"generate\",\n },\n)\n\nmemory = MemorySaver()\ngraph = builder.compile(checkpointer=memory)"]
"source": ["from langgraph.checkpoint.memory import InMemorySaver\nfrom langgraph.graph import END, StateGraph, START\n\nbuilder = StateGraph(GraphState)\n\n# Define the nodes\nbuilder.add_node(\"generate\", generate) # generation solution\nbuilder.add_node(\"check_code\", code_check) # check code\n\n# Build graph\nbuilder.add_edge(START, \"generate\")\nbuilder.add_edge(\"generate\", \"check_code\")\nbuilder.add_conditional_edges(\n \"check_code\",\n decide_to_finish,\n {\n \"end\": END,\n \"generate\": \"generate\",\n },\n)\n\nmemory = InMemorySaver()\ngraph = builder.compile(checkpointer=memory)"]
},
{
"cell_type": "code",
+2 -2
View File
@@ -44,12 +44,12 @@ If the checkpointer will be used with asynchronous graph execution (i.e. executi
## Usage
```python
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
write_config = {"configurable": {"thread_id": "1", "checkpoint_ns": ""}}
read_config = {"configurable": {"thread_id": "1"}}
checkpointer = MemorySaver()
checkpointer = InMemorySaver()
checkpoint = {
"v": 1,
"ts": "2024-07-31T20:14:19.804150+00:00",
@@ -21,7 +21,7 @@ from langgraph.checkpoint.base import (
from langgraph.checkpoint.serde.types import TASKS, ChannelProtocol
class MemorySaver(
class InMemorySaver(
BaseCheckpointSaver[str], AbstractContextManager, AbstractAsyncContextManager
):
"""An in-memory checkpoint saver.
@@ -29,7 +29,7 @@ class MemorySaver(
This checkpoint saver stores checkpoints in memory using a defaultdict.
Note:
Only use `MemorySaver` for debugging or testing purposes.
Only use `InMemorySaver` for debugging or testing purposes.
For production use cases we recommend installing [langgraph-checkpoint-postgres](https://pypi.org/project/langgraph-checkpoint-postgres/) and using `PostgresSaver` / `AsyncPostgresSaver`.
Args:
@@ -39,7 +39,7 @@ class MemorySaver(
import asyncio
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.graph import StateGraph
builder = StateGraph(int)
@@ -47,7 +47,7 @@ class MemorySaver(
builder.set_entry_point("add_one")
builder.set_finish_point("add_one")
memory = MemorySaver()
memory = InMemorySaver()
graph = builder.compile(checkpointer=memory)
coro = graph.ainvoke(1, {"configurable": {"thread_id": "thread-1"}})
asyncio.run(coro) # Output: 2
@@ -73,7 +73,7 @@ class MemorySaver(
self.storage = defaultdict(lambda: defaultdict(dict))
self.writes = defaultdict(dict)
def __enter__(self) -> "MemorySaver":
def __enter__(self) -> "InMemorySaver":
return self
def __exit__(
@@ -84,7 +84,7 @@ class MemorySaver(
) -> Optional[bool]:
return
async def __aenter__(self) -> "MemorySaver":
async def __aenter__(self) -> "InMemorySaver":
return self
async def __aexit__(
@@ -135,15 +135,17 @@ class MemorySaver(
pending_writes=[
(id, c, self.serde.loads_typed(v)) for id, c, v in writes
],
parent_config={
"configurable": {
"thread_id": thread_id,
"checkpoint_ns": checkpoint_ns,
"checkpoint_id": parent_checkpoint_id,
parent_config=(
{
"configurable": {
"thread_id": thread_id,
"checkpoint_ns": checkpoint_ns,
"checkpoint_id": parent_checkpoint_id,
}
}
}
if parent_checkpoint_id
else None,
if parent_checkpoint_id
else None
),
)
else:
if checkpoints := self.storage[thread_id][checkpoint_ns]:
@@ -176,15 +178,17 @@ class MemorySaver(
pending_writes=[
(id, c, self.serde.loads_typed(v)) for id, c, v in writes
],
parent_config={
"configurable": {
"thread_id": thread_id,
"checkpoint_ns": checkpoint_ns,
"checkpoint_id": parent_checkpoint_id,
parent_config=(
{
"configurable": {
"thread_id": thread_id,
"checkpoint_ns": checkpoint_ns,
"checkpoint_id": parent_checkpoint_id,
}
}
}
if parent_checkpoint_id
else None,
if parent_checkpoint_id
else None
),
)
def list(
@@ -285,15 +289,17 @@ class MemorySaver(
"pending_sends": [self.serde.loads_typed(s) for s in sends],
},
metadata=metadata,
parent_config={
"configurable": {
"thread_id": thread_id,
"checkpoint_ns": checkpoint_ns,
"checkpoint_id": parent_checkpoint_id,
parent_config=(
{
"configurable": {
"thread_id": thread_id,
"checkpoint_ns": checkpoint_ns,
"checkpoint_id": parent_checkpoint_id,
}
}
}
if parent_checkpoint_id
else None,
if parent_checkpoint_id
else None
),
pending_writes=[
(id, c, self.serde.loads_typed(v)) for id, c, v in writes
],
@@ -474,3 +480,6 @@ class MemorySaver(
next_v = current_v + 1
next_h = random.random()
return f"{next_v:032}.{next_h:016}"
MemorySaver = InMemorySaver # Kept for backwards compatibility
@@ -14,7 +14,7 @@ class Item:
Args:
value (dict[str, Any]): The stored data as a dictionary. Keys are filterable.
(str): Unique identifier within the namespace.
key (str): Unique identifier within the namespace.
namespace (tuple[str, ...]): Hierarchical path defining the collection in which this document resides.
Represented as a tuple of strings, allowing for nested categorization.
For example: ("documents", 'user123')
@@ -162,12 +162,19 @@ def _validate_namespace(namespace: tuple[str, ...]) -> None:
if not namespace:
raise InvalidNamespaceError("Namespace cannot be empty.")
for label in namespace:
if not isinstance(label, str):
raise InvalidNamespaceError(
f"Invalid namespace label '{label}' found in {namespace}. Namespace labels"
f" must be strings, but got {type(label).__name__}."
)
if "." in label:
raise InvalidNamespaceError(
f"Invalid namespace label '{label}'. Namespace labels cannot contain periods ('.')."
f"Invalid namespace label '{label}' found in {namespace}. Namespace labels cannot contain periods ('.')."
)
elif not label:
raise InvalidNamespaceError("Namespace labels cannot be empty strings.")
raise InvalidNamespaceError(
f"Namespace labels cannot be empty strings. Got {label} in {namespace}"
)
if namespace[0] == "langgraph":
raise InvalidNamespaceError(
f'Root label for namespace cannot be "langgraph". Got: {namespace}'
+10 -1
View File
@@ -2,7 +2,15 @@ import asyncio
import weakref
from typing import Any, Optional
from langgraph.store.base import BaseStore, GetOp, Item, Op, PutOp, SearchOp
from langgraph.store.base import (
BaseStore,
GetOp,
Item,
Op,
PutOp,
SearchOp,
_validate_namespace,
)
class AsyncBatchedBaseStore(BaseStore):
@@ -46,6 +54,7 @@ class AsyncBatchedBaseStore(BaseStore):
key: str,
value: dict[str, Any],
) -> None:
_validate_namespace(namespace)
fut = self._loop.create_future()
self._aqueue[fut] = PutOp(namespace, key, value)
return await fut
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langgraph-checkpoint"
version = "2.0.0"
version = "2.0.1"
description = "Library with base interfaces for LangGraph checkpoint savers."
authors = []
license = "MIT"
+2 -2
View File
@@ -9,13 +9,13 @@ from langgraph.checkpoint.base import (
create_checkpoint,
empty_checkpoint,
)
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
class TestMemorySaver:
@pytest.fixture(autouse=True)
def setup(self) -> None:
self.memory_saver = MemorySaver()
self.memory_saver = InMemorySaver()
# objects for test setup
self.config_1: RunnableConfig = {
+38
View File
@@ -312,3 +312,41 @@ async def test_cannot_put_empty_namespace() -> None:
assert store.search(("langgraph", "foo"))[0].value == doc
store.delete(("langgraph", "foo"), "bar")
assert store.get(("langgraph", "foo"), "bar") is None
class MockAsyncBatchedStore(AsyncBatchedBaseStore):
def __init__(self):
super().__init__()
self._store = InMemoryStore()
def batch(self, ops: Iterable[Op]) -> list[Result]:
return self._store.batch(ops)
async def abatch(self, ops: Iterable[Op]) -> list[Result]:
return self._store.batch(ops)
async_store = MockAsyncBatchedStore()
doc = {"foo": "bar"}
with pytest.raises(InvalidNamespaceError):
await async_store.aput((), "foo", doc)
with pytest.raises(InvalidNamespaceError):
await async_store.aput(("the", "thing.about"), "foo", doc)
with pytest.raises(InvalidNamespaceError):
await async_store.aput(("some", "fun", ""), "foo", doc)
with pytest.raises(InvalidNamespaceError):
await async_store.aput(("langgraph", "foo"), "bar", doc)
await async_store.aput(("foo", "langgraph", "foo"), "bar", doc)
assert (await async_store.aget(("foo", "langgraph", "foo"), "bar")).value == doc
assert (await async_store.asearch(("foo", "langgraph", "foo")))[0].value == doc
await async_store.adelete(("foo", "langgraph", "foo"), "bar")
assert (await async_store.aget(("foo", "langgraph", "foo"), "bar")) is None
await async_store.abatch([PutOp(("valid", "namespace"), "key", doc)])
assert (await async_store.aget(("valid", "namespace"), "key")).value == doc
assert (await async_store.asearch(("valid", "namespace")))[0].value == doc
await async_store.adelete(("valid", "namespace"), "key")
assert (await async_store.aget(("valid", "namespace"), "key")) is None
+3 -3
View File
@@ -60,7 +60,7 @@ from typing import Annotated, Literal, TypedDict
from langchain_core.messages import HumanMessage
from langchain_anthropic import ChatAnthropic
from langchain_core.tools import tool
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.graph import END, START, StateGraph, MessagesState
from langgraph.prebuilt import ToolNode
@@ -125,7 +125,7 @@ workflow.add_conditional_edges(
workflow.add_edge("tools", 'agent')
# Initialize memory to persist state between graph runs
checkpointer = MemorySaver()
checkpointer = InMemorySaver()
# Finally, we compile it!
# This compiles it into a LangChain Runnable,
@@ -201,7 +201,7 @@ final_state["messages"][-1].content
<summary>Compile the graph.</summary>
- When we compile the graph, we turn it into a LangChain [Runnable](https://python.langchain.com/v0.2/docs/concepts/#runnable-interface), which automatically enables calling `.invoke()`, `.stream()` and `.batch()` with your inputs
- We can also optionally pass checkpointer object for persisting state between graph runs, and enabling memory, human-in-the-loop workflows, time travel and more. In our case we use `MemorySaver` - a simple in-memory checkpointer
- We can also optionally pass checkpointer object for persisting state between graph runs, and enabling memory, human-in-the-loop workflows, time travel and more. In our case we use `InMemorySaver` - a simple in-memory checkpointer
</details>
6. <details>
+15 -15
View File
@@ -8,7 +8,7 @@ from uvloop import new_event_loop
from bench.fanout_to_subgraph import fanout_to_subgraph, fanout_to_subgraph_sync
from bench.react_agent import react_agent
from bench.wide_state import wide_state
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.pregel import Pregel
@@ -55,8 +55,8 @@ benchmarks = (
),
(
"fanout_to_subgraph_10x_checkpoint",
fanout_to_subgraph().compile(checkpointer=MemorySaver()),
fanout_to_subgraph_sync().compile(checkpointer=MemorySaver()),
fanout_to_subgraph().compile(checkpointer=InMemorySaver()),
fanout_to_subgraph_sync().compile(checkpointer=InMemorySaver()),
{
"subjects": [
random.choices("abcdefghijklmnopqrstuvwxyz", k=1000) for _ in range(10)
@@ -75,8 +75,8 @@ benchmarks = (
),
(
"fanout_to_subgraph_100x_checkpoint",
fanout_to_subgraph().compile(checkpointer=MemorySaver()),
fanout_to_subgraph_sync().compile(checkpointer=MemorySaver()),
fanout_to_subgraph().compile(checkpointer=InMemorySaver()),
fanout_to_subgraph_sync().compile(checkpointer=InMemorySaver()),
{
"subjects": [
random.choices("abcdefghijklmnopqrstuvwxyz", k=1000) for _ in range(100)
@@ -91,8 +91,8 @@ benchmarks = (
),
(
"react_agent_10x_checkpoint",
react_agent(10, checkpointer=MemorySaver()),
react_agent(10, checkpointer=MemorySaver()),
react_agent(10, checkpointer=InMemorySaver()),
react_agent(10, checkpointer=InMemorySaver()),
{"messages": [HumanMessage("hi?")]},
),
(
@@ -103,8 +103,8 @@ benchmarks = (
),
(
"react_agent_100x_checkpoint",
react_agent(100, checkpointer=MemorySaver()),
react_agent(100, checkpointer=MemorySaver()),
react_agent(100, checkpointer=InMemorySaver()),
react_agent(100, checkpointer=InMemorySaver()),
{"messages": [HumanMessage("hi?")]},
),
(
@@ -125,8 +125,8 @@ benchmarks = (
),
(
"wide_state_25x300_checkpoint",
wide_state(300).compile(checkpointer=MemorySaver()),
wide_state(300).compile(checkpointer=MemorySaver()),
wide_state(300).compile(checkpointer=InMemorySaver()),
wide_state(300).compile(checkpointer=InMemorySaver()),
{
"messages": [
{
@@ -157,8 +157,8 @@ benchmarks = (
),
(
"wide_state_15x600_checkpoint",
wide_state(600).compile(checkpointer=MemorySaver()),
wide_state(600).compile(checkpointer=MemorySaver()),
wide_state(600).compile(checkpointer=InMemorySaver()),
wide_state(600).compile(checkpointer=InMemorySaver()),
{
"messages": [
{
@@ -189,8 +189,8 @@ benchmarks = (
),
(
"wide_state_9x1200_checkpoint",
wide_state(1200).compile(checkpointer=MemorySaver()),
wide_state(1200).compile(checkpointer=MemorySaver()),
wide_state(1200).compile(checkpointer=InMemorySaver()),
wide_state(1200).compile(checkpointer=InMemorySaver()),
{
"messages": [
{
+2 -2
View File
@@ -107,9 +107,9 @@ if __name__ == "__main__":
import uvloop
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
graph = fanout_to_subgraph().compile(checkpointer=MemorySaver())
graph = fanout_to_subgraph().compile(checkpointer=InMemorySaver())
input = {
"subjects": [
random.choices("abcdefghijklmnopqrstuvwxyz", k=1000) for _ in range(1000)
+2 -2
View File
@@ -68,9 +68,9 @@ if __name__ == "__main__":
import uvloop
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
graph = react_agent(100, checkpointer=MemorySaver())
graph = react_agent(100, checkpointer=InMemorySaver())
input = {"messages": [HumanMessage("hi?")]}
config = {"configurable": {"thread_id": "1"}, "recursion_limit": 20000000000}
+2 -2
View File
@@ -116,9 +116,9 @@ if __name__ == "__main__":
import uvloop
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
graph = wide_state(1000).compile(checkpointer=MemorySaver())
graph = wide_state(1000).compile(checkpointer=InMemorySaver())
input = {
"messages": [
{
+1 -1
View File
@@ -90,7 +90,7 @@ class StateGraph(Graph):
Examples:
>>> from langchain_core.runnables import RunnableConfig
>>> from typing_extensions import Annotated, TypedDict
>>> from langgraph.checkpoint.memory import MemorySaver
>>> from langgraph.checkpoint.memory import InMemorySaver
>>> from langgraph.graph import StateGraph
>>>
>>> def reducer(a: list, b: int | None) -> list:
@@ -1,4 +1,3 @@
import inspect
from typing import Callable, Literal, Optional, Sequence, Type, TypeVar, Union, cast
from langchain_core.language_models import BaseChatModel, LanguageModelLike
@@ -7,7 +6,6 @@ from langchain_core.runnables import (
Runnable,
RunnableBinding,
RunnableConfig,
RunnableLambda,
)
from langchain_core.tools import BaseTool
from typing_extensions import Annotated, TypedDict
@@ -61,24 +59,24 @@ def _get_state_modifier_runnable(
) -> Runnable:
state_modifier_runnable: Runnable
if state_modifier is None:
state_modifier_runnable = RunnableLambda(
lambda state, **kwargs: state["messages"], name=STATE_MODIFIER_RUNNABLE_NAME
state_modifier_runnable = RunnableCallable(
lambda state: state["messages"], name=STATE_MODIFIER_RUNNABLE_NAME
)
elif isinstance(state_modifier, str):
_system_message: BaseMessage = SystemMessage(content=state_modifier)
state_modifier_runnable = RunnableLambda(
lambda state, **kwargs: [_system_message] + state["messages"],
state_modifier_runnable = RunnableCallable(
lambda state: [_system_message] + state["messages"],
name=STATE_MODIFIER_RUNNABLE_NAME,
)
elif isinstance(state_modifier, SystemMessage):
state_modifier_runnable = RunnableLambda(
lambda state, **kwargs: [state_modifier] + state["messages"],
state_modifier_runnable = RunnableCallable(
lambda state: [state_modifier] + state["messages"],
name=STATE_MODIFIER_RUNNABLE_NAME,
)
elif callable(state_modifier):
# Inspect the state_modifier signature
state_modifier_runnable = RunnableCallable(
state_modifier, name=STATE_MODIFIER_RUNNABLE_NAME, trace=True
state_modifier,
name=STATE_MODIFIER_RUNNABLE_NAME,
)
elif isinstance(state_modifier, Runnable):
state_modifier_runnable = state_modifier
@@ -264,12 +262,11 @@ def create_react_agent(
```pycon
>>> from datetime import datetime
>>> from langchain_core.tools import tool
>>> from langchain_openai import ChatOpenAI
>>> from langgraph.prebuilt import create_react_agent
>>>
>>> @tool
... def check_weather(location: str, at_time: datetime | None = None) -> float:
... def check_weather(location: str, at_time: datetime | None = None) -> str:
... '''Return the weather forecast for the specified location.'''
... return f"It's always sunny in {location}"
>>>
@@ -332,11 +329,11 @@ def create_react_agent(
... ("placeholder", "{messages}"),
... ("user", "Remember, always be polite!"),
... ])
>>> def modify_state_messages(state: AgentState):
>>> def format_for_model(state: AgentState):
... # You can do more complex modifications here
... return prompt.invoke({"messages": state["messages"]})
>>>
>>> graph = create_react_agent(model, tools, state_modifier=modify_state_messages)
>>> graph = create_react_agent(model, tools, state_modifier=format_for_model)
>>> inputs = {"messages": [("user", "What's your name? And what's the weather in SF?")]}
>>> for s in graph.stream(inputs, stream_mode="values"):
... message = s["messages"][-1]
@@ -372,11 +369,11 @@ def create_react_agent(
... message.pretty_print()
```
Add "chat memory" to the graph:
Add thread-level "chat memory" to the graph:
```pycon
>>> from langgraph.checkpoint.memory import MemorySaver
>>> graph = create_react_agent(model, tools, checkpointer=MemorySaver())
>>> from langgraph.checkpoint.memory import InMemorySaver
>>> graph = create_react_agent(model, tools, checkpointer=InMemorySaver())
>>> config = {"configurable": {"thread_id": "thread-1"}}
>>> def print_stream(graph, inputs, config):
... for s in graph.stream(inputs, config, stream_mode="values"):
@@ -411,16 +408,9 @@ def create_react_agent(
```pycon
>>> graph = create_react_agent(
... model, tools, interrupt_before=["tools"], checkpointer=MemorySaver()
... model, tools, interrupt_before=["tools"], checkpointer=InMemorySaver()
>>> )
>>> config = {"configurable": {"thread_id": "thread-1"}}
>>> def print_stream(graph, inputs, config):
... for s in graph.stream(inputs, config, stream_mode="values"):
... message = s["messages"][-1]
... if isinstance(message, tuple):
... print(message)
... else:
... message.pretty_print()
>>> inputs = {"messages": [("user", "What's the weather in SF?")]}
>>> print_stream(graph, inputs, config)
@@ -429,11 +419,62 @@ def create_react_agent(
>>> print_stream(graph, None, config)
```
Add cross-thread memory to the graph:
```pycon
>>> from langgraph.prebuilt import InjectedStore
>>> from langgraph.store.base import BaseStore
>>> def save_memory(memory: str, *, config: RunnableConfig, store: Annotated[BaseStore, InjectedStore()]) -> str:
... '''Save the given memory for the current user.'''
... # This is a **tool** the model can use to save memories to storage
... user_id = config.get("configurable", {}).get("user_id")
... namespace = ("memories", user_id)
... store.put(namespace, f"memory_{len(store.search(namespace))}", {"data": memory})
... return f"Saved memory: {memory}"
>>> def prepare_model_inputs(state: AgentState, config: RunnableConfig, store: BaseStore):
... # Retrieve user memories and add them to the system message
... # This function is called **every time** the model is prompted. It converts the state to a prompt
... user_id = config.get("configurable", {}).get("user_id")
... namespace = ("memories", user_id)
... memories = [m.value["data"] for m in store.search(namespace)]
... system_msg = f"User memories: {', '.join(memories)}"
... return [{"role": "system", "content": system_msg)] + state["messages"]
>>> from langgraph.checkpoint.memory import InMemorySaver
>>> from langgraph.store.memory import InMemoryStore
>>> store = InMemoryStore()
>>> graph = create_react_agent(model, [save_memory], state_modifier=prepare_model_inputs, store=store, checkpointer=InMemorySaver())
>>> config = {"configurable": {"thread_id": "thread-1", "user_id": "1"}}
>>> inputs = {"messages": [("user", "Hey I'm Will, how's it going?")]}
>>> print_stream(graph, inputs, config)
('user', "Hey I'm Will, how's it going?")
================================== Ai Message ==================================
Hello Will! It's nice to meet you. I'm doing well, thank you for asking. How are you doing today?
>>> inputs2 = {"messages": [("user", "I like to bike")]}
>>> print_stream(graph, inputs2, config)
================================ Human Message =================================
I like to bike
================================== Ai Message ==================================
That's great to hear, Will! Biking is an excellent hobby and form of exercise. It's a fun way to stay active and explore your surroundings. Do you have any favorite biking routes or trails you enjoy? Or perhaps you're into a specific type of biking, like mountain biking or road cycling?
>>> config = {"configurable": {"thread_id": "thread-2", "user_id": "1"}}
>>> inputs3 = {"messages": [("user", "Hi there! Remember me?")]}
>>> print_stream(graph, inputs3, config)
================================ Human Message =================================
Hi there! Remember me?
================================== Ai Message ==================================
User memories:
Hello! Of course, I remember you, Will! You mentioned earlier that you like to bike. It's great to hear from you again. How have you been? Have you been on any interesting bike rides lately?
```
Add a timeout for a given step:
```pycon
>>> import time
>>> @tool
... def check_weather(location: str, at_time: datetime | None = None) -> float:
... '''Return the weather forecast for the specified location.'''
... time.sleep(2)
@@ -486,13 +527,8 @@ def create_react_agent(
model_runnable = preprocessor | model
# Define the function that calls the model
def call_model(
state: AgentState, config: RunnableConfig, *, store: BaseStore
) -> AgentState:
if store is not None:
response = model_runnable.invoke(state, config, store=store)
else:
response = model_runnable.invoke(state, config)
def call_model(state: AgentState, config: RunnableConfig) -> AgentState:
response = model_runnable.invoke(state, config)
if (
state["is_last_step"]
and isinstance(response, AIMessage)
@@ -509,13 +545,8 @@ def create_react_agent(
# We return a list, because this will get added to the existing list
return {"messages": [response]}
async def acall_model(
state: AgentState, config: RunnableConfig, *, store: BaseStore
) -> AgentState:
if store is not None:
response = await model_runnable.ainvoke(state, config, store=store)
else:
response = await model_runnable.ainvoke(state, config)
async def acall_model(state: AgentState, config: RunnableConfig) -> AgentState:
response = await model_runnable.ainvoke(state, config)
if (
state["is_last_step"]
and isinstance(response, AIMessage)
+4 -4
View File
@@ -12,7 +12,7 @@ from langgraph.checkpoint.base import (
SerializerProtocol,
copy_checkpoint,
)
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
class NoopSerializer(SerializerProtocol):
@@ -23,7 +23,7 @@ class NoopSerializer(SerializerProtocol):
return "type", obj
class MemorySaverAssertImmutable(MemorySaver):
class MemorySaverAssertImmutable(InMemorySaver):
storage_for_copies: defaultdict[str, dict[str, dict[str, Checkpoint]]]
def __init__(
@@ -64,7 +64,7 @@ class MemorySaverAssertImmutable(MemorySaver):
return super().put(config, checkpoint, metadata, new_versions)
class MemorySaverAssertCheckpointMetadata(MemorySaver):
class MemorySaverAssertCheckpointMetadata(InMemorySaver):
"""This custom checkpointer is for verifying that a run's configurable
fields are merged with the previous checkpoint config for each step in
the run. This is the desired behavior. Because the checkpointer's (a)put()
@@ -119,7 +119,7 @@ class MemorySaverAssertCheckpointMetadata(MemorySaver):
)
class MemorySaverNoPending(MemorySaver):
class MemorySaverNoPending(InMemorySaver):
def get_tuple(self, config: RunnableConfig) -> Optional[CheckpointTuple]:
result = super().get_tuple(config)
if result:
+38
View File
@@ -272,6 +272,44 @@ def test_runnable_state_modifier():
assert response == expected_response
def test_state_modifier_with_store():
def add(a: int, b: int):
"""Adds a and b"""
return a + b
in_memory_store = InMemoryStore()
in_memory_store.put(("memories", "1"), "user_name", {"data": "User name is Alice"})
in_memory_store.put(("memories", "2"), "user_name", {"data": "User name is Bob"})
def modify(state, config, *, store):
user_id = config["configurable"]["user_id"]
system_str = store.get(("memories", user_id), "user_name").value["data"]
return [SystemMessage(system_str)] + state["messages"]
def modify_no_store(state, config):
return SystemMessage("foo") + state["messages"]
model = FakeToolCallingModel()
# test state modifier that uses store works
agent = create_react_agent(
model, [add], state_modifier=modify, store=in_memory_store
)
response = agent.invoke(
{"messages": [("user", "hi")]}, {"configurable": {"user_id": "1"}}
)
assert response["messages"][-1].content == "User name is Alice-hi"
# test state modifier that doesn't use store works
agent = create_react_agent(
model, [add], state_modifier=modify_no_store, store=in_memory_store
)
response = agent.invoke(
{"messages": [("user", "hi")]}, {"configurable": {"user_id": "2"}}
)
assert response["messages"][-1].content == "foo-hi"
@pytest.mark.parametrize("tool_style", ["openai", "anthropic"])
def test_model_with_tools(tool_style: str):
model = FakeToolCallingModel(tool_style=tool_style)
+7 -7
View File
@@ -53,7 +53,7 @@ from langgraph.checkpoint.base import (
CheckpointMetadata,
CheckpointTuple,
)
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.constants import ERROR, PULL, PUSH
from langgraph.errors import InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt
from langgraph.graph import END, Graph
@@ -268,11 +268,11 @@ def test_graph_validation() -> None:
def test_checkpoint_errors() -> None:
class FaultyGetCheckpointer(MemorySaver):
class FaultyGetCheckpointer(InMemorySaver):
def get_tuple(self, config: RunnableConfig) -> Optional[CheckpointTuple]:
raise ValueError("Faulty get_tuple")
class FaultyPutCheckpointer(MemorySaver):
class FaultyPutCheckpointer(InMemorySaver):
def put(
self,
config: RunnableConfig,
@@ -282,13 +282,13 @@ def test_checkpoint_errors() -> None:
) -> RunnableConfig:
raise ValueError("Faulty put")
class FaultyPutWritesCheckpointer(MemorySaver):
class FaultyPutWritesCheckpointer(InMemorySaver):
def put_writes(
self, config: RunnableConfig, writes: List[Tuple[str, Any]], task_id: str
) -> RunnableConfig:
raise ValueError("Faulty put_writes")
class FaultyVersionCheckpointer(MemorySaver):
class FaultyVersionCheckpointer(InMemorySaver):
def get_next_version(self, current: Optional[int], channel: BaseChannel) -> int:
raise ValueError("Faulty get_next_version")
@@ -11250,7 +11250,7 @@ def test_xray_lance(snapshot: SnapshotAssertion):
interview_builder.add_conditional_edges("answer_question", route_messages)
# Set up memory
memory = MemorySaver()
memory = InMemorySaver()
# Interview
interview_graph = interview_builder.compile(checkpointer=memory).with_config(
@@ -11478,7 +11478,7 @@ def test_subgraph_retries():
parent.add_edge("parent_node", "child_graph")
parent.set_entry_point("parent_node")
checkpointer = MemorySaver()
checkpointer = InMemorySaver()
app = parent.compile(checkpointer=checkpointer)
with pytest.raises(RandomError):
app.invoke({"count": 0}, {"configurable": {"thread_id": "foo"}})
+5 -5
View File
@@ -49,7 +49,7 @@ from langgraph.checkpoint.base import (
CheckpointMetadata,
CheckpointTuple,
)
from langgraph.checkpoint.memory import MemorySaver
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.constants import ERROR, PULL, PUSH
from langgraph.errors import InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt
from langgraph.graph import END, Graph, StateGraph
@@ -89,11 +89,11 @@ pytestmark = pytest.mark.anyio
async def test_checkpoint_errors() -> None:
class FaultyGetCheckpointer(MemorySaver):
class FaultyGetCheckpointer(InMemorySaver):
async def aget_tuple(self, config: RunnableConfig) -> Optional[CheckpointTuple]:
raise ValueError("Faulty get_tuple")
class FaultyPutCheckpointer(MemorySaver):
class FaultyPutCheckpointer(InMemorySaver):
async def aput(
self,
config: RunnableConfig,
@@ -103,13 +103,13 @@ async def test_checkpoint_errors() -> None:
) -> RunnableConfig:
raise ValueError("Faulty put")
class FaultyPutWritesCheckpointer(MemorySaver):
class FaultyPutWritesCheckpointer(InMemorySaver):
async def aput_writes(
self, config: RunnableConfig, writes: List[Tuple[str, Any]], task_id: str
) -> RunnableConfig:
raise ValueError("Faulty put_writes")
class FaultyVersionCheckpointer(MemorySaver):
class FaultyVersionCheckpointer(InMemorySaver):
def get_next_version(self, current: Optional[int], channel: BaseChannel) -> int:
raise ValueError("Faulty get_next_version")
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@langchain/langgraph-sdk",
"version": "0.0.14",
"version": "0.0.15",
"description": "Client library for interacting with the LangGraph API",
"type": "module",
"packageManager": "yarn@1.22.19",

Some files were not shown because too many files have changed in this diff Show More