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.
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
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.
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 });
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.
{"error": {"code": "INVALID_STATE","message": "Version 4 passed 80% of scenarios; it needs 95%.","details": { "evalRunId": "evr_...", "passRate": 0.8, "required": 0.95 },...}}
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.
# 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
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.
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
Threshold
Fixtures
CLI
Event
Scopes
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.