Skip to main content
POST
Create an agent run

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Headers

Idempotency-Key
string
required

Reuse the same key to safely retry the same create, reusable snapshot create, fork, upload create/complete, or agent deployment create operation without duplicating work.

Path Parameters

deployment_id
string
required

Agent deployment ID

Body

application/json
version_id
string | null
input
object

Free-form run input supplied at run creation; passed through to the agent verbatim, deliberately open.

envs
object
write-only

Request-only runtime environment variable values. P0 accepts string values only; future secret references are reserved by AgentSecretReference. Values are injected into agent processes and are not stored in deployment config, run, service, or platform event records.

retain_on_failure
boolean | null
retention_seconds
integer<int64> | null
Required range: x >= 1

Response

Agent run created

id
string
required
Example:

"adrun_1234abcd"

deployment_id
string
required
version_id
string
required
mode
enum<string>
required
Available options:
job,
service
status
enum<string>
required
Available options:
queued,
starting,
installing,
running,
succeeded,
failed,
cancelled,
timed_out
input
object
required

Free-form run input supplied at run creation; passed through to the agent verbatim, deliberately open.

created_at
string<date-time>
required
updated_at
string<date-time>
required
retain_on_failure
boolean | null

Per-run override for failed job machine retention. Omit to use deployment debug config.

retention_seconds
integer<int64> | null

Retention TTL in seconds when the run is retained. Defaults to 3600 if retention is enabled without an explicit TTL.

Required range: x >= 1
machine_id
string | null
process_id
integer<uint32> | null
exit_code
integer | null
failure_reason
string | null
output_manifest
object | null

Output manifest produced by the agent runtime (typically containing an outputs array). Deliberately open: the manifest shape is owned by the agent, not the control plane.

started_at
string<date-time> | null
completed_at
string<date-time> | null
idempotency_key
string | null