Task status
Look forstatus_update events in the response. The agent_status field tells you what to do next:
Handling waiting status
When agent_status is waiting, the status_detail tells you what the agent needs:
waiting_for_event_type:
messageAskUserorcascadeAskUser— The agent is asking a question. Reply with task.sendMessage. Do not usetask.confirmAction.- Action confirmations — Use task.confirmAction for supported action types, including those without
confirm_input_schema. When present, the schema describes the expectedinput; otherwise use the documented input for that action below. Schema presence is not the routing criterion.
assistant_message includes a question_expectation object:
options contains display text, not option IDs or an enforced answer schema. Render single- or multiple-choice controls according to selection_mode, while allowing a free-text answer instead. Send a non-empty answer as ordinary message.content through task.sendMessage. For multiple choices, combine the selected text into one readable message, for example:
response_method is currently fixed to send_message, never task.confirmAction. If a client encounters an unknown method, stop automatic dispatch and check the current API documentation rather than falling back to action confirmation.
In task.listMessages, question_expectation is omitted for questions with no choices; use the question’s text and waiting event type to request a free-text answer. When present, options is non-empty. Webhooks can also describe a free-text question with options: [].
The nested question_expectation.event_id exists only in webhooks and identifies the underlying question event. It is different from the webhook envelope’s event_id, which identifies the webhook notification. In task.listMessages, use the enclosing message’s id; there is no nested event_id. Neither question ID is required by task.sendMessage, and it is not a send-message idempotency key.
Using task.confirmAction
input format varies by waiting_for_event_type. The table below lists currently supported event types — new types may be added in the future. When present, use confirm_input_schema for the definitive schema; its absence does not turn an action confirmation into an agent question.
For event types that support
accept, passing accept: false will not produce any event — the task remains in waiting status. Exception: webdevRequestSecrets where accept: false explicitly rejects the request.Using My Browser
You can let the agent use your local browser. When the agent needs a browser during execution, it will trigger aneedConnectMyBrowser waiting event. Use browser.onlineList to get available clients, then select one via task.confirmAction: