create_react_agent (Deprecated)
DEPRECATED in LangGraph v1. Use create_agent from langchain.agents instead — simpler interface, middleware support, and the same LangGraph runtime under the hood.
Quick Reference
- →DEPRECATED: create_react_agent from langgraph.prebuilt is deprecated in LangGraph v1
- →NEW STANDARD: from langchain.agents import create_agent
- →create_agent is built on LangGraph — same checkpointing, streaming, and HITL support
- →create_agent adds middleware for message management, PII filtering, and guardrails
- →Migration: replace create_react_agent(model, tools) with create_agent(model, tools)
Deprecation Notice
LangGraph v1 deprecates create_react_agent in favor of LangChain's create_agent. The new API is simpler, adds a full middleware system, and is built on the same LangGraph runtime — so checkpointing, streaming, and human-in-the-loop all work identically. Migrate by changing the import: from langchain.agents import create_agent.
The documentation below describes the original create_react_agent API for reference and backward compatibility. For new projects, use create_agent from the langchain.agents module — it provides the same capabilities plus a middleware system for context engineering, message trimming, guardrails, and PII filtering.