0.5.0
Breaking Changes📦 langgraphView on GitHub →
⚠ 8 breaking✨ 8 features🐛 6 fixes⚡ 3 deprecations🔧 14 symbols
Summary
LangGraph 0.5 introduces stricter StateGraph schemas, a new NodeBuilder utility, and more granular streaming modes while optimizing checkpoint storage. It serves as a stabilization release ahead of version 1.0, requiring minor API updates for schemas and internal subclassing.
⚠️ Breaking Changes
- state_schema is now mandatory in StateGraph.__init__. If you were only passing input/output schemas, you must now explicitly provide the state_schema.
- PregelNode no longer inherits from Runnable. If you were subclassing PregelNode and relying on Runnable methods, you must update your implementation.
- Removed support for nodes reading a single managed value.
- Removed add_conditional_edge(..., then=) parameter.
- Removed MessageGraph, non-state Graph, and UntrackedValue channel.
- Removed Context channel, SharedValue, and ChannelsManager.
- Removed postgres shallow checkpointer.
- Removed Checkpoint.writes and Checkpoint.pending_sends from the checkpoint structure (auto-migrated on load).
Migration Steps
- Upgrade the package using pip install -U "langgraph>=0.5".
- Update StateGraph initializations to include a mandatory state_schema.
- Rename input to input_schema and output to output_schema in graph definitions.
- If using custom nodes that subclass PregelNode, ensure they do not rely on Runnable inheritance.
- Replace Channel.subscribe_to with NodeBuilder for future-proofing against 1.0.
- Rename retry parameters to retry_policy.
✨ New Features
- New NodeBuilder utility for declarative node creation and channel attachment.
- Granular streaming modes: 'tasks' and 'checkpoints' can now be toggled individually.
- stream_mode='debug' is now an alias for ['tasks', 'checkpoints'].
- JsonPlusSerializer now supports native NumPy array serialization (including Fortran-ordered).
- Added print_mode argument to invoke and stream methods.
- Added task masquerading with update state.
- Automatic migration for legacy 'pending_sends' data in checkpoints.
- Support for same-name channels and nodes in StateGraph.
🐛 Bug Fixes
- Fixed bug where Command(update=) could be ignored if followed by a second interrupt.
- Fixed step_timeout causing ParentCommand/GraphInterrupt exceptions to bubble up incorrectly.
- Fixed async callback manager tag handling.
- Fixed FuturesDict callback execution when GCed.
- Reduced extraneous keys in checkpoint.metadata for smaller storage footprint.
- Fixed dev server makefile pidfile issue.
🔧 Affected Symbols
StateGraphStateGraph.inputStateGraph.outputStateGraph.state_schemaPregelNodeNodeBuilderChannel.subscribe_toJsonPlusSerializerMessageGraphadd_conditional_edgeCheckpoint.pending_sendsCheckpoint.writesChannelsManagerSharedValue⚡ Deprecations
- input and output arguments in StateGraph are deprecated; use input_schema and output_schema instead.
- Channel.subscribe_to is deprecated; use the new NodeBuilder utility instead (removal scheduled for 1.0).
- retry argument is deprecated in favor of retry_policy.