Interrupt vs. graph taking a full "turn"

(newbie here) I’m working on an internal Slack app that asks the user questions about what they are trying to do and the model decides which subgraph to route to depending on the user’s intent. Each subgraph is like its own product (e.g. one to teach you how to prompt, one to teach you which SaaS tool to use for X purpose). Originally I had used the interrupt pattern to ask for user input and the main node starting getting really bloated. Asked Claude for other architecture ideas and the new architecture involves no interrupts and just having the graph go through full “turns” from the START to END nodes and waits for the next user input to figure out how to proceed.

Curious to hear how others have approached choosing to use interrupt and the tradeoffs you considered when building your application.

This is a great question! Both are viable approaches - I’ve used both myself in different circumstances.

As you mentioned, if you find the state getting bloated, it’s perfectly acceptable to go down a separate flow (or even a subgraph, with isolated state) that handles responding to the user to get user input.

Personally, I like creating sub-graphs when state gets too messy, so that each subgraph only gets and uses the state that it needs.

Interrupt I’ve found useful when the input format from the user is not necessarily just another “chat” message. Such as if the user is “approving” something, or selecting one of n options. This can be easier to handle in the graph directly.

Thanks for the response. In my Slack app the user is actually selecting one of n options and the model tries to figure out which of the subgraphs (products) best fits the user’s intent.

Are there any customer examples/templates that might show a canonical pattern for when to use interrupt vs. letting the graph run a full turn?

One of our engineers put together a nice course on building an email assistant - this makes use of interrupt and is a pretty complex example!

Here’s the course. You can also just clone the repo and check out the human in the loop notebook, but would highly recommend giving it a watch :smiley:

Ok thanks! I saw the new course on Ambient Agents and looking forward to diving in.