Task status
Look forstatus_update events in the response. The agent_status field tells you what to do next:
| agent_status | Meaning | Action |
|---|---|---|
running | Agent is working | Keep polling |
stopped | Task completed | Read assistant_message events for results |
waiting | Needs user confirmation or input | Handle based on event type (see below) |
error | Task failed | Read error_message for details |
Handling waiting status
When agent_status is waiting, the status_detail tells you what the agent needs:
confirm_input_schema field is a JSON Schema object that describes the expected format of the input parameter when calling task.confirmAction. Use it to validate or dynamically build the confirmation payload.
There are two ways to respond, depending on waiting_for_event_type:
messageAskUser— The agent is asking a question. Reply with task.sendMessage. Do not usetask.confirmAction.- All other types — Confirm or reject via task.confirmAction.
Using task.confirmAction
input format varies by waiting_for_event_type:
needConnectMyBrowser
Connect a user’s browser. Get available clients from browser.onlineList first.
gmailSendAction / outlookSendMailsAction
deployAction
terminalExecute
videoGenerate
apiHighCreditNotice
webdevRunAction
mode options: "quality" / "speed" (default) / "max"
webdevRequestSecrets
connectorOauthExpired / mapreduceAction
For event types that support
accept, passing accept: false will not produce any event — the task remains in waiting status.Using My Browser
You can let the agent use your local browser. First, get online clients:client_id as a connector when creating a task:
needConnectMyBrowser waiting event — use task.confirmAction to select a client.