Interrupt
Defined in: src/interrupt.ts:29
Represents an interrupt that can pause agent execution for human-in-the-loop workflows.
Properties
Section titled “Properties”readonly id: string;Defined in: src/interrupt.ts:33
Unique identifier for this interrupt.
readonly name: string;Defined in: src/interrupt.ts:38
User-defined name for the interrupt.
reason?
Section titled “reason?”readonly reason?: JSONValue;Defined in: src/interrupt.ts:43
User-provided reason for raising the interrupt.
response?
Section titled “response?”response?: JSONValue;Defined in: src/interrupt.ts:48
Human response provided when resuming the agent after an interrupt.
source
Section titled “source”readonly source: InterruptSource;Defined in: src/interrupt.ts:55
Where this interrupt was raised from — a tool callback, an agent-level hook, or
a multi-agent orchestrator hook. Always populated. When deserializing a snapshot
produced by an older SDK that did not record this field, defaults to 'hook'.
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): { id: string; name: string; reason?: JSONValue; response?: JSONValue; source: InterruptSource;};Defined in: src/interrupt.ts:74
Serializes the interrupt to a JSON-compatible object.
Returns
Section titled “Returns”{ id: string; name: string; reason?: JSONValue; response?: JSONValue; source: InterruptSource;}| Name | Type | Defined in |
|---|---|---|
id | string | src/interrupt.ts:74 |
name | string | src/interrupt.ts:74 |
reason? | JSONValue | src/interrupt.ts:74 |
response? | JSONValue | src/interrupt.ts:74 |
source | InterruptSource | src/interrupt.ts:74 |