Skip to content

Commit d6f0e16

Browse files
committed
Update LangGraph notebook agent factory
1 parent 5edf5c2 commit d6f0e16

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

langgraph/couchbase_persistence_langgraph.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"\n",
6262
"Set `OPENAI_API_KEY` before running. For local Couchbase runs, this notebook also reads `CB_CONN_STR`, `CB_USER`, `CB_PASS`, `CB_BUCKET_NAME`, and `CB_SCOPE_NAME` from the environment.\n",
6363
"\n",
64-
"For the local example below, create bucket `test`, scope `langgraph`, and the `checkpoints` / `checkpoint_writes` collections first, or provide equivalent names through the environment variables.\n"
64+
"For the local example below, create bucket `test`, scope `langgraph`, and the `checkpoints` / `checkpoint_writes` collections first, or provide equivalent names through the environment variables. The default `CB_*` values shown later are for local development only.\n"
6565
]
6666
},
6767
{
@@ -134,7 +134,7 @@
134134
"from typing import Literal\n",
135135
"from langchain_core.tools import tool\n",
136136
"from langchain_openai import ChatOpenAI\n",
137-
"from langgraph.prebuilt import create_react_agent\n",
137+
"from langchain.agents import create_agent\n",
138138
"\n",
139139
"\n",
140140
"@tool\n",
@@ -188,7 +188,7 @@
188188
" bucket_name=CB_BUCKET_NAME,\n",
189189
" scope_name=CB_SCOPE_NAME,\n",
190190
") as checkpointer:\n",
191-
" graph = create_react_agent(model, tools=tools, checkpointer=checkpointer)\n",
191+
" graph = create_agent(model, tools=tools, checkpointer=checkpointer)\n",
192192
" config = {\"configurable\": {\"thread_id\": \"1\"}}\n",
193193
" res = graph.invoke({\"messages\": [(\"human\", \"what's the weather in sf\")]}, config)\n",
194194
" \n",
@@ -319,7 +319,7 @@
319319
" bucket_name=CB_BUCKET_NAME,\n",
320320
" scope_name=CB_SCOPE_NAME,\n",
321321
") as checkpointer:\n",
322-
" graph = create_react_agent(model, tools=tools, checkpointer=checkpointer)\n",
322+
" graph = create_agent(model, tools=tools, checkpointer=checkpointer)\n",
323323
" config = {\"configurable\": {\"thread_id\": \"2\"}}\n",
324324
" res = await graph.ainvoke(\n",
325325
" {\"messages\": [(\"human\", \"what's the weather in nyc\")]}, config\n",

0 commit comments

Comments
 (0)