Get an automation run's result
Returns where one automation run stands and, once it is finished, its verdict: passed, completed, failed, needs_attention, cancelled or error, with a reason code, the graded outcome, the structured JSON result, the agent’s final message and the files its session saved. Pass waitSeconds to hold the request while the run is not finished, up to 20 seconds; repeat the request until state is finished. A finished run reads running again when its session continues: when someone acts on it, or on its own when a browser hand-off (awaiting_human) passes its deadline or credits are bought for a session paused out of credit. A run of a Slack trigger that continues a thread shares its session with the thread’s other runs and has no result of its own: it is refused with automation_run_session_shared.
Authorizations
A Recursion API key, created in the console under API keys.
Headers
Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.
1Organization 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.
1Path Parameters
Stable canonical automation-run identifier.
Query Parameters
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.
0 <= x <= 20Response
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.
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.
100The automation that started the run.
The run this result describes.
The run's own status.
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.
pending, running, finished True when the session saved more files than artifacts lists.
The text of the agent's last message. Present only when state is finished and the agent wrote one.
When the run reached its verdict. Present only when state is finished.
The session's newest outcome and its last grading pass. Present only when state is finished and the session was graded.
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.
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.
Short human explanation of the verdict. Present only when state is finished.
A summary of the run's session, once it has one. Read the session for everything else.
The session the run started. Absent until the run starts one, and for runs that never do.
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.
passed, completed, failed, needs_attention, cancelled, error