Skip to main content
Your agent can stop part way through a run to ask a person something: approve this refund, pick one of these, fill in this field. The run ends with an 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

Call LangGraph’s own interrupt() in a node, and compile the graph with a checkpointer. What interrupt() returns is the person’s answer.
agent.py
Details on LangGraph.
Each interrupt has these fields: 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 with event: interrupt instead of done:
Stream
As one JSON body, status is interrupted, the response is 200, and interrupts lists the questions:
Response

Answer it

Send resume with the same sessionId. It needs no prompt. Answer every interrupt the run ended with, by its id:
  • "status": "resolved" with a payload: the answer, which your agent receives as it is.
  • "status": "cancelled": the person declined. A LangGraph node receives None, and your code decides what that means.
Replace agt_... with your agent’s ID and the interrupt ID with the one you received:
resume.py
resume.ts
Terminal
Output
The resumed run is an ordinary run: it streams, reports tool calls, and ends in 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 from responseSchema: 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.
Last modified on September 29, 2026