Agents
We recommend that you use LangGraph for building agents.
Please see the following resources for more information:
- LangGraph docs for conceptual architecture about Agents
- Pre-built agent in LangGraph
Legacy Agent Concept: AgentExecutorβ
LangChain previously introduced the AgentExecutor
as a runtime for agents.
While it served as an excellent starting point, its limitations became apparent when dealing with more sophisticated and customized agents.
As a result, we're gradually phasing out AgentExecutor
in favor of more flexible solutions in LangGraph.
Transitioning from AgentExecutor to LangGraphβ
If you're currently using AgentExecutor
, don't worry! We've prepared resources to help you:
-
For those who still need to use
AgentExecutor
, we offer a comprehensive guide on how to use AgentExecutor. -
However, we strongly recommend transitioning to LangGraph for improved flexibility and control. To facilitate this transition, we've created a detailed migration guide to help you move from
AgentExecutor
to LangGraph seamlessly.