A regression test for an agent is a trial: one fixed version of the agent meets every task on a bench, every attempt runs in a fresh world, and every attempt is graded on its own. Done properly, with every task, every kind of simulated user and three repeats, it takes hours. A pull request cannot wait for hours. So teams either skip the check on pull requests, or run a thin one that proves little, or run the full one and stop reading it because it is always still running.
The pattern that works has two trials and one rule. This post is the short version; the guide has both workflow files and the setup.
The two trials share one script and one candidate template. Each run builds the agent's container image and pushes it by digest, registers that image as a new candidate, adds the candidate to the trial named by TRIAL_NAME, polls until none of its attempts is still running or waiting for a grade, and reads its pass rate. The pull-request workflow differs from the nightly in three lines: the trigger, the trial name, and how long it is willing to wait.
on:
pull_request:
# ...build and push the image by digest, then:
- name: Run on the bench
env:
BENCH_API: ${{ vars.BENCH_API }}
BENCH_ID: ${{ vars.BENCH_ID }}
MIN_PASS_RATE: ${{ vars.MIN_PASS_RATE }}
VERIS_API_KEY: ${{ secrets.BENCH_API_KEY }}
TRIAL_NAME: pr-check # the small trial, started once with a few task ids
IMAGE_REF: ${{ env.IMAGE }}@${{ steps.build.outputs.digest }}
CANDIDATE_JSON: bench/candidate.json
WAIT_MINUTES: "45" # the nightly waits 300
run: bash .github/bench/regression.sh
A trial fixes the bench's tasks at the moment it starts, which is what makes every build comparable with the last. It is also why the small trial is started once by hand with the task ids you choose, and why the script refuses to add to a trial whose tasks were edited after it started. When the bench changes on purpose, you start a new series under a new name and the old one keeps its results.
The job fails only when the top of the new version's 95% confidence interval is below the floor you set. Not the pass rate itself. A pass rate over a few dozen attempts moves between runs with nothing changed, and a gate on the point estimate fails builds for noise until somebody turns it off. Judged on the top of the interval, noise alone rarely fails a build and a real drop still does. Start the floor a little below the agent's current pass rate, and raise it as the agent improves. With the floor at zero the job reports and never fails, which is a reasonable first week.
The card-replacement agent in the Veris cookbook has run the nightly half of this pattern every night since the end of September. The workflow builds the agent from the main branch, adds it to one long-lived trial on a card service desk bench, waits for its 72 attempts (24 tasks, three repeats) and redraws this chart from the whole trial.
Each dot is one night's pass rate; the bar is its 95% interval; a hollow dot is a night where some attempts did not count. Drawn live from the cookbook's results branch.
Two things about it are worth copying. First, the honesty of the README: the agent's code only changes when the repository does, so night-to-night movement is mostly the models drifting (the agent's, the simulated customer's and the judge's), and with 72 attempts the interval is about eleven points either way, so read trends rather than single nights. Second, the bench grades on the tool trace, the SQL ledger and the transcript, never on what the agent says it did. The README even names a known bug (seven tasks fail until the agent can find a card by its owner) that will show up as a step in the chart when it is fixed. That is what a regression series is for.
The bench is set up with Veris during an engagement: twins of the systems the agent touches, built and seeded; the first exam drafted and signed off by your subject-matter experts; your agent connected as version one. The CI hook is what your team runs afterwards, and after handover the team adds versions, tasks and personas itself, from the console, the API, or a coding agent reading the docs. The workflow files, the candidate template, the one-time call that starts the small trial and the failure messages are all in the guide; the script itself is in the Veris Bench docs.
Book a demo. We build the first bench around your workflows and your systems, and hand over the CI hook with it.
Book a demo