From f6d95abbe367f7b757b879c4c4a5910c91ed50c1 Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Fri, 6 Feb 2026 15:08:08 -0500 Subject: [PATCH] docs(prebuilt): update warning for `create_react_agent` (#6760) --- libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py index 4076cfa4b..6c11c8847 100644 --- a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py +++ b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py @@ -308,7 +308,13 @@ def create_react_agent( ) -> CompiledStateGraph: """Creates an agent graph that calls tools in a loop until a stopping condition is met. - For more details on using `create_react_agent`, visit [Agents](https://langchain-ai.github.io/langgraph/agents/overview/) documentation. + !!! warning + + This function is deprecated in favor of + [`create_agent`][langchain.agents.create_agent] from the `langchain` + package, which provides an equivalent agent factory with a flexible + middleware system. For migration guidance, see + [Migrating from LangGraph v0](https://docs.langchain.com/oss/python/migrate/langgraph-v1). Args: model: The language model for the agent. Supports static and dynamic