Skip to main content
An outcome defines what “done” means for a task and holds the agent to it: a plain-language description and a rubric. While it’s attached, a grader scores each finished answer against the rubric and sends revision notes back. The agent revises and is graded again, up to max_iterations times. That turns “did the agent do a good job?” into a signal you can track across agent versions. A session may have only one active outcome at a time.

Anatomy of an outcome

The grader loop

When a turn finishes, the runtime starts a grader: a child session on the same model, with no tools, that can only answer with a structured verdict (result, explanation, and whether each criterion is met — an output_schema).
  • It sees the rubric and the answer: the structured output or the last reply, plus the ids of files the session published. It runs in its own context and never sees the agent’s working memory or transcript.
  • While it works, the session rests idle with stop_reason: "awaiting_delegation".
  • If the work falls short, the notes become the agent’s next message and a new iteration starts.

Grader events

The loop is visible on the event stream: The list endpoint returns these only with include_accepted=true (vetta session events --include-accepted from the CLI); the stream always sends them. In the dashboard, each completed grade is a line in the chat under the answer it graded — Grader: needs revision — <explanation>, then the final result.

What a grade costs

A grade is ordinary metered model usage. Its tokens are billed on the grader’s own session, at the graded session’s window, against the graded session’s budget, so a grade can never exceed it. A budget exhausted mid-grade ends the evaluation interrupted. outcome.evaluation.completed repeats what the grade cost.

Results

Each completed evaluation carries a result:

Reading the score on a session

GET /v1/sessions/{id} exposes outcome_evaluations[], one entry per attached outcome (oldest first; the last is the active one), each { outcome_id, result, iteration, explanation }. result is pending until the first evaluation completes, then one of the values above; an evaluation in flight shows on the event stream, not in this field.

Attaching an outcome

Attach at session create, or mid-session while the session is idle — the next turn is graded. Setting a new outcome replaces any current one, since only one is active at a time.
Outcomes grade agents that work alone. The agent needs handoffs: false and no multiagent roster. Otherwise (including the default, handoffs: true) the attach fails 400 validation_failed.
Outcomes pair naturally with benchmarks: report cost per completed and passing task, not just cost per attempt.

REST

  • Outcomes are immutable. To change a rubric, create a new outcome.
  • Attaching mid-session needs an idle session with no grade out (409 session_running otherwise) and an agent with no team members (400 validation_failed otherwise). It replaces the active outcome; that outcome’s unfinished evaluation ends interrupted.
  • Interrupting or cancelling during a grade ends the evaluation interrupted at once and stops the grader. Only a model call already in flight finishes, and outcome.evaluation.completed reports what the grader had spent.

Configuration reference

string
required
What a finished, correct result is.
string
The rubric as inline Markdown. Provide this or rubric_file.
string
A file id (fil_...) whose contents are the rubric.
number
default:"3"
Maximum grade → revise rounds. Maximum 20.

Back to tools

How tools are defined, selected, and gated.