feat: Interrupt for low coded CAS agents [JAR-9208]#641
feat: Interrupt for low coded CAS agents [JAR-9208]#641JoshParkSJ wants to merge 3 commits intomainfrom
Conversation
1431778 to
ebbf522
Compare
| approved_args: dict[str, Any] | None = None | ||
|
|
||
| def annotate_result(self, output: dict[str, Any] | Any) -> None: | ||
| """Apply confirmation metadata to a tool result message.""" |
There was a problem hiding this comment.
adding metadata to tool response to fix a bug where the agent kept retrying the tool - see discussion here with applied sciences team / @bai-uipath
| confirmation.annotate_result(output) | ||
| return output | ||
| except GraphBubbleUp: | ||
| raise |
There was a problem hiding this comment.
Fixes durable_interrupt tools like RPA tools (durable_interrupt was introduced 2w ago). This only broke for conversational agents because convo agents set handle_tool_errors=True which catches generic exceptions (like GraphInterrupt/GraphBubbleUp) and converts it into an error ToolMessage (since we want to convey to user something went wrong instead of just crashing on exceptions)
By raising GraphBubbleUp before the generic handler, the interrupt properly bubbles up to Langgraph, pauses execution, saves the checkpoint - and allows the tool to resume
changes
startToolCallnotes