live
/health

AI agent quality gates that return inline pass/fail on the same run that produced the measurement

Every POST to /api/measurements is compared against the rolling baseline for that agent; BenchVault returns passed plus a violations array so quality gating happens in CI the same run it happens — not after a regression ships.

POST metrics on every agent run
After each invocation, POST avg_latency_ms, cost_usd, total_tokens, completion_rate, and error_count to /api/measurements. One authenticated call wires the agent into inline quality gating.
Baseline per agent auto-created
The first measurement seeds the agent's baseline. From the second run onward, every measurement is compared to that baseline and BenchVault returns a passed boolean plus a violations array inline, so slow drifts and one-off spikes both surface as quality gate verdicts.
Gate in CI on the returned pass/fail
Read the passed boolean from the response and fail the build on false. The violations array points straight at the gated metric — latency, cost, tokens, completion, or errors — so the offending commit is identifiable before merge.
# Record a measurement — wire the quality gate into any agent
curl -X POST https://benchvault.ai/api/measurements \
  -H "Authorization: Bearer $BENCHVAULT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id":        "my-support-agent",
    "avg_latency_ms":  1180,
    "cost_usd":        0.0028,
    "completion_rate": 0.96,
    "error_count":     0,
    "total_tokens":    3600
  }'

# Quality gate — inline pass/fail returned on the same call
{
  "passed": false,
  "violations": ["cost_usd exceeded baseline by 18%"]
}

Frequently asked questions

What are AI agent quality gates?

AI agent quality gates are inline pass/fail checks that compare every agent run against an established baseline and surface a verdict on the same request that recorded the measurement. Quality gating built this way turns CI into the enforcement point — a regression cannot reach production without the gate seeing it first.

How does BenchVault run quality gating on every run?

Every POST to /api/measurements is compared against the rolling baseline for that agent the instant it arrives. BenchVault returns a passed boolean and a violations array inline, so quality gating happens in the same call that records the run — your CI step does not need a separate dashboard lookup to learn the verdict.

What metrics drive the quality gate?

BenchVault's quality gate is driven by the five metrics most often associated with shipped quality regressions: avg_latency_ms, cost_usd, total_tokens, completion_rate, and error_count. When any of those metrics crosses the threshold its baseline defines, the quality gate names it in the violations array so the offending metric is identifiable at a glance.

Can I block a PR that fails the quality gate?

Yes. After your CI step POSTs a measurement, read the passed boolean in the response. If passed is false, exit the job non-zero — the violations array tells the reviewer exactly which metric (latency, cost, tokens, completion, or errors) crossed the baseline threshold so the offending commit can be identified before merge.

How is quality gating different from evaluation?

Evaluations judge whether the agent produced the right answer. Quality gating tracks whether the agent's operational behavior regressed — latency going up, cost going up, completion rate dipping, error rate rising, or token spend growing. BenchVault pairs naturally with eval suites by adding the operational quality gate evaluations typically do not cover.

Do I need to deploy any infrastructure?

No. BenchVault is a hosted API — you POST measurements and read pass/fail in the response. There is no agent to run, no storage to provision, and no SDK to install. A single curl call from any CI runner is enough to start quality gating pipelines.