langgraph 0.3.15
Summary of Changes
- Added more efficient channel availability checks through new
is_available()method on all channel types #3890 - Simplified branch mechanism in StateGraph with unified channel naming #3891
- Improved performance in Pregel task creation and execution #3893
Detailed Changes
langgraph.channels.base.BaseChannel
- Added new
is_available()method to check if a channel has values without having to catch exceptions #3890
All Channel Types
- Refactored all channel implementations to use a
MISSINGsentinel value instead of attribute errors for tracking empty state #3890 - Added efficient
is_available()implementations to:AnyValueBinaryOperatorAggregateDynamicBarrierValueEphemeralValueLastValueNamedBarrierValueTopicUntrackedValue
langgraph.graph.state.StateGraph
- Simplified branch mechanism by using a single universal channel pattern
branch:to:{node}instead of complex channel names #3891 - Improved efficiency by creating a single branch channel for each node rather than one for each potential branch destination #3891
langgraph.pregel.algo
- Improved performance by adding dedicated
checkpoint_null_version()and_triggers()helper functions #3893 - Enhanced task creation efficiency by using
binascii.unhexlifyinstead ofUUIDparsing #3893 - Optimized memory usage with single tuple constant for push triggers instead of creating new lists #3893
- Updated to use the new channel
is_available()method instead of exception handling #3890
langgraph.pregel.io
- Removed
return_exceptionparameter fromread_channel()as it's no longer needed with the new availability checking #3890 - Updated branch channel name handling to use the simplified naming convention #3891
langgraph.types
- Changed
PregelExecutableTask.triggerstype fromlist[str]to more flexibleSequence[str]for better performance #3893