LangGraph v0.3
prebuilt module was moved into a separate package (langgraph-prebuilt) bundled with langgraph
langgraph-prebuiltis a default dependency oflanggraph- no user action needed- this change will allows us to grow our prebuilt offerings without changes to the core
langgraphlibrary
Since langgraph-prebuilt is implemented as namespace package, you can import all of the prebuilt components (e.g., create_react_agent, ToolNode, etc) the same way as before:
from langgraph.prebuilt import create_react_agent, ToolNodeDeprecations:
Removed in v0.3:
langgraph.prebuilt.tool_executor(ToolInvocation/ToolExecutor)- uselanggraph.prebuilt.tool_node.ToolNodeinsteadmessages_modifierparameter forcreate_react_agent- usepromptinstead