agent

Create agent run

Changed on

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

Use `inputHistoryMode=delta_v1` to send only `newUserMessage` and let the server reconstruct a bounded rolling context. A continuation supplies the thread's authoritative `current_run_id` as `baseRunId`.

Required scope: `inference:run`

post/agent/runs

Request

  • Base URL
    https://developer.qaip.com/api/v1
  • URL
    https://developer.qaip.com/api/v1/agent/runs
  • Auth
    API key in header x-api-key

Headers

Idempotency-Keystring

Retry key scoped to the authenticated tenant and principal. Required and non-blank for every delta_v1 request; optional for legacy_full.

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

保存済みW3C trace contextから導出したlowercase OpenTelemetry trace ID。移行前の行はnull。

request_idstring nullable

Correlation ID of the first request that created this run. For HTTP creation it matches that request's X-Request-ID. Idempotent retries and later reads preserve this value even though their own HTTP response headers carry different request IDs. Runs created before correlation recording was introduced return null. Direct service callers without an HTTP request receive a generated correlation ID.

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).

input_history_mode'legacy_full' | 'delta_v1' required

How the request supplied conversation history for this run.

context_start_run_idstring nullable required

Oldest run included in the reconstructed rolling context, or null when none was needed.

context_truncatedboolean required

Whether older turns were omitted to stay within the server context budget.

resultobject nullable
errorobject nullable

Example response

{
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}

Changes

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property to the response with the status

    • breaking

      the request property type changed from object to no type

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      added the new OPENAI enum value to the response property for the response status

    • info

      added to the request property oneOf list

    • info

      the response's property pattern ^[0-9a-f]{32}$ was added for the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status