Set up and drive Suwageval, the evaluation server for LLM agents, through its suwageval CLI. Use when the user wants to evaluate or test an LLM agent with Suwageval, write or fix scenarios and checks, validate them, run them, or find out why a scenario failed, or asks to install or troubleshoot the suwageval CLI.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Suwageval?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/manomenu-suwageval)
---
name: suwageval
description: Set up and drive Suwageval, the evaluation server for LLM agents, through its suwageval CLI. Use when the user wants to evaluate or test an LLM agent with Suwageval, write or fix scenarios and checks, validate them, run them, or find out why a scenario failed, or asks to install or troubleshoot the suwageval CLI.
---
# Suwageval
Suwageval replays a recorded conversation against an LLM agent, lets the agent answer the last
message, and checks that answer. You drive it through the `suwageval` CLI, run through Bash.
Source and docs: https://github.com/Manomenu/suwalski-agent-eval
**Show results on the web.** The web app is the readable view of everything the CLI prints. When you present results to the user
(a run, a comparison, the problems, the trend, versions, monitoring checks or a conversation), open the matching page with the
command's `--open` as the default, and say in one or two lines what is on it; use the text or `--json` output for your own reading.
Leave the browser closed only when the user said so, or when nothing would open (no display: then give the link `--open` printed).
**How to run a command with `--open`**, or the browser silently does not open:
- **One command per Bash call, its output not piped or captured**: no `| head`, `| tail`, `| grep`, no `$(…)`, no `&&` chain after
it. The command ends right after handing the page to the system's opener; a closed pipe kills it before the browser starts.
- **Outside Claude Code's sandbox**: the sandboxed shell cannot reach the user's desktop, and the opener still exits 0. Run it with
the sandbox off (the Bash tool's sandbox override, which the user approves), never in the background.
- **Never with `--json`**: they are refused together. Read the data with `--json` in one call, open the page with `--open` in another.
- **Check it opened**: the command prints the page's address; when you cannot be sure the browser showed it, give that address
to the user as a link.
## First: is it installed?
```bash
command -v suwageval && suwageval --help
```
`command not found`: the CLI is not installed. Go to **Setup**.
## Setup
Needs the .NET 10 SDK, git and `just`. Give the user the lines to run, prefixed with `!` so they
run in this session's terminal:
```
! git clone https://github.com/Manomenu/suwalski-agent-eval ~/repos/suwalski-agent-eval
! cd ~/repos/suwalski-agent-eval && just cli-install
```
The CLI talks to the Suwageval server through the address of its **web app**; the API is under
its `/api`. The address is `--server` on a command, else `SUWAGEVAL_URL`, else `suwagevalUrl` in
`suwageval/agent.yaml`, else `http://localhost:3230` (a laptop running `just web` in the clone).
The agent's own address (`validate`, `run`) is `--endpoint` on the command, else `SUWAGEVAL_ENDPOINT_URL`, else
`endpointUrl` in `agent.yaml` (`run` then uses the endpoint registered by `push`).
`validate` and `init` need no server.
`push` and `run` need the server, and `run` needs the agent itself running too.
**Older than the server.** A newer server may add fields to its answers; the CLI skips the ones it does not know. When a
command still fails with "The server's answer could not be read" followed by "This suwageval (…) is probably older than the
server (…)", the installed CLI is behind the server: do not retry and do not work around it. The CLI is installed from the
user's clone of the suwageval repository, wherever they keep it: if its folder is not known from this conversation, ask for it
(never assume a path). Then give the user the update line with that folder, and run the command again once they have run it:
```
! cd <the suwageval clone> && git pull && just cli-install
```
## The workflow
- **Scenario files are code in the agent's repository**, in `suwageval/`: `agent.yaml` and
`scenarios/*.yaml`. Git versions them together with the agent. Never edit them on the server:
change the file, then `push`.
- **Read before writing.** Read the existing files in `suwageval/` and copy their style. The
format (agent, scenarios, checks, shorthands, one complete example) is specified at
https://raw.githubusercontent.com/Manomenu/suwalski-agent-eval/master/docs/scenario-format.md
— fetch it when you write or change a scenario; do not rely on memory.
- **Never invent tool or event names.** Take them from the agent's contract: `GET
{endpointUrl}/suwageval/contract` (the `endpointUrl` is in `agent.yaml`) lists its LLM agents (each with
the tools it may call and their argument schemas) and its events, or read them from `suwageval validate` output.
- **After every change to the agent**, run `suwageval validate`: it lists the scenarios that no
longer fit the agent's contract (a renamed tool, a removed event). Fix those files.
- A version is never written in a file: the running agent serves it, and `run` records what
really ran.
## Commands
`suwageval --help` groups the commands by area (Evaluation, Monitoring, Agent); the names are flat, except the Monitoring area's, under `suwageval monitoring`.
| want | command |
| --- | --- |
| set a repository up (no `suwageval/agent.yaml` yet, or a field to change) | `suwageval init [path] --name N --endpoint-url URL [--suwageval-url URL] [--monitoring [--close-after 30m] [--environment E]…]`: give every value as an option, since there is no terminal to ask on; `--monitoring` switches monitoring on and prints what the agent needs (the SDK's `AddSuwagevalMonitoring` and `Record`, three `Suwageval__*` settings); an existing file keeps its comments and other fields, and a repeat changes nothing |
| check the files and the names against the agent's contract | `suwageval validate [dir]` (`--json`, `--offline` to skip the agent, `--endpoint URL`) |
| send the agent, scenarios and checks to the server | `suwageval push [dir]`: the server's scenarios and checks become those of the files; a removed file or check is deleted there (`deleted`), past runs keep it |
| run the scenarios and wait | `suwageval run --wait --json` (`--tag <tag>` for some scenarios only, repeat it for the scenarios with any of the tags; `--group <name>` to put the run in a group, e.g. the runs of one sweep over models (an experiment: no regression states, not in the trend; it exits 1 when any check fails, as `--strict`); `--ref <branch>` to compare with another branch's reference runs; `--strict` to exit 1 on any failed check) |
| run an earlier run again | `suwageval run --wait --json` with that run's tags (`--tag`, from `runs --json` or `results --json`), its `--group` and `--endpoint` when they differ; there is no `rerun`: the web's "Run again" does the same |
| check the acceptance criteria the scenarios guard (`acGuardrail: { id: AC-<feature>-<n>, retryLimit }` in a scenario; `acGuardrailRetryLimit` in `agent.yaml`, default 5) | `suwageval push` then `suwageval gate --json` (`--note "<why>"`): every scenario with an `acGuardrail`, each until its first attempt in which every check passes (`samples` and `passThreshold` do not apply), stopped at the first criterion whose attempts run out. Read `gate.passed` and `gate.failedGuardrail`, and for the failed scenario `acGuardrail.attempts` and the `message` of its checks on each sample (an attempt is a sample). Without `--json` it is quiet: `PASSED n of n acceptance criteria` alone, or for each failed criterion every attempt's failed checks with the reason and what the agent did in its last attempt. Exit 0 every criterion passed, 1 one failed, 2 the gate could not start or finish. Use it after changing the agent, before saying the change is done: it belongs to the agent repository's local full gate (`just check` in the example agent), never to CI, which has no Suwageval, running agent or model. A gate run is in no list and on no page of the web (`suwageval results <runId>` still reads it), and it is not re-checkable: run it again |
| judge a finished run's stored answers again with the current checks (no agent call) | `suwageval recheck <runId> --wait --json` (`--strict`); `--dry-run` first prints what would be evaluated again (exit 0 when no check changed: nothing is started). Use it after fixing a check; `run` is for when the agent changed |
| set or clear the note of a run (why it was started; free text, 500 characters) | `suwageval note <runId> "<text>"`, `suwageval note <runId> --clear`; at the start `suwageval run --note "<text>"`. A note changes no verdict, so setting one needs no confirmation |
| set or clear the note of a run group (what the experiment is about; shown only in the group's comparison) | `suwageval note --group <name> "<text>"`, `suwageval note --group <name> --clear`; at the start of a sweep `suwageval sweep --note "<text>"`. Needs a group that has runs. Needs no confirmation |
| stop a queued or running run | `suwageval cancel <runId>`: samples in flight finish, no new one starts; a finished run stays as it is. Only for a run the user asked to stop |
| read a run's results (status, version, tags, branch, regressions, failing checks with reasons, turn times) | `suwageval results <runId>`: text on stdout; waits for a run still going. Prefer it to opening a browser |
| only what needs attention in a long run | `suwageval results <runId> --failed-only`: failed checks, checks not judged and samples with an agent error, plus how many passed checks and scenarios were left out (`--json` is not narrowed) |
| a run's results as JSON | `suwageval results <runId> --json` |
| open a run on the web, the default when you present it to the user | `suwageval results <runId> --open`; with `--print` the page also opens the browser's print dialog (A4 landscape, "Save as PDF" is in it): for a person at the screen, only when they ask to print the run — never print on your own |
| list the agent's newest runs | `suwageval runs` (`--limit N`, `--json`; `--version <id>` repeatable for the runs of some versions, `--reference` for reference runs only, `--tag <tag>` repeatable for the runs that ran the scenarios of any of the tags (runs limited to other tags are left out; unlimited runs stay), `--data-version <v>` repeatable for the runs on that retrieval data, `--group <name>` for the runs of one group, `--any-group` for the runs in some group, `--all-runs` for both; without them only the runs in no group are listed; gate runs are never listed; `--groups` to list the groups instead, `--archived` with it for the archived ones): per run id, status, tags, version (and the run's `label`), its data version, checks passed, time, branch, a `reference` mark, the judge model(s); `--open`: the agent's Evaluation page on the web instead — the default when you present it to the user |
| find the agents on the server (the repository has no `agent.yaml`, or the user asks what exists) | `suwageval agents` (`--json`, `--server`): name, endpoint, creation time; `--open`: the agents list on the web instead — the default when you present it to the user |
| list the agent's scenarios | `suwageval scenarios` (`--tag <tag>`, `--json`): key, revision, number of checks, tags |
| read one scenario as the server stores it | `suwageval scenario <key>` (`--json`): the conversation, every check with its definition, the revisions, the tags. Use it before changing or explaining a scenario that is not in the working tree |
| see how the pass rate moved over the runs | `suwageval trend` (`--json`): per finished run, oldest first, pass rate, median and p95 turn time and the rate per tag (only for a tag whose every scenario the run ran: a `--tag` run has no rate for another tag it ran in part); `--open`: the agent's Evaluation page on the web instead — the default when you present it to the user |
| what is wrong with the agent beyond one run: checks that pass in some runs of a version and fail in others, scenarios where the agent gave no answer (HTTP error, timeout) | `suwageval problems` (`--json`: `{ unstableChecks, agentErrors }`; `--version <id>` and `--data-version <v>` repeatable): open ones only, i.e. the newest version (not archived by default) that ran it has the problem; an unstable check gives `scenarioKey`, `checkKey`, `passedRuns` of `runs` and the version; an agent error gives `errors` of `samples`, `newestErrorRunId`, `newestError`. Agent-error samples do not count against checks: an agent that fails there is unreliable itself, not a check to fix. "No unstable checks and no agent errors." when none; `--open`: the agent's Evaluation page on the web instead — the default when you present it to the user |
| run the scenarios once per variant of the agent (models, prompts, settings: the `sweep:` section of `agent.yaml`) | `suwageval sweep <variant>...` (the variant names are the files of `sweep.variantsDir`; `--tag`, `--endpoint`, `--ref`, `--group <name>`): for each variant it runs `reconfigure`, waits until the agent's contract `label` equals the variant's name, starts a run in one group and waits for it; `restore` and `after` always run. Prints a row per variant and the group's compare link. `--select` asks in a terminal, so never use it here: name the variants. Give `--group` a name (see **Names**) instead of the default `sweep-<time>-<agent>` |
| put up to 7 runs of one agent side by side (for example the variants of a sweep, started with the same `--group`) | `suwageval compare <runId>...` or `suwageval compare --group <name>` (`--json`): prints on stdout, no browser, absolute values — a lettered column per run (version label, models, checks passed, samples answered, turn times, the judge model when a model judged some check), the pass rate per tag and the checks per scenario with the failed ones (a model-judged one marked `(model-judged)`: its verdict can vary between runs). There is no default baseline. Prefer it to opening a browser. Exit 2 for an unknown run or group or runs of different agents |
| read the others against one of those runs | add `--baseline <runId>` (one of the runs; with `--group`, any run of the group): also prints, against that run, each run's judge model, pass rate and turn time changes, the pass rate changes per tag and the checks that differ with the trend (▲ better, ▼ worse), with a `judge differs from baseline` warning when the judge model changed |
| archive, restore or delete a run group | `suwageval groups archive <name>...` / `unarchive <name>...` (hidden from the web's Groups section, kept); `suwageval groups delete <name>` deletes an archived group with its runs (`--dry-run`, `--yes`; ask the user first: it cannot be undone) |
| open that comparison on the web, the default when you present it to the user | `suwageval compare <runId>... --open` (or `--group <name>`; with `--baseline` when meant); `--print` makes the page open the browser's print dialog (every comparison, at most 7 runs, fits a printed page): only when the user asks to print |
| list the conversations the deployed agent sent (monitoring on: `features.monitoring` in `agent.yaml`) | `suwageval monitoring conversations` (`--limit N` up to 100, `--environment <name>`, `--version <id>` repeatable, `--state Open|Closed`, `--failed-check <key>` for the ones that failed a monitoring check, `--json`): per conversation id, environment, state, turns, the version of its last turn (marked when it changed during it), the last turn, "not checked" / "checks passed" / "N checks failed", the agent's own id of it; "No conversations." when none; `--open`: the Monitoring page on the web instead, narrowed to `--environment` and `--failed-check` — the default when you present it to the user |
| read one monitored conversation | `suwageval monitoring conversation <id>` (`--json`): its line, the monitoring checks it got (✓ passed, ✗ failed, ? not judged, with the reason), then each turn with its items (the user's message, tool calls and results, retrievals, events, the answer); `--open`: the conversation's page on the web instead — the default when you present it to the user |
| write the checks run on every real conversation | `suwageval/monitoring-checks.yaml` (`checks:`, each with a `description`; no `samples` or `passThreshold`; format in the file format doc), then `suwageval validate` and `suwageval push` |
| how the monitoring checks are doing | `suwageval monitoring checks` (`--environment <name>`, `--json`): per check its 7- and 30-day pass rate; `suwageval monitoring trend` (`--days N` up to 365, `--environment <name>`, `--json`): day by day conversations (with the count per environment when there are several), checked, the rate per check, then the deploys and data changes; `--open` (either): the Monitoring page on the web instead, narrowed to `--environment` — the default when you present it to the user |
| turn a monitored conversation into a scenario (a real failure becomes a regression test) | `suwageval scenario from-conversation <id>`: the draft YAML, the conversation copied whole or, with `--up-to-user N` / `--up-to-agent N`, up to its N-th user or agent message (included), with `--simulate [--turns N]` the rest simulated by a user a model describes from the whole conversation; the monitoring checks it failed at the end as comments, to build the scenario's checks from; `--write` writes `suwageval/scenarios/<key>.yaml` (never over a file); `/suwageval:from-conversation` walks it with the user |
| show what the server stores for the repository's agent | `suwageval agent` (`--json`): endpoint, number of versions, scenarios and checks, samples, regression settings |
| list the agent's versions | `suwageval versions` (`--usage evaluation|groups|monitoring|unused|archived`, repeatable or comma-separated, lists the versions with any of those usages: runs outside a group, runs in a group, conversations of the deployed agent answered, neither runs nor conversations, archived; the default is `evaluation,monitoring,unused` (a fresh version with no runs shows too); `--version <id>` repeatable narrows to those versions; `--environment <name>` narrows the monitoring to one environment; the text line and `--json` carry `runs` and `groupRuns`, and for a monitored version its conversations of 30 days, the last one, `current (<environment>)` where it answers now and `not evaluated` when it has no run: such a version is worth a run.); `--open`: the Versions page on the web instead, with the same `--usage`, `--version` and `--environment` — the default when you present it to the user |
| archive or restore versions | `suwageval versions archive <versionId>...`, `suwageval versions unarchive <versionId>...` |
| delete an archived version with its runs, samples and verdicts (cannot be undone) | `suwageval versions delete <versionId> --dry-run` first, then `suwageval versions delete <versionId> --yes` once the user confirmed; exit 2 (409) for a version that is not archived or has a queued or running run |
| delete the agent of this repository from the server (a registration made by mistake) with its versions, scenarios, checks, runs, samples and verdicts (cannot be undone) | `suwageval delete-agent --dry-run` first, then `suwageval delete-agent --yes` once the user confirmed; exit 2 (409) while a run of the agent is queued or running |
| see what changed between two versions of the agent | `suwageval versions diff <versionA> <versionB>`: a unified-style diff of both contracts on stdout (`---`/`+++` headers, `@@` hunks, `+`/`-` lines, `+A −R lines`, `No changes.`); the older is the base; `--json` prints the record; exit 2 for an unknown version. Read it instead of opening a browser; `--open` opens the page for a person |
| print one version with its contract | `suwageval versions show <versionId>` (`--json`); `--open`: the version's page on the web instead — the default when you present it to the user |
A run's page is `{SUWAGEVAL_URL}/runs/{runId}`.
The comparison of runs (one page, a column per run) is `{SUWAGEVAL_URL}/compare?runs={id},{id},...` or `{SUWAGEVAL_URL}/compare?group={name}&agent={agent}`; add `&baseline={id}` (one of the runs) to read the others against that run.
The comparison of two versions is `{SUWAGEVAL_URL}/agents/{agent}/versions/compare?a={id}&b={id}`.
### Exit codes
| code | `validate` | `run --wait`, `results --json` |
| --- | --- | --- |
| 0 | the files are valid | no regression, no new failing check and no agent error (with `--strict`: every check passed its threshold) |
| 1 | something is wrong | a check regressed, is new and failing, or is an agent error (with `--strict`: any check failed) |
| 2 | — | the run could not be started or finished |
`gate` exits 0 when every acceptance criterion passed, 1 when one failed, 2 when the gate could not start or finish (for example no
scenario has an `acGuardrail`).
`validate` exits 0 with a notice when the agent was unreachable: the names were then not
checked (`namesChecked: false` in `--json`). Say so; do not call the scenarios verified.
## Names
Where a command or a file lets you choose a name, choose one that says what it is, so a person reading the runs list,
the groups or the compare page later knows it without opening anything. Do this by default, without being asked:
- **`--group`** of `run` and `sweep`: lowercase kebab-case, what the runs compare and the day, e.g.
`models-gpt-4o-vs-mini-2026-10-23`, `prompt-concise-2026-10-23`. Never a bare `test`, `exp1` or a timestamp alone; reuse an
existing group's name only to add runs to that very experiment (`suwageval runs --groups` lists them).
- **`--note`** of `run`: one sentence on why this run is started, taken from the conversation ("after the refund prompt
was shortened", "checks the fix of order-status", "trying qwen3 as the agent's model"). Add it by default to every run you start,
in the user's language, and say in your summary which note you gave. When the reason is not known, leave the note out rather than
invent one. When the user says afterwards why a run was made, set it with `suwageval note <runId> "<text>"`.
- **The group's note**: when you start a sweep or several runs in one group, give the group a note by default: `suwageval sweep
--note "<what the experiment tries and why>"`, or `suwageval note --group <name> "<text>"` after the first `run --group <name>`
(a group exists once it has a run). One or two sentences in the user's language, taken from the conversation ("trying three
models on the refund prompt after the cost complaint"); never invented when the reason is unknown. Say in your summary which
note you gave. When the user explains the experiment later, set it then. Only the group's comparison shows it.
- **The contract's `label`** (when you wire or change the agent): the short git SHA of the agent's code (with `-dirty` when the
tree has changes), or, for an agent configured by a sweep, the variant's name exactly (the sweep waits for it). It names the
version on the web and in `compare`, and is not part of the version's content.
- **Scenario files and keys** say what is checked (`refund-damaged-item.yaml`, key `refund-damaged-item`), **check keys** what
the check asserts (`refund-called-with-order-id`, `explains-14-day-period`), **tags** a group of behaviour reused across
scenarios (`refunds`, `escalation`); copy the conventions of the existing files first.
## Wiring an agent to the contract
When you add or change the agent's `GET /suwageval/contract` and `POST /suwageval/turn` (format:
the spec above, "The agent contract"), these decisions are yours:
- **List every LLM agent of the system** in `agents`, each with its own `model`, its own `config`
(free text: its system prompt or whatever defines it) and only the `tools` it may call. Never glue
several prompts into one agent: a change to one of them must show as that agent's change. What
belongs to the system, not to one agent (retries, routing rules, timeouts), goes to `otherConfig`.
- **Set `label`** as **Names** says: the git SHA of the agent's code, or the variant's name under a sweep.
- **Report `agent` on every tool call** of a multi-agent system, the name from `agents`. Without it
`by:` checks cannot pass and the results cannot say who acted.
- **A tool the system's own code calls** (a deterministic step books a visit; no model chose it) goes to
`context.tools`, never under an LLM agent: same shape as an agent's tool, owned by no agent, so its calls
carry no `agent` and its checks no `by:`. One name is either a context tool or an agent's tool, not both.
- **`fixtures` only for what a scenario must fix explicitly** (for example the documents a retrieval
is pinned to). The agent declares them in `context.fixturesSchema`; it never reads a hidden header
or an environment switch instead.
- **Correlation baggage.** Every turn carries the W3C `baggage` header (`suwageval.run.id`, `.scenario.key`, `.scenario.type`,
`.sample`, `.scenario.tags`, `.run.tags`, `.run.group`), read by the SDK as `TurnRequest.Correlation`. It may go into the agent's
traces and logs. It must never change what the agent does, and an instrumented HTTP client may forward it to the model provider
(docs/scenario-format.md says how to stop that).
- **Report `sources`** (document ids) on the assistant messages whose answer is grounded, so `cited`
can check them.
- **Every conversation starts from the same test data**: a fresh copy per turn, no state carried over —
except within a simulation: the turns of one `conversationId` (always sent: a new one per sample, shared by a simulation's turns) go on
from the state the earlier ones left, and the first turn of a new id starts fresh.
- **Retrieval data version.** With `usesRetrieval: true` the contract needs `context.retrieval` with
`dataVersion`: each run keeps the data version it started with (not part of the agent's version), so runs are
filtered by their data (`suwageval runs --data-version`) and the comparison shows where it differs.
Compute it from the id of the index build (every rebuild gets a new one), or from a hash over
(document id, content hash) of every document plus the pipeline settings (chunking, embedding model,
index parameters). Never from a timestamp or "last updated" alone: a deletion, or a re-index with
other chunking or embeddings, does not move it. For repeatable runs point the agent at a frozen
snapshot of its data for evaluation, so `dataVersion` changes only when the snapshot is swapped on
purpose. `description` is for people (what the data is), kept on the run beside it.
## Choosing checks
- **`by:`** on `tool-called` / `tool-not-called` when the right tool from the wrong LLM agent would be
a bug. A call that names no agent never satisfies `by`, and a tool of `context.tools` takes no `by`.
- **`result:`** on `tool-called` when an argument is only right in the light of what the tool
returned (a refund for the id that `get_order` really returned).
- **`event-not-emitted`** is the negative of `event`; **`cited`** asserts that a grounded answer lists
the given `sources`.
- **`message-count`** counts the messages in scope, not their words: `role` (`user` or `assistant`, not set: both) with
`min`, `max` or `exactly`, and `where` for the turn (`where: { turn: last }`). Use it for "the agent answers in one
message" instead of a pattern over `text`, which reads a turn's messages joined. A plain scenario's turn holds no user message; a simulation's opens with the simulated user's.
- **`event` options:** `max: 1` (also `min`, `exactly`) counts the matching events: "a procedure starts at most once". `last: true`
with `data` compares only the last event of the type: an agent's state event read as where the conversation ended up, instead of a
check for every step that led there.
- **`text` lists:** `notContains: [a, b, c]` (and `contains`) instead of a regular expression with a negative lookahead.
- **`{ $pattern: ... }`** inside `args`, `data` or `result` instead of exact equality for values a model
writes loosely (case, spaces, abbreviations). Anchor it (`^...$`), `(?i)` for case. Exact equality for
ids and numbers.
- **`durationMs`** of a turn is measured by Suwageval; the agent reports nothing for it, and there is
no check on it, only the run's results.
## Scenarios of several steps
A conversation of several real steps is split into several scenarios. Each one holds the earlier
agent answers as predefined log items, and checks only its own step. Those answers are **recorded from
a real run of the agent**, never invented: take them from `suwageval results <runId> --json` or the
agent's own log. Never script fixed user messages after an answer you do not know: the next user
message must fit what the agent really said.
To see how the agent copes with a whole conversation (a frustrated customer, someone trying to talk it
into something), write a **simulated scenario** instead: `continuation.simulatedUser` describes the user
in plain words (goal, temperament, situation, what they know, language) and `continuation.turns` (up to
20) caps the turns; Suwageval plays that user with a model, who may end the conversation earlier. Its
checks look at the whole conversation, never a turn by number: "happened at some point" (`tool-called`,
`event`, `text` `contains`) or "never happened" (`tool-not-called`, `event-not-emitted`, `text`
`notContains`), and a `judge` check for the agent's behaviour over the conversation (the simulated user is
never judged). Give it several `samples` and a `passThreshold` below 1 for what depends on the course of
the conversation. A sample whose user could not be played is `NotSimulated` (`Not simulated: …`): not the
agent's fault, run again. Format: the "Simulation" section of the scenario format.
## Judge or deterministic check?
Prefer a deterministic check (`tool-called`, `tool-not-called`, `event`, `event-not-emitted`, `cited`, `text`, `message-count`) whenever one can
say it: exact, free, repeatable. Use `type: judge` with `criteria:` only for what needs reading —
tone, completeness, whether a refusal was explained. Write the criteria as one concrete, checkable
statement about the output ("states the 14-day refund period", not "is helpful"), one thing per
check, and narrow it with `where` (`turn: last`). A judge calls a model, so it can come back
**not judged** (`notJudged: true`, message `Not judged: …`): the model was unreachable or answered
unreadably. That is not the agent failing — say so, and run again before drawing conclusions. A
server without a judge model refuses a run with judge checks (409).
## Exact value, `$pattern` or `$judge`?
In `args` / `result` (of `tool-called`) and `data` (of `event`) prefer the **exact value** whenever you know it
(`order_id: A-17`): exact, free, repeatable. For a value written loosely but checkable by its form
(a zip code with stray spaces) use `{ $pattern: "(?i)^\s*12345\s*$" }` — free and repeatable too. For free text whose wording varies — a refund reason, a
search query, a message to a customer — use a matcher in place of the value:
`reason: { $judge: { description: "Says the item arrived damaged or broken", examples: ["kettle arrived broken", "damaged on delivery"] } }`.
Write a precise description (what the value must say) and 2–3 varied examples (different words, same
meaning); `description` and/or `examples`, nothing else inside `$judge`, and `$judge` is the only
property of its object. Literals around it still match exactly, and the model is asked only about calls
that passed them — but each candidate call costs a model request, and it can come back **not judged**
like a judge check. A server without a judge model refuses a run with `$judge` (409). `$judge` is not allowed in
`event-not-emitted`.
## Versions
Every change of the agent's contract makes a new version, so the list grows. Versions are never
deleted by default (every run points at one): they are **archived**, hidden by default and restorable. A new
run on a contract that matches an archived version unarchives it. Archive only what the user
asked for or confirmed: show the ids first. `/suwageval:versions` does this.
Only an archived version can be **deleted**, and that removes its runs, samples and verdicts for
good. Always run `suwageval versions delete <id> --dry-run` first, show the user what would go,
ask for explicit confirmation, and only then run it again with `--yes`.
The same goes for deleting the whole agent (`suwageval delete-agent`, for an agent pushed by mistake):
`--dry-run` first, show what would go, explicit confirmation, then `--yes`. Never delete the agent or a
version on your own initiative.
## Reading results
`run --wait --json` prints `{ run, scenarios }`. `run` has the agent, `agentVersionId`, `status`,
`error` and the totals (`checksPassed`, `checksFailed`). `status` `Interrupted` means the server stopped during the run (a restart, a deploy), not that the agent or a check failed: the results so far are partial, so offer a new run with its tags. Each scenario has `key` and its
`checks`; a check has `key`, `passed`, `passRate`, `passThreshold` and per-sample `message` and
`evidence` — the message says why it failed. A judge check's message is the judge's reason; a sample with `notJudged: true` was not judged at all. A scenario sample with an `error` means the agent
itself failed on that turn, which is not a check failing: say which.
## Regressions
A run that finished has `results.regression` (what it was compared with, and counts) and each check a `regression`
(`state`: `Passed`, `Regression`, `New`, `AlreadyBroken`, `KnownFailure`, `Fixed`, `Unstable`, `AgentError`; `failingSince`, `lastPassedRun`,
`history`: the verdicts the state follows from, oldest first; the CLI prints them as `✓✓✓✗ → ✗`, the last mark being
this run). A regression is a check that passed steadily over the newest reference runs (clean tree, pushed commit,
the default branch or `regression.branches` of `agent.yaml`) and fails now. Report in this order: **regressions and new
failing checks** first (scenario, check, why; `lastPassedRun` is the run to compare with: `{SUWAGEVAL_URL}/compare?runs={lastPassedRun},{run.id}&baseline={lastPassedRun}`),
then **already broken** (not caused by this run), then fixed and unstable ones; known failures only as a count. An
**agent error** failed only because the agent gave no answer (the CLI prints the agent's error): report it as the agent failing,
not the check; it is not counted in the check's history. Never change a check to hide a regression. When a behaviour
change was intended, the check is what is out of date: update it (`/suwageval:fix`), push, and run again; it starts a new
history, so it is *new* until it has run enough times.
## Unstable checks
A model does not answer the same way twice: a check can pass in one run and fail in another of the
**same** agent version. Before suggesting a fix for a failing check, run `suwageval problems --json`
and look for it in `unstableChecks` (by `scenarioKey`, `checkKey` and the run's version). When it is listed, say so first:
the failure may be noise, not a regression. Do not change the agent for it; suggest raising `samples`
of that scenario or that check (so the pass rate over samples decides) or loosening `passThreshold`, and leave the
choice to the user.
`samples` (an integer from 1 to 20, default 3) can be set on three levels, the most specific wins: a
check's, its scenario's, `agent.yaml`'s. The agent is called as many times as the scenario's most
demanding check needs, and each check is judged on its first N samples only (its pass rate and
`passThreshold` are over those). Raise it on a flaky scenario; put `samples: 1` on a check that does not
vary to keep runs fast.
## Comparing runs
`suwageval compare` aligns runs of one agent by scenario and check key and prints them side by side: read it (or `--json`)
instead of fetching every run's results.
- **Which runs:** `suwageval runs --json` lists the newest first; `compare <runId>...` takes up to 7, `compare --group <name>`
every run of a group.
- **There is no default baseline.** Without `--baseline` the values are absolute: per run the version label, models, checks
passed, samples answered and turn times, the pass rate per tag, and the checks per scenario with the failed ones. With
`--baseline <runId>` (one of the runs) it adds, for every other run, the changes against that run: pass rate and turn time,
the pass rate per tag, the checks that differ with their trend (▲ better, ▼ worse), and a `judge differs from baseline`
warning when the judge model changed — then a different verdict may be the judge's, not the agent's. Pick the baseline
for the question asked: the previous run when asking what a change did, the run that last passed for a regression, the
run the user names.
- **Report** the regressions (passed in the baseline, fails now, or the pass rate fell) and improvements with scenario key,
check key and pass rates; checks present in some runs only (not a regression); and the runs' versions and models, so a
change is not blamed on the wrong thing.
- Finish with the page's link, `{SUWAGEVAL_URL}/compare?runs={id},{id},...` (`&baseline={id}` when you read against one;
`?group={name}&agent={agent}` for a group) — the page `compare --open` opens; open it when you present the comparison.
## Rules
- **Push and run only when asked** (or when the command you were given says so): a push writes
to the server.
- **Areas the agent switched off stay off.** Before a command of an area, read `features` in
`suwageval/agent.yaml`: `evaluation: false` means no scenarios, runs or comparisons; `monitoring`
absent means no conversations are taken. Then propose switching it on (and `suwageval push`)
instead of trying the command: switching monitoring on means the deployed agent's conversations
are stored, the user's call. A command of a switched-off area exits 2 and says the same.
- **Do not delete or weaken a check to make it pass.** If its intent no longer fits the agent,
say so and let the user decide.
- **Do not change the agent to make a scenario pass** unless the user asked for that.