Skip to main content
Start with the complete quality-gate project to run offline, retain reports and traces, and observe a deliberately failing exit code. This page helps you adapt assertions to an existing Agent.

Check each case against its own expected value

Host function: supply an Agent whose responses follow the requested classification contract. The caller owns that Agent and closes it after evaluation. Install @agentium/eval@4.11.0 alongside the matching core package.
Both cases use one general assertion and their own expected value. A scorer such as contains("Paris") would instead require Paris in every case to which it applies. In v4, a successful run and every scorer’s passing assertion are required; a numeric threshold does not override pass: false. At the CLI boundary, set a failing exit code when the returned failed count is nonzero. The quality-gate project includes this wiring, artifact writes, and teardown. A console report by itself does not fail CI.

Choose the evidence you need

Exercise failure deliberately

Change one expected route, run the gate, and confirm a case fails. Then restore it. Also check execution failure and timeout: a provider error must not become a passing answer simply because a string scorer matched a partial result. Run deterministic fixture checks separately from credentialed model evaluations. Fixtures verify your evaluation plumbing; live cases measure the selected model and application configuration. Keep the model/version, cases, scorer criteria, and report together when comparing changes.

More patterns

Use the quality-gate project for commands and artifacts, cost and tracing patterns for runtime evidence, and Ship to place these checks in a release workflow.