guide·6 min read

How to compare two agent versions

Run the current and candidate agents in separate environments, identify every session by agent and environment, apply the same evaluations and audits, and compare behavior over time with native queries and dashboards.

the short answer

Run the current and candidate versions in separate environments and send both sets of sessions to Failproof AI with distinct agent IDs and environment values. Apply the same code-based and LLM-based evaluations to both, run audits with the same goal and window, and use saved queries and dashboards to compare scores, cost, latency and recurring failure modes over time. Open the sessions behind each difference before deciding whether to promote the candidate.

Separate
Current and candidate versions run in isolated environments.
Identify
Use distinct agent IDs and environment values on every session.
Measure
Apply the same evaluations and audit goals to both cohorts.
Decide
Compare dashboards, findings and trace evidence before rollout.

1. Run the Two Versions in Separate Environments

Keep the current agent and the candidate isolated so their tool calls, state and side effects cannot influence each other. Point both at equivalent test data and dependencies. If tools can write, use separate sandboxes or test accounts and reset them between runs.

Send the same task set through both environments for an offline comparison. For a production comparison, route a controlled share of traffic to the candidate while the current version remains the baseline. Traffic allocation stays in your application or feature-flag system; Failproof AI observes and evaluates the sessions produced by each route.

2. Identify Every Session by Agent and Environment

Give the two versions distinct agent_id values, such as checkout-agent-current and checkout-agent-candidate. Set session.environment to the environment where each one ran, such as baseline and candidate, or your existing staging and production names. Keep the naming stable for the full comparison.

CohortAgent IDEnvironment
Current versioncheckout-agent-currentbaseline
Candidate versioncheckout-agent-candidatecandidate
Use names your team will still understand when reviewing the comparison later.

Do not reuse one identifier and rely on memory about when the deployment changed. Explicit identifiers let evaluations, queries, dashboards, alerts and audits filter the same cohorts without rebuilding the comparison in every view.

3. Run the Same Evaluations on Both Versions

Deploy the same evaluation versions to the current and candidate agents. Use code-based checks for exact outcomes such as required tool calls, tool errors, step counts and budget limits. Use LLM-based evaluations for task completion, instruction following and other criteria that require reading the full trace. Failproof AI can also run your existing evaluation suite in the cloud.

Keep the evaluation version fixed during the comparison. If the rubric or code changes halfway through, a score difference may come from the measuring instrument rather than the agent. Create a new comparison after changing an evaluation.

fp evals --agent-id checkout-agent-current --aggregate
fp evals --agent-id checkout-agent-candidate --aggregate
fp --json evals --aggregate --env candidate
Use the Cloud CLI for a quick aggregate check by agent or environment.

4. Run Matching Audits on Both Cohorts

Evaluation averages show whether known criteria moved. Audits show how the behavior changed. Create audits with the same goal, cadence, sensitivity and window for both cohorts so their findings are comparable.

For example, run the goal "find sessions abandoned after a tool failure" against both agent IDs. Failproof AI analyzes the traces, evaluation results and policy decisions, then groups related failures into findings with severity, affected sessions, evidence and a recommended fix.

Compare the failure modes as well as their counts. A candidate can improve the headline completion score while introducing a smaller but more severe pattern, such as acting on the wrong account or retrying a write after an uncertain response.

5. Analyze Agent Behavior Over Time

Open Analyze → Queries and filter by session.agent_id and session.environment. Compare evaluation results, error counts, tool behavior, latency, token use and cost across the same time window. Use the visual query builder for common questions or read-only SQL when the comparison needs a custom cohort.

Save the queries that answer the rollout questions. Useful views include completion rate by version, failed tool calls by agent, cost per completed session, latency percentiles, policy decisions and the number and severity of audit findings over time.

fp agent ask "Compare checkout-agent-current and checkout-agent-candidate in the last 7 days. Show evaluation results, tool errors, cost and latency by environment."
fp query run <saved-query-id>
The Failproof agent can draft the analysis; save the resulting query when the definition is correct.

6. Build the Comparison Dashboard

Build a dashboard from the saved queries so the current and candidate versions stay visible side by side throughout the test. Keep the same cohort filters and time window on every chart. A dashboard that mixes environments or compares different dates can make traffic changes look like an agent improvement.

  • Quality: pass rate for the primary evaluations and the must-not-regress checks.
  • Failure intelligence: recurring findings, severity and affected-session count for each version.
  • Reliability: tool errors, repeated calls, incomplete sessions and escalations.
  • Efficiency: cost, tokens, steps and latency per completed task.
  • Runtime behavior: policy hits or denials, when policies are enabled for supported actions.

Use the dashboard for the trend and the trace for the explanation. Open the sessions behind every important regression. The score tells you which cohort changed; session replay shows whether the cause was tool selection, arguments, recovery, context or the final response.

7. Decide, Roll Out and Keep Watching

Write the release rule before reading the final dashboard. Name the primary evaluation, the regressions that block promotion, the acceptable cost and latency change, and the audit findings that require investigation. A higher average score should not outweigh a new high-severity failure mode.

If the candidate passes, increase its production share in stages while keeping the same evaluations, audits, queries and alerts running. If it fails, assign the relevant findings, make the change and rerun the same comparison. Preserve the current version as the rollback until the candidate has remained healthy on real traffic.

Failproof AI has already built the evaluation execution, trace storage, session replay, population-level failure analysis, native querying, dashboards, alerts and issue workflow around this comparison. Your team runs the two agent versions, identifies the sessions correctly and makes the product decision. You do not need to assemble a separate experiment database, scoring pipeline and investigation dashboard.

FAQ

How should I tag two agent versions in Failproof AI?

Use a distinct agent_id for the current and candidate versions and a stable session.environment value for the environment where each ran. Keep those identifiers unchanged for the duration of the comparison so evaluations, audits, queries and dashboards use the same cohorts.

Should both agent versions use the same evaluations?

Yes. Use the same evaluation versions and criteria for both cohorts. Changing the evaluation during the test makes it impossible to tell whether the score moved because of the agent or because the measurement changed.

Why run audits as well as evaluations?

Evaluations measure the criteria you already defined. Failproof audits analyze sessions across each cohort to find recurring failure patterns, including problems outside those initial checks, and return trace-backed findings with severity and recommended fixes.

Can Failproof AI route traffic between agent versions?

No. Route users or tasks with your application, deployment system or feature flags. Failproof AI ingests, evaluates and analyzes the sessions from each cohort after they run.

Get Started

Failproof AI is free to start. It finds recurring failure modes across agent sessions using code-based and LLM-based evaluations, groups the evidence into findings, and recommends fixes. Bring the eval suite you already have, alert the right owner when behavior drifts, and turn a tested fix into a policy that prevents the failure from recurring. See pricing for the tiers.

Sources

Products change; if a detail here is out of date, tell us at support@befailproof.ai.

  1. Failproof AI docs: Evaluations
  2. Failproof AI docs: Audits
  3. Failproof AI docs: Findings and issues
  4. Failproof AI: Query agent traces
  5. Failproof AI docs: Cloud CLI