Skip to main content
An eval tells you how often an agent gets a request right before a customer meets it. You describe the request once as a test case: what the person asks, and what a right answer looks like. Eager then talks to your agent the way a customer would, with the agent’s real tools, procedures, browser and computers, and a judge checks the answer: is it right, and is it grounded in what the agent actually found, rather than made up? Group cases into a test set, run the set against one or more agents with a few tries per case, and compare pass rates, grounded rates, time and price side by side. Every try is an attempt, with its conversation and the replay of any task it ran. Everything here is in the /v1 API and an agent’s Tests in the console. The SDKs cover sets, runs and results; for the chat and browser fields of a test case, use the HTTP API for now.

Three kinds of case

A case’s runs_on says what kind it is: Most agents are tested with chat cases: they test the whole agent, deciding when to look something up, which procedure to follow and when to open a browser.

Quick start

Create a chat case, put it in a set, run it against your agent three times, and read the results.
1

Create a test case

cURL
The agent doesn’t know the serial number until it asks: the simulated customer answers from its facts. The answer has to come from support.example.com (must_visit), so an agent that guesses fails even if it guesses right.
2

Put it in a test set

A model’s answers vary from try to try, so run each case more than once: 3 tries per case is a good default.
3

Run it against your agent

Pass several agents (or copies of one, made with duplicate) to compare them on the same cases.
4

Wait for it

The SDKs poll until the run is completed or cancelled. With HTTP, poll GET /v1/test_runs/{test_run_id}, or get the test_run.completed webhook.
5

Read the results

Read a try’s whole conversation with GET /v1/conversations/{conversation_id}/items, or open the run from the agent’s Tests in the console, where each attempt shows its conversation and plays its tasks inline.

Chat cases

In a chat eval the agent runs its latest draft (its published version when it has none, see Runs on a draft) with everything it has, including browser and computer tasks. Those tasks run unattended: nobody is at the screen, so they never ask questions (a task puts what it needs in its result, and the agent asks the customer in the chat), and a step that needs approval is refused unless the agent’s guardrails are in auto mode.

Browser cases

A browser case tests one task on a cloud browser, without the chat around it.
  • start_url (http or https) is where the browser opens. prompt is the task’s prompt.
  • The answer is the task’s result (or its error, when it fails), judged like a chat answer, with the task’s steps as the evidence.
  • There’s no simulated customer, and nobody answers the task’s questions or approvals: keep browser cases to tasks that don’t need to ask.

The simulated customer

During a chat eval, a model plays the person chatting. It gets the case’s persona and facts, and the conversation so far, and replies the way that person would.
  • It answers what the agent asks from its facts, and says it doesn’t know anything else. It never sees expected or the rubric, and never gives the answer away.
  • When the agent shows a form, it fills it in, as a person would in the chat.
  • It replies at most 4 times after the prompt and messages, and stops sooner once the agent has answered, only offers more help, or says who to go to next.
  • persona is up to 2,000 characters. facts are up to 50, by name: a value is up to 1,000 characters. Facts written as { "secret": "…" } are for desktop machine cases (typed into the machine), and a chat customer never gets them.
  • A test set’s customer is used for its cases that have none.

How an answer is judged

For chat and browser cases, the judge gets the request, the whole conversation, the expected answer, the rubric, the agent’s answer and the evidence: everything the agent’s tools returned and every task’s goal and result (and, for a chat case, the agent’s own instructions). It returns: Each attempt ends with an outcome:

must_visit

must_visit makes sure the answer comes from the right place, not from what the model remembers. Each entry is a host or a URL (kept as its lower-case host); a.example.com|b.example.com means either one. A subdomain counts (support.example.com covers pcsupport.support.example.com); a lookalike host doesn’t. A site counts as opened when one of the agent’s browser tasks started on it (the agent’s start page, or a browser case’s start_url) or opened it during the task. If one is missing, the attempt fails whatever the judge said, and the reason starts “Didn’t open …”. metrics.visited lists the sites the attempt opened. Since a task’s start page counts as soon as the task runs, list a site the agent has to go to, not the one it starts on.

Cold runs and procedures

In a normal run, the agent has its procedures, and a first browser task that works can become a new procedure that later tries use, as it would with customers. A run with "cold": true hides the agent’s procedures from chat cases: none are listed, find_procedure isn’t offered, tools a procedure unlocks stay locked in the chat, and no new procedure is written from the run. (Browser cases still see the agent’s procedures.) Run cold to get a baseline, then a normal run, and compare them to see what the procedures are worth.

Inputs

A procedure often has dynamic variables, like {mtm} or {region}. Give a case inputs, sets of values for them, and write {name} where each goes: in prompt, messages, expected or success.rubric. Each set runs as its own tries, with its values filled in, and the simulated customer knows them, so it answers when the agent asks. Two sets and three tries make six tries. Each attempt says which set it ran (input, input_set).

Tie a case to a procedure

Set a test case’s procedure_id to the procedure it checks. The procedure then shows its evals (evals on the procedure, in the API and in Procedures): how many cases are tied to it, and its latest run of them, with the pass rate, how many tries found the procedure, and the revision they found. current is false once the procedure has a newer revision than the one the run tested: run its cases again. Each attempt keeps the revision of every procedure its agent found in procedure_revisions. Cold runs don’t count, since they hide procedures.
In the console, a procedure’s page lists its evals and runs them, and the procedures list says which ones were tested on their current revision.

Runs on a draft

A run tests what you’re editing: each agent’s latest draft, its unpublished changes, so you see how a change does before customers get it. An agent with no draft runs its published version. Each try runs the agent’s draft as it is when that try starts (chat, browser and machine cases alike), so save your changes first and leave the draft alone while it runs. The run’s agent_version says "draft", its agent_versions the version each draft was made from (base), and the run keeps each draft as it was when the run started, to open again later. To test the published versions instead, send "agent_version": "published". Only admins and API keys run drafts (a draft can have looser guardrails); a member’s runs use the published versions. In the console, an agent’s Coach offers a run like this after it changes the agent, and tells you how the draft did against the run before.

Test sets

A test set is a list of cases to run together, with a default number of tries (repeat, 1 to 20; 1 when you leave it out) and a default customer for its cases that have none.
POST /v1/test_sets/{test_set_id}/cases adds cases (or changes the repeat of ones already in it), DELETE /v1/test_sets/{test_set_id}/cases/{test_case_id} takes one out, and PATCH with cases replaces the whole list. Deleting a set keeps its cases and its runs.

Managing test cases

Create cases with POST /v1/test_cases, change them with PATCH /v1/test_cases/{test_case_id} (only the fields you send change, and the result must still be a valid case), list them with GET /v1/test_cases?runs_on=&tag=&category=&test_set_id=&q=, and delete them with DELETE /v1/test_cases/{test_case_id}. To load a whole set of cases from a spreadsheet or benchmark, POST /v1/test_cases/batch creates or updates up to 500 at once, matched by key, and with test_set_id adds them to that set. Run it again after editing your file: a case with a known key is replaced by what you send, and new ones are created. It returns { "data", "created", "updated" }. To write procedures and the cases that check them together, use POST /v1/agents/{agent_id}/procedures/batch.

Runs and attempts

POST /v1/test_runs runs a test set (test_set_id) or a list of cases (test_case_ids, up to 5,000 ids or keys) against each of agents, 1 to 20 agent ids (required). Anyone in the org can start one. Tries per case are the first of:
  1. repeat_by_case[case] in the request,
  2. repeat in the request,
  3. the case’s repeat in the set,
  4. the set’s repeat,
A run has at most 5,000 attempts. It freezes a copy of each case, so editing a case later doesn’t change a run that already started. It’s also tied to the agent versions it ran: on the published versions, every try runs the version that was published when the run was made, so publishing during a run changes the next run, not this one. A rerun runs what each agent is now, as a new run does: its latest draft, or what’s published now. The run’s agent_versions says which version each agent ran ({ "billing": { "version": 4, "draft": false } }), and GET /v1/test_runs/{test_run_id}/agents/{agent_id} returns that agent’s settings as the run ran them. GET /v1/test_runs?agent_id=billing lists the runs that tried an agent. In the console, an agent’s Tests list them, and opening an agent from a run loads the version it ran into the editor, marked as an older version, to save as the draft.
A run is queued, then running, then completed once none of its attempts are left (or cancelled). pass_rate is passed over passed and failed, per agent (errors aren’t counted). grounded_rate is the share of scored chat and browser attempts that were grounded, or null when there were none. test_run.completed is sent to your webhook when it ends.
  • GET /v1/test_runs/{test_run_id}/results has a row per case and agent (tries, passed, failed, error, cancelled, all_passed, time and price) and breakdowns by_agent, by_tag and by_category, plus the run’s totals and a progress timeline. It counts the last attempt of each try, so an error that was retried counts as its retry. Time is active_seconds, with median_seconds and p90_seconds per try. Price is price_cents: what the agent’s tokens cost at its list price, rounded up to a cent per chat reply and per task, retried errors included.
  • GET /v1/test_runs/{test_run_id}/attempts?test_case_id=&agent_id=&outcome= lists the attempts.
  • GET /v1/attempts/{attempt_id} is one attempt, with the copy of the test case it ran (for now without its expected, messages, start_url and must_visit).
  • POST /v1/test_runs/{test_run_id}/cancel stops a run. POST /v1/test_runs/{test_run_id}/rerun with { "only": "failed" } (or "error", or "all") starts a new run of those (case, agent) pairs.
A chat attempt looks like this:
  • answer is the agent’s last message (or a browser case’s task result). conversation_id is the attempt’s conversation; read it with GET /v1/conversations/{conversation_id}/items.
  • task_id and replay_url are the first task the attempt ran, when it ran one.
  • customer is the simulated customer’s turns, with any form it filled in.
  • procedure_ids are the procedures the agent used, and procedure_revisions the revision of each.
  • metrics.active_seconds is the time the agent spent replying, including the tasks it waited on, but not the customer’s turns or the judging. metrics.price_cents is what its replies and tasks cost.

Comparing runs

GET /v1/test_runs/compare?ids=tr_a,tr_b puts 2 to 10 runs side by side, the first as the baseline: each run’s totals and by_agent, each case’s results per run and agent, and per run how many (case, agent) pairs improved, regressed or stayed the same against the baseline. Cases line up by test case and agents by agent id, so runs of a set, reruns, cold and normal runs, and runs with other agents all compare.

Picking a model

Add models to a run to try the same agent on several models: each agent and model is its own column, <agent_id>@<model> (in agents, pass_rate, the results’ by_agent and each attempt’s agent_id), and variants says which is which. When a run has two or more columns with a pass rate and a price, its results carry a recommendation: the cheapest a try whose pass rate is within 5 points of the best, with its pass rate, price a try, median time and a one-line reason (best is the one it beat on price, saves the share of its price). final is false while the run is still going.
In the console, Compare models on a run’s page starts one, and its page shows the pick with a button that switches the agent to it (in its draft, to publish). The agent’s Coach can offer one too, and tells you which model to use when it finishes. A run for one procedure’s cases (started from the procedure’s page, or with procedure_id on the run) is about that procedure: its pick’s button sets the procedure’s own model, and the rest of the agent keeps its model. Its Compare models run and its reruns keep the procedure_id. A run whose cases are tied to several procedures (each case’s procedure_id) gets a pick for each procedure in its results’ procedure_picks: each procedure’s cases on their own, so one procedure can move to a cheaper model while another keeps a stronger one, and the agent keeps its model for everything else. A case no model passed isn’t counted (it can’t tell models apart: it’s expected to fail, or broken), and a model needs min_tries (5) scored tries on a procedure’s cases to count. The console shows a row per procedure with a button that sets that procedure’s model, and Apply all. Switching the whole agent is offered only from the cases tied to no procedure (rest).

Billing and limits

The agent’s work in an eval is billed like any other: its chat replies and tasks, for their tokens, at the agent’s model’s price. The judge and the simulated customer are free. Chat and browser attempts run on Eager’s servers, several at once; a browser case also waits for room under the org’s cloud browser limit. Desktop machine attempts don’t count toward the org’s limit on tasks at once: the runners’ slots limit them instead.

Desktop machine cases

A desktop machine case is a problem on a machine and a way to tell it’s fixed. For every try, Eager makes a fresh machine, breaks it the way the case says, runs a real task on it with your agent (the same agent loop, guardrails, recording and replay as a customer’s), and then checks the machine itself.

How a machine try is scored

The machine’s end state decides. The agent saying “Done.” never counts.
  • A check script runs on the machine (elevated, as the signed-in user) and prints True once the problem is fixed. It runs twice: before the task, where it must print False (proof the setup really broke the machine), and after it. For a case that asks a question rather than fixes something, the script reads the agent’s final answer from the GH_AGENT_ANSWER environment variable. GH_CHECK_PHASE says which run it is (before or after): a case where nothing is broken beforehand, like a risky request the agent should refuse, prints False when it’s before. A script can also be sent as { "base64": "…" } (UTF-8), for firewalls that refuse a request whose body holds a script that looks like an attack; it’s stored and returned as plain text.
  • A rubric says what a fix looks like in plain language. A model judges it from the recorded conversation and the first and last screens.
  • A case can have both. An attempt passes only when each one it has passes. A task that failed or hit its time limit is still checked: the machine may be fixed anyway. A check that prints something other than False before the task is an error.
