Skip to main content
POST
Define what done looks like for a session

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

sessionId
string<uuid>
required

Session id (UUID) as returned by managedAgentsStartSession or managedAgentsListSessions.

Body

application/json

A definition of done for a session -- the task plus the rubric it is graded against. Accepted both when starting a session and when adding an outcome to a running one. Exactly one of rubric and rubric_ref is required.

description
string
required

The objective the agent works toward, and the statement of it the evaluator is given. It opens the session when the start request carries no message.

Minimum string length: 1
rubric
string
required

Markdown the evaluator scores the work against. Criteria must be independently checkable: 'the CSV has a numeric price column' can be verified, 'the data looks good' cannot. Send this or rubric_ref.

Minimum string length: 1
max_iterations
null | integer
default:5

Ceiling on evaluation passes. Omit or send null for five; send 0 explicitly for unbounded.

Required range: 0 <= x <= 9007199254740991
rubric_ref
object

The rubric as a file instead of inline markdown: the file's text is read once, when the outcome is defined, and recorded as the rubric. Exactly one of rubric and rubric_ref is required.

Response

A writer session's definition of done and its persisted evaluation-root verdicts.

A writer session's definition of done and its persisted evaluation-root verdicts.

created_at
string<date-time>
required

RFC 3339 timestamp when the outcome was created.

description
string
required

Objective the writer works toward, in prose.

max_iterations
integer<int64>
required

Maximum evaluator passes; zero explicitly means unbounded.

Required range: -9007199254740991 <= x <= 9007199254740991
organization_id
string
required

Organization that owns the outcome.

outcome_id
string
required

Server-assigned outcome identifier (UUID).

rubric
string
required

Markdown criteria used to evaluate the writer's work.

session_id
string
required

Writer session this outcome belongs to (UUID).

status
enum<string>
required

Current outcome lifecycle state, including evaluating while a root pass is in flight.

Available options:
pending,
running,
evaluating,
terminal
updated_at
string<date-time>
required

RFC 3339 timestamp of the latest outcome change.

agent_id
string

Writer agent that owns the outcome (UUID).

ended_at
string<date-time>

RFC 3339 timestamp when the outcome became terminal.

evaluations
object[]

Persisted evaluator passes in order, newest last.

historicalRoots
object[]

Original cloned grader roots with no pass link or verdict; iteration and exact preparation start are unknown.

passes
object[]

Cloned grading attempts, including preparation, failure, and interruption before a verdict exists.

rubric_ref
string

Source file reference when the rubric was captured from an uploaded file.

rubric_sha256
string

SHA-256 digest of the source rubric file, when present.

terminal_result
enum<string>

Final outcome verdict; absent until terminal. not_applicable means no criterion applied and is not success.

Available options:
satisfied,
max_iterations_reached,
not_applicable,
failed