Start an agent run
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Query parameters
How many seconds to hold the request open. Releases early the moment the run finishes or blocks on a person. Maximum 120; 0 returns immediately.
Request
Arbitrary JSON you attach to the run and get back on every read of it.
Use it to carry your own identifiers — an order number, a customer id — so a webhook or a polled run reconciles without a lookup table. Capped at 10 KB serialized.
Where to deliver this run’s events, given one of two ways.
{ "url": "…" }— a one-off https endpoint for this run only.{ "id": "whe_…" }— a saved endpoint fromPOST /v1/webhooks. Runs hold the reference, so pausing or re-pointing that endpoint applies to this run too.
Deliveries are at-least-once and signed — dedupe on eventId and verify against GET /v1/webhooks/jwks.json.
Response
Where the agent run is in its life.
completed, failed, cancelled and expired are terminal. A completed run that still had outstanding work also carries incomplete: true.
The run’s deadline: about seven days after it starts, an unfinished run parks itself for good and its status becomes expired. null once the run is finished. Files and anything the run already filed are never taken back.
What is blocking the run. Present while status is waiting.
Why the run parked. Present while status is paused. A paused run keeps everything it produced and can be started again.
Sign-offs the run is waiting on, oldest first.
Present and true on a completed run that still had outstanding work — read tasks[] to see what.
Why the run failed. Present whenever status is failed.