LangChain 1 · Agents and tools
Create an agent
Create an agent that calls tools in a loop until it can answer. This replaces the older create_react_agent.
from langchain.agents import create_agent
agent = create_agent(
model="anthropic:claude-sonnet-5-5",
tools=[get_weather],
system_prompt="You are a helpful assistant.",
)
Official LangChain 1 documentation