From 437ec53e29cde0da65a01040985587930b8387a1 Mon Sep 17 00:00:00 2001 From: Hrishikesh Kalola <97169623+hrishi-008@users.noreply.github.com> Date: Thu, 2 Jan 2025 22:43:42 +0530 Subject: [PATCH] langchain.agents: corrected documentation (#28986) **Description:** This PR updates the codebase to reflect the deprecation of the AgentType feature. It includes the following changes: Documentation Update: Added a deprecation notice to the AgentType class comment. Provided a reference to the official LangChain migration guide for transitioning to LangGraph agents. Reference Link: https://python.langchain.com/docs/how_to/migrate_agent/ **Twitter handle:** @hrrrriiiishhhhh --------- Co-authored-by: Chester Curme --- libs/langchain/langchain/_api/deprecation.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/langchain/langchain/_api/deprecation.py b/libs/langchain/langchain/_api/deprecation.py index ecd5a71b896..6d5f2cf6895 100644 --- a/libs/langchain/langchain/_api/deprecation.py +++ b/libs/langchain/langchain/_api/deprecation.py @@ -11,11 +11,13 @@ 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 " "full-featured framework for building agents, including support for " - "tool-calling, persistence of state, and human-in-the-loop workflows. See " - "LangGraph documentation for more details: " - "https://langchain-ai.github.io/langgraph/. Refer here for its pre-built " - "ReAct agent: " - "https://langchain-ai.github.io/langgraph/how-tos/create-react-agent/" + "tool-calling, persistence of state, and human-in-the-loop workflows. For " + "details, refer to the " + "`LangGraph documentation `_" + " as well as guides for " + "`Migrating from AgentExecutor `_" # noqa: E501 + " and LangGraph's " + "`Pre-built ReAct agent `_." # noqa: E501 )