EvryAi
Evals

Test every agent version before members see it

Write scenarios with a member's message, what each tool returns and what must happen. Each one runs as a real run against your real policy with the tools mocked, and a version can only be promoted once it passes your bar.

TypeScript code from the docs quickstart writing an eval scenario with a tool fixture and two expectations, then starting an eval run.
evals.ts
await evry.evalScenarios.create({
agentId: agent.id,
name: "Looks the member up before answering",
scenario: {
input: "What does my plan cover for physical therapy?",
subject: "member_8812",
fixtures: { lookup_member: { output: { plan: "Gold PPO", physicalTherapy: { visitsPerYear: 20 } } } },
expectations: [
{ type: "tool_called", tool: "lookup_member" },
{ type: "output_contains", text: "20" },
],
},
});
const evalRun = await evry.evalRuns.create({ agentId: agent.id, version: 1 });
// Or in CI: npx -p @pendral/platform evryai evals gate --agent agt_... --version 1
Eval runs

Scored per version, with the reason for every miss

Start an eval run for an agent version over all of its active scenarios or the ones you list. Each scenario runs in its own session, pinned to that version, and the result lists each scenario's run and why each failed expectation failed. eval_run.completed arrives by webhook when every scenario is scored.

TypeScript code from the platform docs starting an eval run for version 4, reading its pass rate and failed scenarios, then promoting the version.
eval-run.ts
const evalRun = await evry.evalRuns.create({ agentId: "agt_...", version: 4 });
// eval_run.completed arrives by webhook, or poll:
const result = await evry.evalRuns.get({ evalRunId: evalRun.id });
console.log(result.passRate, result.results.filter((r) => r.status === "failed"));
await evry.agents.versions.promote({ agentId: "agt_...", version: 4 });
Promotion gate

A version below the bar cannot go live

Set evalPassThreshold on an agent and promoting a version needs its latest full eval run to pass at least that share of scenarios, as the scenarios are now. Once a version sets a threshold, later versions cannot drop it by leaving it out. Otherwise the promotion returns 409 with the pass rate and the bar.

Live mode
A run that names a version other than the promoted one must pass the same gate.
The 409 INVALID_STATE error a promotion returns when version 4 passed 80 percent of scenarios and needs 95 percent.
409 INVALID_STATE
{
"error": {
"code": "INVALID_STATE",
"message": "Version 4 passed 80% of scenarios; it needs 95%.",
"details": { "evalRunId": "evr_...", "passRate": 0.8, "required": 0.95 },
...
}
}
CI

The same gate in your pipeline

evryai evals gate runs an agent version's suite from CI and exits 1 below the bar, printing each failing scenario and the reason it failed. Pass --min-pass-rate to set the bar there, or leave it out to use the agent's own threshold.

The evryai evals gate command, which runs a version's eval suite and exits 1 below the pass rate.
ci.sh
# Run an agent version's eval suite and exit 1 if it scores below the bar (default: the agent's own threshold).
npx -p @pendral/platform evryai evals gate --agent agt_... --version 4 --min-pass-rate 0.95

How it works

Scenarios

Fixtures for the tools, real policy for the decisions

A scenario belongs to one agent: the member's message, an optional member id, a fixture per tool (an output or an error) and 1 to 50 expectations, all of which must pass. Nothing reaches your systems, and a tool with no fixture returns NO_FIXTURE to the agent.

Expectations
tool_called, tool_not_called, decision (the policy effect for a call), status, output_contains and output_excludes.
Isolation

Tests never touch real memory or real limits

Each eval run uses a private memory store, so tests never read or leave real memory. Calls answered by fixtures are recorded as simulated and never count toward velocity rules, so running a suite cannot use up a member's monthly refund allowance.

The specifics

Through the API, the TypeScript SDK or the evryai CLI.

Expectations

1 to 50 per scenario, all of which must pass.

Threshold

evalPassThreshold from 0 to 1, set on the agent and kept by later versions.

Fixtures

An output or an error per tool name. A missing one returns NO_FIXTURE.

CLI

evryai evals gate --agent --version --min-pass-rate --timeout-seconds.

Event

eval_run.completed, by webhook.

Scopes

evals:read, and evals:write to write scenarios and start runs.

Bring EvryAi to your team

Sign in with your work account and start in a chat, or talk to us about rolling it out across your organization with the controls your admins need.