Two Pause Points
Agent execution has two phases: “reasoning” and “acting”. You can pause at either point: Pause after reasoning: After the model decides which tools to call, but before execution. You can see the tool names and parameters, letting users decide whether to allow execution. Pause after acting: After tool execution completes, but before the next reasoning iteration. You can see the results, letting users decide whether to continue.Example: Confirming Sensitive Operations
This example shows how to require user confirmation before executing sensitive operations like deleting files or sending emails:Handling Pause and Resume
When the agent pauses, the returned message contains the pending tool information. Display it to the user and decide next steps based on their choice:Quick Reference
Pause methods:PostReasoningEvent.stopAgent()— Pause after reasoningPostActingEvent.stopAgent()— Pause after acting
agent.call()— Continue executing pending toolsagent.call(toolResultMsg)— Provide custom tool result and continue
response.getGenerateReason()returnsREASONING_STOP_REQUESTEDorACTING_STOP_REQUESTED