langgraph 0.1.6
Summary of Changes
- Added support for
RemoveMessagetype from langchain-core, allowing deletion of messages by ID in message graphs #651, #958 - Added error handling for tools in
ToolNodewith a new parameterhandle_tool_errors(defaults to True) #910 - Updated dependency on langchain-core to 0.2.11 #909
- Improved documentation for
create_react_agentwith detailed diagrams and explanations #899 - Fixed example variable name in
create_react_agentdocumentation #896
Detailed Changes
langgraph.graph.message.add_messages
- Added support for
RemoveMessagetype from langchain-core, allowing the ability to delete messages by ID - Initially implemented by removing messages directly at the found index (#651)
- Later improved to collect IDs to remove in a set and filter at the end, preventing issues with index shifts (#958)
- Added validation to raise an error when attempting to delete a message that doesn't exist
langgraph.prebuilt.tool_node
- Added a new parameter
handle_tool_errors(defaults to True) to control error handling behavior - Added try/except blocks around tool invocation in both sync and async implementations
- When errors occur during tool execution and
handle_tool_errorsis True, returns a friendly error message instead of raising an exception - This makes agents more resilient to tool execution failures, allowing the conversation to continue