How it works
- Your graph calls
interrupt()at a decision point - The run pauses and the thread status becomes
"interrupted" - Your application retrieves the interrupt payload (what the agent wants to do)
- The user decides what to do (approve, edit, reject, respond)
- You resume the run with a
commandthat tells the agent how to proceed
Quick example
Define a graph with an approval gate
Wire it into the graph
Register in aegra.json
Client-side flow
1. Start a run that triggers an interrupt
2. Resume with approval
3. Resume with edits
4. Respond directly
5. Ignore the tool call
Interrupt before/after nodes
You can also set interrupt points without modifying the graph code, using theinterrupt_before and interrupt_after parameters on the run:
"*" to interrupt before/after every node:
Checking interrupt status
Response types
Important notes
When resuming an interrupted run, use
command instead of input. The input and command fields are mutually exclusive — you can’t send both.- Interrupts work transparently across subgraph boundaries
- The thread status changes to
"interrupted"when paused and"idle"when completed - You can inspect the interrupt payload in thread state to show the user what the agent wants to do
- Multiple sequential interrupts are supported in a single run