Package com.google.genkit.ai.agent
Class AgentInterrupt
java.lang.Object
com.google.genkit.ai.agent.AgentInterrupt
AgentInterrupt represents a tool request that paused agent execution awaiting a caller response.
Extracted from the final message's tool-request parts when a turn finishes with AgentFinishReason.INTERRUPTED. The caller resolves an interrupt by sending a ToolResume.getRespond() via AgentChat.resume(java.util.List).
-
Constructor Summary
ConstructorsConstructorDescriptionAgentInterrupt(String name, Object input, Part part) Constructs an AgentInterrupt. -
Method Summary
-
Constructor Details
-
AgentInterrupt
Constructs an AgentInterrupt.- Parameters:
name- the tool nameinput- the tool inputpart- the originating tool-request part (preserved for resume correlation)
-
-
Method Details
-
name
Returns the interrupted tool's name.- Returns:
- the tool name, or
nullif unknown
-
input
Returns the interrupted tool's input.- Returns:
- the tool input, or
null
-
part
Returns the originating tool-request part.- Returns:
- the part, or
null
-