Dynamic breakpoints Review We discussed motivations for human-in-the-loop: (1) Approval - We can interrupt our agent, surface state to a user, and allow the user to accept an action (2) Debugging - We can rewind the graph to reproduce or avoid issues (3) Editing - You can modify the state We covered breakpoints as a general way to stop the graph at specific steps, which enables use-cases like Approval We also showed how to edit graph state, and introduce human feedback. Goals Breakpoints are set by the developer on a specific node during graph compilation. But, sometimes it is helpful to allow the graph **dynamically interrupt** itself! This is an internal breakpoint, and can be achieved using NodeInterrupt. This has a few specific benefits: (1) You can do it conditionally (from inside a node based on developer-defined logic). (2) You can communicate to the user why it's interrupted (by passing whatever you want to the NodeInterrupt). Let's create a graph where a NodeInterrupt is thrown based on the length of the input.
Autonomy
Semi-autonomous
Sandbox-aware
No declared sandbox guidance
Network access
Unspecified
Filesystem access
Unspecified
Permissions declared
Not declared
Pattern
Autonomous loop
Models
gpt-4oclaude-3-5-sonnetgpt-3.5-turbo