agent

Create agent run

Create an asynchronous agent run and start execution in the background.

Required scope: `inference:run`

post/agent/runs

Headers

Idempotency-Keystring

Retry key scoped to the authenticated tenant and principal.

Request body

Example request

{
  "input": {
    "redactionPolicyId": "pii-standard"
  }
}

Response

Agent run accepted

run_idstring required
thread_idstring required
workflow_typestring required
provider'ANTHROPIC_DIRECT' | 'BEDROCK' | 'OPENAI' | 'VERTEX_AI' required
execution_mode'LOCAL' | 'AGENTCORE' required
status'QUEUED' | 'RUNNING' | 'CANCELLING' | 'SUCCEEDED' | 'FAILED' | 'CANCELLED' required

Agent run lifecycle state.

runtime_arnstring nullable
mcp_session_idstring nullable
trace_idstring nullable
idempotency_keystring nullable
created_atstring date-time nullable
started_atstring date-time nullable
finished_atstring date-time nullable
inputobject nullable

Server-enriched agent input used to reconstruct the thread transcript.

parent_run_idstring nullable

Run this run branched from within the thread (null for the thread root).

resultobject nullable
errorobject nullable

Changes