Skip to main content
Enabling Human-in-the-loop (HITL) allows the AI agent to pause execution and request human intervention when needed. This feature is essential for tasks that require human judgment, approval, or handling of unexpected situations.

Basic Usage

How It Works

When HITL is enabled, the agent sends its intervention requests to a session-specific queue. The agent then continues execution based on your instructions.
Human-in-the-loop is most effective when combined with clear system messages that define specific intervention triggers and provide context for decision-making.

Webhooks

Instead of polling the endpoints below, you can subscribe to webhook events and receive a push notification whenever the agent requests human input. Subscribe to intervention.requested to get notified when the agent pauses — the payload includes the request_id, the agent’s message, and a live_view_url for one-click live takeover. Subscribe to intervention.resolved if you need to know when an intervention was answered. See Webhooks for setup, Events for the full payload reference, and Signature verification to verify incoming deliveries.

Get Pending Requests

To retrieve pending human intervention requests from the agent, use the GET endpoint:

Send Intervention Response

To send a response to a pending human intervention request, use the POST endpoint: