interrupt event describing the question. A later call on the same session carries the answer as a resume, and your agent continues from where it stopped, not from the start.
Pause from your agent
- LangGraph
- A Python function
- A TypeScript function
Call LangGraph’s own Details on LangGraph.
interrupt() in a node, and compile the graph with a checkpointer. What interrupt() returns is the person’s answer.agent.py
Other frameworks do not pause yet. A
resume sent to an agent that cannot pause is refused with 400: This agent does not pause for input, so there is nothing to resume.
What your app receives
With a stream, the run ends withevent: interrupt instead of done:
Stream
status is interrupted, the response is 200, and interrupts lists the questions:
Response
Answer it
Sendresume with the same sessionId. It needs no prompt. Answer every interrupt the run ended with, by its id:
"status": "resolved"with apayload: the answer, which your agent receives as it is."status": "cancelled": the person declined. A LangGraph node receivesNone, and your code decides what that means.
agt_... with your agent’s ID and the interrupt ID with the one you received:
resume.py
resume.ts
Terminal
Output
done, error, or another interrupt if your agent asks again.
Answer from the dashboard
In the agent’s Chat tab, a reply that ends in an interrupt shows its question and a form under it, built fromresponseSchema: a switch for a boolean, a field for a string or a number, a choice for an enum, and a JSON box for anything else. Send answers every question at once, Cancel cancels them, and the message box stays disabled until you do. See Chat.
Where the pause lives
In your agent, not in Onecortex. A LangGraph graph keeps it in its checkpointer; a function keeps it in memory. An in memory pause lasts as long as the session’s running instance: 15 minutes without calls, or 1 hour at most (see Sessions). A LangGraph graph compiled with a checkpointer backed by your own database keeps it for as long as that database does.When a resume is refused
The first three are
invalid_request: 400 on a JSON call, or event: error on a stream. All of them are on Errors.
A LangGraph agent that pauses for approval
refund-approval: looks an order up, asks a person to approve the refund, then refunds, declines or cancels. It runs with no model key.