langgraph 0.1.9
Summary of Changes
- Fix state graph interrupt handling to properly check all channels for updates #1004
- Add validation to check if nodes exist before updating state #1015
- Improve graph visualization to only create END nodes when needed #1022
- Enhance
ToolNodeto better handle tool errors and invalid tool names #1052 - Add
state_modifierparameter tocreate_react_agentand deprecatemessages_modifier#1023 - Improve background task management with new executor classes #1048
- Add equality comparison support to channel classes #1004
- Add comprehensive documentation to
BaseCheckpointSaver#1057
Detailed Changes
langgraph.prebuilt.tool_node.ToolNode
- Improve error handling for invalid tool calls #1052
- Add descriptive error message when an invalid tool name is requested
- Pass the full tool call information to the tool rather than just the arguments
- Standardize error message formatting through templates
langgraph.prebuilt.chat_agent_executor.create_react_agent
- Add new
state_modifierparameter that provides more control over LLM inputs #1023 - Deprecate
messages_modifierparameter in favor ofstate_modifier - Add support for custom
state_schemato define graph state beyond the defaultAgentState - Refactor preprocessing logic for better flexibility and type safety
langgraph.pregel
- Improve interrupt handling to check all channels for updates #1004
- Add new executor classes for better background task management #1048
- Add
BackgroundExecutorandAsyncBackgroundExecutorclasses for task management - Improve cancellation and cleanup of background tasks
- Validate node existence in
update_stateto prevent errors #1015
langgraph.checkpoint.base.BaseCheckpointSaver
- Add comprehensive documentation to all methods #1057
- Clarify implementation requirements for custom checkpoint savers
- Improve error messages to use "checkpoint saver" instead of "checkpointer"
langgraph.graph.state.StateGraph
- Add support for custom input and output types
- Add retry policies for nodes
- Improve metadata handling for nodes
- Refactor schema handling for better flexibility
langgraph.graph.graph.Graph
- Improve graph visualization to only create END nodes when needed #1022
- Add hint about type hints for conditional edges to improve graph visualization #1035
langgraph.channels
- Add equality comparison support (
__eq__methods) to channel classes - Affected channels: AnyValue, BinaryOperatorAggregate, Context, DynamicBarrierValue, EphemeralValue, LastValue, NamedBarrierValue, Topic
langgraph._api.deprecation
- Add new
deprecated_parameterfunction for marking parameters as deprecated #1023