type, a summary, and data.
run.result is only available after the iterator finishes. In the async Python and
TypeScript SDKs the same run object is both awaitable (await run → result) and
async-iterable (stream messages).Polling instead of streaming
The blockingclient.run() (sync Python) or await client.run() (async / TypeScript)
already runs to completion and returns the result. Use it when you don’t need live
messages:
Manual control
For full control over the loop, drive the resources directly:Python
status: "plan" with activity: "idle". The SDK’s
is_terminal() accounts for this, so don’t poll on status alone.
Raw SSE
BothPOST /task/stream and GET /task/{task_id}/stream emit Server-Sent Events with the
same event names as the dashboard. See the Task API for the
raw HTTP interface.