Interrupt
Defined in: src/interrupt.ts:28
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:32
Unique identifier for this interrupt.
readonly name: string;Defined in: src/interrupt.ts:37
User-defined name for the interrupt.
reason?
Section titled “reason?”readonly optional reason?: JSONValue;Defined in: src/interrupt.ts:42
User-provided reason for raising the interrupt.
response?
Section titled “response?”optional response?: JSONValue;Defined in: src/interrupt.ts:47
Human response provided when resuming the agent after an interrupt.
source
Section titled “source”readonly source: InterruptSource;Defined in: src/interrupt.ts:54
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:73
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:73 |
name | string | src/interrupt.ts:73 |
reason? | JSONValue | src/interrupt.ts:73 |
response? | JSONValue | src/interrupt.ts:73 |
source | InterruptSource | src/interrupt.ts:73 |