You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m building a multi-agent coordination system using LangGraph.
At the outer level, I have a coordinate-style graph, and each agent inside is created with create_react_agent, with multiple tools configured.
What I want to achieve
I’d like to implement an interrupt → user confirmation → resume flow:
Before calling one specific tool (e.g. a database query or external API call), the agent should pause execution.
The system would then hand over to the user, so they can review/modify the tool input parameters.
Once confirmed, the agent continues execution as normal.
What I’ve tried
I used interrupt_before, like this (simplified pseudo-code):
This works, but it interrupts all tool calls — meaning every time the agent tries to use any tool, execution stops.
That’s not what I want, because most tools (like search_tool or write_tool) don’t need user confirmation.
The problem
I want to scope the interruption only to certain tools (e.g. only db_tool), while the rest run without interruption.
Question:
Is there a way to configure create_react_agent so that only selected tools trigger interruption?
Or do I need to wrap the target tool in some custom handler/graph node to implement this behavior?
Any patterns, best practices, or example code for this would be greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I’m building a multi-agent coordination system using LangGraph.
At the outer level, I have a coordinate-style graph, and each agent inside is created with create_react_agent, with multiple tools configured.
What I want to achieve
I’d like to implement an interrupt → user confirmation → resume flow:
Before calling one specific tool (e.g. a database query or external API call), the agent should pause execution.
The system would then hand over to the user, so they can review/modify the tool input parameters.
Once confirmed, the agent continues execution as normal.
What I’ve tried
I used interrupt_before, like this (simplified pseudo-code):
This works, but it interrupts all tool calls — meaning every time the agent tries to use any tool, execution stops.
That’s not what I want, because most tools (like search_tool or write_tool) don’t need user confirmation.
The problem
I want to scope the interruption only to certain tools (e.g. only db_tool), while the rest run without interruption.
Question:
Is there a way to configure create_react_agent so that only selected tools trigger interruption?
Or do I need to wrap the target tool in some custom handler/graph node to implement this behavior?
Any patterns, best practices, or example code for this would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions