Skip to main content
The verifier runs after the agent. Its entry point is tests/test.sh, and its result comes from a reward file.

Write a reward

This verifier checks the example instruction:
tests/test.sh
The reward file determines the score. The script’s exit code alone does not. A nonempty reward.json takes precedence over reward.txt. The primary reward is the reward field, or the only field in a one-field object. A primary reward must be in [0, 1].
/logs/verifier/reward.json
Multiple metrics without a reward key produce a scored trial with no primary reward. That trial cannot contribute a primary success to pass@k.

Choose where verification runs

The verifier runs in the agent’s sandbox. It can inspect the filesystem and processes left by the agent. Agent credentials are revoked before verification begins.
task.toml
Test files are uploaded to /tests/. Install verifier dependencies in the task image; a tests/Dockerfile is not built in this mode.

Separate verification

A verifier with its own Dockerfile keeps grading dependencies out of the agent’s image.
With environment_mode omitted, [verifier.environment] selects separate mode. An explicit environment_mode = "shared" keeps verification in the agent sandbox.

How the verifier image is selected

The effective configuration is [verifier.environment] when present; otherwise, it copies [environment]. The task source must still contain a nonempty tests/test.sh, including when a distinct prebuilt verifier image already contains it. A tests/Dockerfile is not built when the effective configuration pins an image. The import records a tests_dockerfile_not_built note if that unused file exists.

Prepare outputs for collection

Most tasks only need an artifacts list. If outputs need preparation after the agent finishes, add pre_artifacts.sh at the task root. It runs from the task’s working directory.
pre_artifacts.sh
This example assumes the agent produces /app/summary.json. A custom collection script must also provide /logs/artifacts/model.patch; it can be empty when the task does not produce a patch. If you omit the script, Evolve prepares that file for you.

Collect from a service

[[verifier.collect]] runs a command before artifact collection. For a multi-container task, use service to choose the container. For a single container, omit it or use main.
task.toml
This example assumes an api service with a /stats endpoint and curl installed. Hook failures are logged and do not stop the run. Make the verifier reject missing evidence when it is required for a valid score. Main-service hooks run before collecting its files. In separate verification, Evolve then stops main, runs sidecar hooks, and collects sidecar files. Shared verification keeps the containers running. Sidecar artifacts retain their source paths in the separate verifier. timeout_sec defaults to 60 seconds. Compose hooks can set user to choose an existing container user. Single-container hooks do not accept that override.

Grade with a model

Reward Kit combines reusable checks, custom Python, and model judges. A verifier can request model access for an LLM judge:
task.toml
Evolve supplies a gateway credential and the matching base URL. Recognized credential families are Anthropic and OpenAI; these templates are not job secrets. They also work under no-network through the judge gateway. For a Reward Kit judge, override its agent and model for one job with:
These are the only accepted --ve keys. Judge spend is reported separately from agent spend. Its independent cap is the smaller of the agent’s per-trial cap and $5. Judge-enabled trials are not currently regradable.
Ask a coding agent to load evolve skills get rewardkit for verifier authoring guidance. Use evolve skills get create-task for the complete task workflow.