On a machine, the simulated customer gets the agent’s question and the machine’s screen. A fact written as { "secret": "…" } is never shown to the model: it only knows the fact’s name, and can type the value into the field that has focus, the way a person types a password. clicks_admin_prompts: true (the default) lets it click Yes on an admin (UAC) prompt when the agent asks, and does_steps: false (the default) makes it hand steps back (“Could you do that for me?”) when the agent asks it to do the fix itself. It answers every question the agent asks (as your team, when the agent keeps its questions for your team); approvals follow operator.approvals. Every machine in a run runs the same desktop app: a run’s app_version is "latest" by default (the newest release when the run starts, so one released partway through doesn’t mix versions), a version like "1.0.28" to test an older or exact one, or "any" to leave each machine with whatever it has. Each machine attempt records the app_version it ran; chat and browser attempts have null. A machine attempt’s check has the check’s output before and after, and its metrics its steps, questions and approvals.

Start states

A start state is the machine each try begins from. Images (kind: "image", such as win10-22h2) are a runner’s base OS install: read-only, and every org sees them. Your own start states (kind: "state", ids ss_…) are machines made from an image or from another start state, then saved. A case uses one through its start_state, and its setup_script runs on top. Use a start state for setup that’s slow or can’t be scripted: an app that has to be installed and signed in, a printer that has to be added, a problem only a person can create by clicking. There are three ways to make one with POST /v1/start_states: start_state.ready or start_state.failed is sent to your webhook when a build ends. To set one up by hand, or to change a saved one, open its machine:
  • POST /v1/start_states/{start_state_id}/open boots a machine from its current version (status: "open").
  • GET /v1/start_states/{start_state_id}/screen is its screen as a PNG.
  • POST /v1/start_states/{start_state_id}/input sends { "events": [...] }: { "type": "click", "x", "y", "button"? }, double_click, move, { "type": "scroll", "x", "y", "dy" }, { "type": "type", "text" } and { "type": "key", "keys": ["CTRL", "ALT", "DELETE"] }.
  • POST /v1/start_states/{start_state_id}/save keeps the machine as the next version (saving, then ready). POST …/close discards the changes; a hand-made start state that was never saved is deleted.
Screen and input go through the hypervisor, not the desktop app, so they work on admin prompts and the sign-in screen too. An open machine closes itself after 2 hours without input. The console’s Start states tab does all of this in the page.
A start state that test cases use can’t be deleted: DELETE answers 409 with code: "in_use" and the cases in test_case_ids.

Runners

Machines live with runners: a small process next to a hypervisor that makes, runs and saves test machines. It connects out to Eager, so it needs no inbound ports. Eager’s cloud runners serve every org with images such as win10-22h2 (runs_on: "vm"). You can also run your own, for hardware or images of your own: a lab of real laptops, a Windows build with your software installed, a machine inside your network. Your runners serve only your org, and your attempts go to them first.
  1. Register one with POST /v1/runners { "name": "lab-1" } (admin). The response has its token (gh_rn_…), shown once.
  2. Start the runner with that token on a Linux host with KVM (a bare-metal server, or a cloud VM with nested virtualization). It says which images it has, its labels and how many machines it runs at once (slots):
    The runner (Node 22, no dependencies) comes with a QEMU/KVM provider and the scripts that build a Windows 10 image. To run your own, contact us for the package and the setup guide.
  3. Give cases that need it a matching runs_on, for example "runs_on": "hardware" for a runner labelled hardware.
GET /v1/runners lists your runners and the cloud ones, a page at a time, with status (online or offline), busy and slots. DELETE /v1/runners/{runner_id} revokes the token and disconnects it.

Permissions

Anyone in the org can read test cases, sets, runs, attempts, start states and runners, and start, cancel and rerun runs (runs test agents’ drafts only for admins and API keys, as a task on a draft does; a member’s runs use the published versions). Creating and changing test cases, test sets, start states and runners, and deleting runs, needs the admin role or an API key.

In the SDKs

The SDKs’ test case types were written for desktop machine cases: they don’t take expected, messages, start_url or must_visit yet, runs don’t take cold, and the JavaScript types don’t list a run’s grounded_rate or an attempt’s answer, grounded, score and conversation_id (the values are there at run time). Create chat and browser cases, and cold runs, with the HTTP API; the rest of the SDKs works with them as shown above.
Every endpoint is in the API reference, under Test cases, Test sets, Test runs, Start states and Runners.