pypi langgraph-sdk 0.2.6

latest releases: 0.4.0, 0.3.15, 0.3.14...
8 months ago

langgraph 0.2.6

Summary of Changes

  • Added structured graph interruption mechanism with timing information (before/during/after) in PR #1354
  • Added a new NodeInterrupt exception for nodes to signal interruption during execution
  • Improved handling of interrupts with full context of when they occurred
  • Added task ID tracking in the configuration system
  • Fixed several bugs related to checkpoint and interrupt handling

Detailed Changes

langgraph.constants.Interrupt

  • Added new Interrupt dataclass to represent structured interruption events with a when field ("before", "during", "after") and an optional value
  • Added CONFIG_KEY_TASK_ID constant for tracking task identifiers

langgraph.errors.GraphInterrupt

  • Enhanced to store a list of Interrupt objects, providing detailed information about interruption events
  • Improved distinction between regular errors and intentional interrupts during execution

langgraph.errors.NodeInterrupt

  • Added new exception class allowing nodes to signal interruption during execution
  • Simplifies raising "during" interrupts from within node logic

langgraph.pregel.algo.should_interrupt

  • Changed return type from boolean to list of executable tasks that should be interrupted
  • Provides more precise control over which tasks get interrupted while maintaining the same criteria

langgraph.pregel.PregelTask

  • Added interrupts field to track interruption events associated with a task
  • Enhances visibility of interruption state for debugging and flow control purposes

langgraph.pregel execution

  • Fixed issues with interrupt propagation between nested graphs
  • Improved checkpoint handling during interrupts
  • Added proper copying of channel versions to avoid unintended mutations
  • Fixed step numbering in update operations
  • Made execution more robust by properly tracking all futures

Don't miss a new langgraph-sdk release

NewReleases is sending notifications on new releases.