Define what done looks like for a session
Defines what done looks like for an existing session and returns the stored outcome. Outcomes chain rather than run concurrently: the request is rejected while the session still has a non-terminal outcome, so define the next one only after the previous is graded.
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
Session id (UUID) as returned by managedAgentsStartSession or managedAgentsListSessions.
Body
- Option 1
- Option 2
- Option 3
A definition of done for a session -- the task plus the criteria it is graded against. Accepted both when starting a session and when adding an outcome to a running one. Send criteria, rubric, or rubric_ref; criteria and rubric are accepted together only when the rubric parses to exactly those criteria, as in a read-back body.
The criteria the evaluator checks the work against, in order. Verdicts and revision feedback cite each criterion by its criterion_key. Send criteria, rubric, or rubric_ref; criteria and rubric are accepted together only when the rubric parses to exactly those criteria, as in a read-back body. Criteria render to at most 256 KiB.
1 - 200 elementsThe 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.
1Agent selected to evaluate this outcome. Omit to inherit the writer agent version's default evaluator. If neither is set, defining the outcome returns 400.
Ceiling on evaluation passes. Omit or send null for five; send 0 explicitly for unbounded.
0 <= x <= 9007199254740991Deprecated: send criteria. A markdown rubric, read once into criteria when the outcome is defined. Send criteria, rubric, or rubric_ref; criteria and rubric are accepted together only when the rubric parses to exactly those criteria, as in a read-back body. Criteria render to at most 256 KiB.
1The rubric as a file: its text is read once into criteria when the outcome is defined. Send criteria, rubric, or rubric_ref; criteria and rubric are accepted together only when the rubric parses to exactly those criteria, as in a read-back body. Criteria render to at most 256 KiB.
Response
A writer session's definition of done and its persisted evaluator verdicts.
A writer session's definition of done and its persisted evaluator verdicts.
RFC 3339 timestamp when the outcome was created.
Objective the writer works toward, in prose.
Maximum evaluator passes; zero explicitly means unbounded.
-9007199254740991 <= x <= 9007199254740991Organization that owns the outcome.
Server-assigned outcome identifier (UUID).
Deprecated: read criteria. The markdown rubric as it was sent, or the criteria rendered as a keyed markdown rubric when the outcome was defined from a criteria list.
Writer session this outcome belongs to (UUID).
Current outcome lifecycle state, including evaluating while a root pass is in flight.
pending, running, evaluating, terminal RFC 3339 timestamp of the latest outcome change.
Writer agent that owns the outcome (UUID).
Criteria the writer's work is evaluated against, in rubric order. Absent on an outcome whose historical rubric has no structured form; read rubric for it.
RFC 3339 timestamp when the outcome became terminal.
Evaluator verdicts in order, newest last. Only passes that produced a verdict are listed: a pass that could not grade the work is reported by the pass status, and by terminal_result and terminal_explanation when it ended the outcome. A historical pass whose grader session is no longer recorded stays listed here even though it has no evaluator.
Agent selected to evaluate the outcome, frozen when defined.
Original cloned grader roots with no pass link or verdict; iteration and exact preparation start are unknown.
Cloned grading attempts, including preparation, failure, and interruption before a verdict exists.
Source file reference when the rubric was captured from an uploaded file.
SHA-256 digest of the source rubric file, when present.
Why the outcome ended, beside terminal_result: the final verdict's explanation, or the reason an outcome that ended without one could not be graded. Absent until terminal, and on an outcome that ended before explanations were recorded.
Final outcome verdict; absent until terminal. not_applicable means no criterion applied and is not success.
satisfied, max_iterations_reached, not_applicable, not_evaluable, failed