Execute a flow or agent

Main dispatch endpoint for flow and agent execution with record resolution. Supports streaming via SSE or synchronous JSON responses. Send the RFC 7240 `Prefer: respond-async` header to receive a durable execution handle immediately, then poll its status URL for completion. A saved agent may run on the durable session lane; the admission headers `x-runtype-concurrency` (reject, supersede, queue, join), `x-runtype-coalesce` (true) and `idempotency-key` then apply exactly as on `POST /v1/agents/{id}/execute`, and are ignored for in-process execution except join, which fails explicitly on unsupported lanes. Join accepts only new user-message deltas, preserves the active execution configuration and authority, and returns a deliveryId with a deliveryStatusUrl. Prefer: respond-async with join returns a native delivery receipt without queuing an HTTP replay.

Authentication

AuthorizationBearer
API key or Clerk session token

Request

This endpoint expects an object.
objectRequired
OR
objectRequired

Response

Execution result (SSE stream or JSON)

object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object
OR
object

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error