I trying out LangChain for my project,but most of the documentation and blogs use classic version LangChain 1.1.3 and I am confused about what the replacement is for agent creation APIs.
What worked before 1.0
Before the 1.0 update:
from langchain.agents import create_react_agent, AgentExecutor
Later examples suggested:
from langchain.agents import create_tool_calling_agent
Both approaches no longer work in LangChain 1.1.3.
What I tried in LangChain 1.1.3
from langchain.agents import create_tool_calling_agent
# ImportError: cannot import name 'create_tool_calling_agent'
from langchain.agents.tool_calling import create_tool_calling_agent
# ModuleNotFoundError: No module named 'langchain.agents.tool_calling'
So neither create_react_agent nor create_tool_calling_agent appear to exist in 1.1.3.
My current environment
Python: 3.12
LangChain: 1.1.3
LLM:
ChatGoogleGenerativeAI(Gemini)Using tools + retrieval (RAG)
**What is the official replacement in LangChain ≥1.0 for agent creation?
Is Downgrading my only option**