langgraph 0.1.10
Summary of Changes
- Added
InjectedStatefor automatically injecting graph state into tool arguments inToolNode#1067 - Improved parallel execution of tools in
ToolNodeusing config lists #1066 - Refactored the internal Pregel graph processing engine for better performance and maintainability
- Enhanced checkpoint management with improved parent-child relationship handling
- Added new error classes for better handling of graph interruptions and empty inputs
- Improved comparison logic for
BinaryOperatorAggregateto handle lambda operators - Significantly enhanced documentation in checkpoint-related classes
Detailed Changes
langgraph.prebuilt.tool_node.InjectedState
- Added new
InjectedStateclass that allows automatically injecting graph state into tool arguments #1067 - Enables tools to access specific parts of graph state without requiring models to generate them
- Similar to
InjectedToolArgbut specifically for accessing graph state
langgraph.prebuilt.tool_node.ToolNode
- Refactored
ToolNodeimplementation to improve code organization and maintainability #1066 - Added support for parallel tool execution using
get_config_listfrom langchain-core - Split functionality into smaller methods (
_run_one,_arun_one,_parse_input, etc.) - Added state injection capability for tools that use the
InjectedStateannotation #1067
langgraph.channels.binop.BinaryOperatorAggregate
- Improved equality comparison to better handle lambda operators
- Fixed comparison logic to avoid false negatives when comparing instances with lambda functions
langgraph.checkpoint
- Enhanced documentation across checkpoint implementations (Memory, SQLite, AsyncSQLite)
- Improved typing and documentation for
CheckpointMetadataand related classes - Added better parent-child relationship tracking in checkpoints for nested graphs
- Enhanced checkpoint tuple to include parent configuration data
langgraph.errors
- Added
GraphInterruptclass for handling interruptions in nested graphs - Added
EmptyInputErrorfor better error reporting when graphs receive empty inputs
langgraph.pregel
- Significantly refactored the Pregel graph processing engine for better maintainability
- Split functionality into focused modules like
algo.pyandloop.py - Improved handling of interruptions in nested graphs
- Enhanced the
BackgroundExecutorandAsyncBackgroundExecutorclasses for better resource management - Added better checkpointing behavior, especially for nested graphs