langgraph 0.2.15
Summary of Changes
- Fixed edge case in
StateGraphto allow connecting directly to theENDnode without having to add it explicitly first (#1478) - Enhanced
create_react_agentto accept aToolNodeinstance directly, enabling reuse of tool configurations (#1451) - Improved JSON serialization of tool outputs to properly handle non-ASCII characters (#1505)
Detailed Changes
langgraph.graph.state.StateGraph
- Fixed an edge case in
add_edgemethod to allow connecting directly to theENDnode without having to add it explicitly first. This makes the API more consistent sinceENDis a reserved key, not a regular node. (#1478)
langgraph.prebuilt.chat_agent_executor.create_react_agent
- Enhanced the function to accept a
ToolNodeinstance directly in addition toToolExecutoror a list of tools - This allows reusing an existing
ToolNodeconfiguration when creating a new agent, making workflows more modular (#1451) - Updated internal logic to properly extract tool classes from the provided
ToolNodewhen needed
langgraph.prebuilt.tool_node
- Improved
str_outputfunction to properly handle non-ASCII characters when formatting tool outputs by settingensure_ascii=Falsein JSON serialization (#1505) - This ensures better display of international characters, emojis, and other non-ASCII content in tool results