Skip to main content
Set the key and host once:

Start a task

Poll until done

An empty since on the first call is the same as omitting it.

Answer an approval

When the loop prints an approval with "isLinkOnly": false:
When it prints "isLinkOnly": true, open the approvalUrl in a browser. Then run the poll loop again with the same SESSION and CURSOR. The poll response also carries the blocking approval as a top-level approval field, so jq .approval works when the event has already scrolled past.

Attach a file

Stop a task

Stream instead

Leave wait out and read the SSE frames as they arrive: