Skip to main content
GET
Get an automation run's result

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Headers

x-tenant-id
string

Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.

Minimum string length: 1
x-organization-id
string

Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.

Minimum string length: 1

Path Parameters

automationRunId
string<uuid>
required

Stable canonical automation-run identifier.

Query Parameters

waitSeconds
integer
default:0

Hold the request up to this many seconds while the run is not finished, and answer as soon as it finishes. 0 answers at once. At most 20; repeat the request to keep waiting.

Required range: 0 <= x <= 20

Response

Where an automation run stands and, once it is finished, its verdict, outcome, structured result, final message and saved files.

Where an automation run stands and, once it is finished, its verdict, outcome, structured result, final message and saved files.

artifacts
object[]
required

Files the run's session saved, sorted by path, at most 100. Download one with GET /managed-agents/v1/files/{fileId}/content. Empty until state is finished.

Maximum array length: 100
automationId
string<uuid>
required

The automation that started the run.

automationRunId
string<uuid>
required

The run this result describes.

run
object
required

The run's own status.

state
enum<string>
required

pending: the run has not started its session yet. running: the session is still working. finished: there is nothing left to wait for; read verdict.

Available options:
pending,
running,
finished
artifactsTruncated
boolean

True when the session saved more files than artifacts lists.

finalMessage
object

The text of the agent's last message. Present only when state is finished and the agent wrote one.

finishedAt
string<date-time>

When the run reached its verdict. Present only when state is finished.

outcome
object

The session's newest outcome and its last grading pass. Present only when state is finished and the session was graded.

output
object

The run's structured JSON result. Present only when state is finished, and then when the automation declares runDefaults.output, or otherwise when the final message holds JSON.

reason
string

Stable code explaining the verdict, such as outcome_satisfied, outcome_unmet, max_iterations, end_turn, requires_action, budget_reached, output_missing, output_invalid, run_skipped, run_failed: or session_failed:. Present only when state is finished.

reasonMessage
string

Short human explanation of the verdict. Present only when state is finished.

session
object

A summary of the run's session, once it has one. Read the session for everything else.

sessionId
string<uuid>

The session the run started. Absent until the run starts one, and for runs that never do.

verdict
enum<string>

How the run ended. Present only when state is finished. passed: the outcome was graded and met. completed: the session finished and nothing graded it. failed: the outcome was graded and not met. needs_attention: the session stopped where only a person can carry it on. cancelled: the session was cancelled. error: the run or session failed, the outcome could not be graded, or the declared result file is missing or not valid JSON.

Available options:
passed,
completed,
failed,
needs_attention,
cancelled,
error