-
I have a functional and working graph which works perfectly fine like it should. Here is the related code -
Here is the video of it happening Screen.Recording.2025-01-16.at.10.14.21.mov |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Thanks for writing in. That sounds like interrupt is behaving as designed. It raises a node interrupt exception, which LangGraph interprets as an instruction to pause the graph execution. The interrupt message is emitted in the stream output and stored in the persistence layer (for when you get the state of the graph). You then resume the graph with the response value. See e.g., the doc: |
Beta Was this translation helpful? Give feedback.
is your expectation more like
input()
in python? if so, LangGraphinterrupt()
doesn't do this. It just stops the graph execution and you need to resume it usingCommand(resume)
to provide the valuei think there is actually an issue in your code example:
Command(resume)
should be used after the graph is halted byinterrupt()
, to provide the interrupt value, not in the value returned by the node functione.g.