pass, fail, or not_applicable, overall and per criterion, with a rationale and the events it cites as evidence.
Evaluations differ from outcomes. An outcome grades one session while it runs and can send the agent back to revise. An evaluation judges many finished sessions at once, without changing them, so you can compare agents and versions.
The samples assume the rl client from Client setup.
Before you begin
- Creating an evaluator and starting an evaluation need create permission. Reading verdicts needs read. Organization developers and admins have both. See Organizations and roles.
- You need finished sessions to judge.
How an evaluation runs
- Each session is judged as it stood when the run started. Later messages don’t change its verdict.
- A run is an ordinary root session of the evaluator, with one child per judged session, so you can read or stream it like any other. It isn’t listed with your other sessions.
- Verdicts are immutable. Judging the same session again records a new verdict.
- An evaluator’s version freezes its rubric, so verdicts from one version are comparable with each other.
Create an evaluator
An evaluator is an agent with the evaluation toolset and a rubric. The rubric has one criterion per line, as- key: what to judge, with a lowercase key. Keep a key when you reword its criterion, so its history stays comparable.
- Console
- TypeScript
- cURL
- In the sidebar, click Evaluations, then open Evaluators.
- Start from a template, such as Core quality or Memory use, or from a blank definition.
- Write the Evaluation criteria. The console shows the keys it parsed.
- Under Run limits, set Concurrent target evaluations, from 1 to 25 (the default is 8), and an optional Maximum evaluation run cost (USD).
- Save the evaluator.
max_concurrent_threads is how many sessions are judged at once. With max_tree_cost_usd set, the run stops starting new judgments once its recorded cost reaches that amount; sessions it didn’t reach are reported as skipped. To see the template definitions, call listAgentTemplates; each is an ordinary create body you can copy.
Start an evaluation
Choose sessions by id, or by status with a limit. Only root sessions that are visible to you and have an agent can be judged.- Console
- TypeScript
- cURL
- In the sidebar, click Sessions and select the sessions to judge, up to 100.
- Click Evaluate selected, choose an evaluator, and start.
- Follow the run under Evaluations > Runs.
session_ids (up to 100) or statuses with limit (1 to 100, newest matching sessions first). With session_ids, every session must be eligible, or no run is created. The response is the run’s root session; its session_id is the run_session_id on the run and its verdicts.
What success means: the run session reaches completed, and listEvaluationRuns shows verdicts_total equal to the number of sessions it judged. A judged session that failed or was cancelled can still get a verdict; its failure_class says so.
Read verdicts
- Console
- TypeScript
- cURL
- Evaluations > Overview charts pass rates by agent version and by criterion for one evaluator.
- Evaluations > Runs lists runs with their Targets, Verdicts, and Status.
- A session’s Evaluation tab shows every verdict recorded for it.
Page tokens are tied to your filters and expire after an hour. Verdicts stay readable after the judged session or agent is deleted. For quality charts next to usage and cost, read the
managed_agent_quality family in Analytics.
Write a rubric that judges well
- One thing per criterion. A criterion that checks two things can’t tell you which failed.
- Make it checkable from the transcript. The evaluator sees what the session did and said; name the file, command output, or claim to look for.
- Keep keys stable. Rewording under the same key keeps history comparable; a new key starts a new series.
- Say what’s not applicable. If a criterion doesn’t apply to some sessions, say when, so they’re
not_applicablerather thanfail.
What can go wrong
For every error code, see Errors.
Limits
See Limits for every other limit.
Next steps
Outcomes
Grade a session while it runs and let the agent revise.
Analytics
Chart quality with usage and cost.
Agents
Version agents so their quality is comparable.
Sessions
Find the sessions to judge.