API: all pages
Docs homeOverviewAPITools & MCPBasicsSavingReading and contextAgent runsWebhooks and connectorsRetries and idempotencyErrors and limitsCreditsPrivacy and deletionConsole sign-inAPI / Use it / Agent runsCopy this page for your AI (Markdown)
Agent runs
- Start a run:
POST /v1/runs {user, task}returnsrun_id. - Log each step:
POST /v1/runs/steps {user, run_id, kind: "tool_call" | "tool_result", tool, args | output, status}. A repeated failing call returnswarningsfrom past failures. Large outputs are stored, not searched, and paged withGET /v1/handles/{id}. - Finish:
POST /v1/runs/end {user, run_id, outcome: success | failure}. - Use the history: a later
/v1/contextwithrun_idcites the steps of similar successful runs. For coding tasks, that includes the past run whose edits touched the files or functions the new task names (strong matches only).