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 <chester.curme@gmail.com>
This commit is contained in:
Hrishikesh Kalola 2025-01-02 22:43:42 +05:30 committed by GitHub
parent 308825a6d5
commit 437ec53e29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 <https://langchain-ai.github.io/langgraph/>`_"
" as well as guides for "
"`Migrating from AgentExecutor <https://python.langchain.com/docs/how_to/migrate_agent/>`_" # noqa: E501
" and LangGraph's "
"`Pre-built ReAct agent <https://langchain-ai.github.io/langgraph/how-tos/create-react-agent/>`_." # noqa: E501
)