strands.interrupt
¶
Human-in-the-loop interrupt system for agent workflows.
Interrupt
dataclass
¶
Represents an interrupt that can pause agent execution for human-in-the-loop workflows.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique identifier. |
name |
str
|
User defined name. |
reason |
Any
|
User provided reason for raising the interrupt. |
response |
Any
|
Human response provided when resuming the agent after an interrupt. |
Source code in strands/interrupt.py
InterruptException
¶
Bases: Exception
Exception raised when human input is required.