docs(langchain-classic): warn about older create_react_agent (#35052)

This commit is contained in:
Mason Daugherty
2026-02-06 15:22:14 -05:00
committed by GitHub
parent 01692c9cd9
commit 751d8957ea
6 changed files with 16 additions and 13 deletions

View File

@@ -7,6 +7,7 @@ from langchain_core._api.deprecation import (
warn_deprecated,
)
# TODO: this is old, fix
AGENT_DEPRECATION_WARNING = (
"LangChain agents will continue to be supported, but it is recommended for new "
"use cases to be built with LangGraph. LangGraph offers a more flexible and "

View File

@@ -28,13 +28,16 @@ def create_react_agent(
(https://arxiv.org/abs/2210.03629)
!!! warning
This implementation is based on the foundational ReAct paper but is older and
not well-suited for production applications.
For a more robust and feature-rich implementation, we recommend using the
`create_react_agent` function from the LangGraph library.
See the
[reference doc](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent)
for more information.
This implementation is based on the foundational ReAct paper but is older and
not well-suited for production applications.
For a more robust and feature-rich implementation, we recommend using the
`create_agent` function from the `langchain` library.
See the
[reference doc](https://reference.langchain.com/python/langchain/agents/)
for more information.
Args:
llm: LLM to use as the agent.

View File

@@ -68,7 +68,7 @@ def _load_question_to_checked_assertions_chain(
message=(
"See LangGraph guides for a variety of self-reflection and corrective "
"strategies for question-answering and other tasks: "
"https://langchain-ai.github.io/langgraph/tutorials/rag/langgraph_self_rag/"
"https://docs.langchain.com/oss/python/langchain/overview"
),
removal="1.0",
)

View File

@@ -73,7 +73,7 @@ def _load_sequential_chain(
message=(
"See LangGraph guides for a variety of self-reflection and corrective "
"strategies for question-answering and other tasks: "
"https://langchain-ai.github.io/langgraph/tutorials/rag/langgraph_self_rag/"
"https://docs.langchain.com/oss/python/langgraph/agentic-rag"
),
removal="1.0",
)

View File

@@ -32,9 +32,8 @@ from langchain_classic.chains.llm import LLMChain
removal="1.0",
message=(
"Refer to migration guide here for a recommended implementation using "
"LangGraph: https://python.langchain.com/docs/versions/migrating_chains/map_reduce_chain/"
". See also LangGraph guides for map-reduce: "
"https://langchain-ai.github.io/langgraph/how-tos/map-reduce/."
"LangGraph: https://docs.langchain.com/oss/python/langgraph/graph-api#map-reduce-and-the-send-api"
"."
),
)
class MapReduceChain(Chain):

View File

@@ -21,7 +21,7 @@ from langchain_classic.memory.prompt import SUMMARY_PROMPT
removal="1.0",
message=(
"Refer here for how to incorporate summaries of conversation history: "
"https://langchain-ai.github.io/langgraph/how-tos/memory/add-summary-conversation-history/"
"https://docs.langchain.com/oss/python/langgraph/add-memory#summarize-messages"
),
)
class SummarizerMixin(BaseModel):