UiInterrupt

data class UiInterrupt(val id: String, val reason: String, val message: String? = null, val toolCallId: String? = null, val responseSchema: JsonElement? = null, val expiresAt: String? = null, val metadata: JsonElement? = null)

One thing a run stopped to ask for: an approval, a choice, a credential.

The shape is the protocol's Interrupt, kept whole because every field is something a renderer may need: message is the prompt to put in front of whoever answers, responseSchema describes the answer the agent wants -- carried opaquely, so a renderer can build a form for it -- and toolCallId names the call an approval concerns, when it concerns one. It is optional in the protocol and absent from some producers, so an interrupt is not a property of a tool call: it belongs to the run, and a tool call the run named is told it is waiting (ToolCallStatus.AWAITING_APPROVAL) rather than handed the interrupt itself.

Constructors

Link copied to clipboard
constructor(id: String, reason: String, message: String? = null, toolCallId: String? = null, responseSchema: JsonElement? = null, expiresAt: String? = null, metadata: JsonElement? = null)

Properties

Link copied to clipboard

when the producer will stop accepting an answer, in a format the protocol deliberately leaves to the producer -- conventionally ISO 8601. Carried, not judged: nothing here decides an interrupt has expired, so a client that wants to stop offering one after its time reads this itself.

Link copied to clipboard
val id: String

unique within the run; the answer names it.

Link copied to clipboard
Link copied to clipboard
val metadata: JsonElement?

whatever else the producer attached. AWS Strands puts the tool's name and input here for an approval raised without a native tool use.

Link copied to clipboard

an open string the producer chose -- tool_call for an approval, from the producers that raise one. Nothing here reads anything into it; agui-material3 draws it as the prompt of last resort.

Link copied to clipboard
val responseSchema: JsonElement?
Link copied to clipboard