Skip to main content
Human-in-the-Loop functionality operates through Server-Sent Events (SSE) that notify your application when tool approvals are required and provide status updates throughout the approval process.

Core Approval Events

TOOL_EXECUTION_APPROVAL_REQUEST

Emitted when an agent requires human approval to execute one or more tools. This is the primary event that triggers approval UI in your application.
Key Fields:
  • toolExecutionBatchId: Groups related tool executions that must be approved together
  • toolExecutionId: Unique identifier for this specific tool execution
  • toolArguments: The actual parameters the agent wants to pass to the tool
  • approvalResult: Always “PENDING_HUMAN_APPROVAL” for request events

Notification Events

These events provide status updates during the approval lifecycle:

NOTIFICATION_TOOL_EXECUTION_APPROVAL_REQUIRED

General notification that tool approval is needed.

NOTIFICATION_TOOL_EXECUTION_APPROVAL_ACCEPTED

Emitted when a tool execution has been approved.

NOTIFICATION_TOOL_EXECUTION_APPROVAL_DENIED

Emitted when a tool execution has been denied.

NOTIFICATION_TOOL_EXECUTION_APPROVAL_ABORTED

Emitted when a tool execution has been aborted with feedback.

NOTIFICATION_TOOL_EXECUTION_INITIATED

Tool execution has started (after approval, if required).

NOTIFICATION_TOOL_EXECUTION_IN_PROGRESS

Tool execution is currently running.

Event Handling Implementation

Next Steps