[KongchangAI]
· 4 min read· 2,320 words

Agents Are Becoming Software's New Users — You Need Evals to Measure Success Rates

Agents Are Becoming Software's New Users — You Need Evals to Measure Success Rates

Agents are software's new users; layered Evals are needed to measure whether they truly complete tasks correctly.

The article argues that traditional feature-availability testing can't measure whether agents truly complete tasks: requests may succeed and logs look clean while orders are still wrong. Using the human Discovery–Selection–Access–Success funnel, it focuses Evals on Success and builds a test pyramid by LLM calls — deterministic tests, single-turn Evals, and end-to-end Evals. Using a coffee-ordering API, it breaks down E2E Eval construction: setting goals, choosing metrics (success rate, Pass@k, Pass^k), and designing task sets, plus engineering details like preventing reward hacks.

Title

Agents Are Becoming Software's New Users — You Need Evals to Measure Success Rates

Meta Description

Agents are becoming software's new users, and traditional tests can't measure whether tasks are truly completed. This article breaks down the agent test pyramid, the E2E eval construction workflow, and how success rate, Pass@k, and Pass^k map to different failure costs.

Article Content

When AI agents start using software on behalf of humans, traditional "does the feature work" testing is no longer enough. Your API, CLI, or MCP server might be called thousands of times by agents, but the order was placed wrong, the parameters were off, the task was abandoned halfway — and yet the logs look perfectly clean. The root of the problem: agents are a new class of users, and the way to measure whether they "get the job done right" is Evals.

Agents are users, so your software needs evals

Agents Go Through the Same Funnel as Humans

Agents may never have watched your product launch video, but the path they take to find you closely mirrors that of human users: Discovery, Selection, Access, Success. Each layer filters out some agents, just as it filters out human users.

The author suggests building Evals for any stage of the funnel, but focusing on the last link — Success, i.e., whether the agent actually completed the user's task. This is far harder than it sounds. An agent might place an order for a "hot latte" when the user wanted it iced; the request succeeds, the observability logs are spotless, but the result is simply wrong. Add to that the inherent variance of LLM outputs, and a single passing manual test proves nothing about whether a fix works. You need to run the same task repeatedly and score the results — before and after the change. That's an Eval: a test that runs repeatedly and scores outcomes.

The Agent Test Pyramid: Layered by Number of LLM Calls

Ordinary tests ask "does it work?" Evals ask "how likely is it to work, and how well?" The author divides agent tests into three layers based on how many LLM calls a test typically requires:

  • Deterministic tests (0 LLM calls): Verify that the software itself behaves as expected — e.g., whether a search command returns only cafés in the specified area, whether a quote includes tax and tip, whether the order amount matches the quote.
  • Single-turn Evals (1 LLM call): Verify whether the agent picks the right command and generates correct parameters — e.g., whether its first command is a search, and whether it quotes before ordering after seeing a quote.
  • End-to-end Evals (2+ calls, spanning the whole task): Let the agent run the full task in the environment, then check whether the final result meets the user's needs. Popular coding benchmarks like SWE-bench and Terminal-Bench are essentially E2E Evals.

This layering also serves as a proxy for build cost, runtime, and expense — the lower layers are cheaper and faster, and should make up the bulk of the test suite. The method for choosing a layer: first identify what problem you want to catch, then pick the lowest layer that can catch it. For Success, the answer is at the top, because success depends on the entire chain of steps (search for cafés → filter by constraints → place order); each step may look reasonable on its own, yet the combination can still produce a wrong result.

Deterministic tests earn their name because there's a fully reproducible mapping between input and output: given the same command-line arguments and the same seeded data, results are strictly identical on every run, with no probabilistic sampling involved. These are essentially the unit tests and integration tests of traditional software engineering, and can be written directly with frameworks like pytest or Jest — no LLM integration needed, so they cost nearly nothing, run in milliseconds, and reproduce failures reliably. They're suited to verifying the tool interfaces agents call that themselves have deterministic behavior: parameter validation, boundary handling, amount calculations, permission checks, and so on. Placing these at the bottom of the pyramid means a large volume of regression issues get caught with second-level feedback, without burning expensive model calls to discover a bug that an assertion could have caught directly.

Deconstructing a Real E2E Eval

The article uses a fictional San Francisco coffee-ordering API, sfbeans, as an example. The user's request is: "Get me a large iced latte, whole milk, pickup before 9, no more than $8 including tip, I'm in the Mission." At 8:30, four cafés are each in a different state: one has a broken ice machine, one exceeds the budget after tax and tip, one can't do pickup until 9:20, and only one satisfies all three conditions at once.

To test whether the agent can complete this task, you first need to define a few terms: Task (a problem with an initial environment and an acceptance method), Variant (the agent configuration being tested — model, prompt, tools, memory, and skills), Trial (one attempt by a Variant on a Task), Run (the overall collection of all Variants running multiple times on all Tasks), and Trace (all messages, tool calls, logs, and final output recorded during a Trial).

The construction workflow has several steps:

Step one, set the goal. Traditional software can aim for 100% test coverage, but an agent's surface area is "everything an LLM might do to your product," and the boundaries are inherently fuzzy. A practical approach is to start from an outcome a real user cares about, narrow enough to evaluate with a small number of tasks. Goals usually come from three places: Observability (which agents are using it, where they fail), customer feedback (tickets, complaints, churn), and the roadmap (the product hypotheses most in need of validation). In the example, the team finds that agent traffic comes mainly from Claude Code and Codex, and the most frequent ticket is "agent ordered the wrong drink," so they set the goal as: improve the success rate of "ordering the drink the user asked for," scoped to drink, pickup time, and budget, temporarily excluding cancellations, refunds, and accounts. The completion criterion is that both agents order correctly on every Trial, not just most of the time.

Step two, define metrics. The most commonly used E2E Eval metrics include: success rate (share of Trials that pass), Pass@k (probability that at least one of k attempts passes — answering "can it do it at all?"), Pass^k (probability that all k attempts pass — answering "can it be relied on every time?"), and efficiency metrics computed only on successful Trials — steps, duration, cost.

In the example, 3 of 5 Trials pass, a 60% success rate. Treating trials as independent, Pass@5 is close to 99%, while Pass^5 is only about 8%. Both numbers are correct; they just answer different questions. For a user ordering every morning, a wrong drink means wasted money, a missed train, and a ruined mood — with no chance to retry — so sfbeans should optimize for Pass^k. Conversely, a coding agent with a test suite to fall back on can retry after failure, costing only time and model fees, so Pass@k is more appropriate; and for an email draft reviewed by a user, failure costs only editing one line, so success rate is enough. The author also cautions: overall averages mask a task that fails frequently, so you must look task by task; and with only 5 Trials, 100% only means "we haven't seen a failure yet."

Step three, design the task set. Goals can't be handed directly to an agent to attempt — they must be turned into concrete tasks. A good task set should cover common cases, edge cases that easily trip up agents, and at least one request where "the right move is to take no action." Each task needs four parts defined: the instruction (the user request), the environment (identical starting point for every Trial), the verifier (checks the final state, ideally scoring each constraint separately), and optionally a known correct solution (to prove the task is solvable).

The example defines four tasks: the common case iced-latte-mission, the edge case usual-unavailable where the user's usual shop is out of stock, team-order with 6 drinks at $45 to one pickup location, and impossible-request where the agent must tell the user when it can't be done. The last task has an extra check: the verifier reads a command log the agent cannot write to, confirming it actually searched before giving up. This was added after the team hit a snag.

Environments can be semi-real: the agent uses the real sfbeans CLI, but the data is a seeded café list and the clock is frozen at 8:30, ensuring every Trial starts from the same morning. The verifier scores each constraint separately, setting reward to 1 only when all are satisfied. The author also specifically warns: in real Evals, protect the seed data and verifier code, and ensure the agent can only modify order records through the CLI — otherwise the agent might directly edit inventory or write order files to "game the score" (reward hack).

Pass@k and Pass^k are two complementary statistics over the same set of trial data; the difference lies only in "what counts as passing." Pass@k assumes the k attempts are independent, with probability of at least one success equal to 1−(1−p)^k, where p is the single-attempt success rate; as k grows it quickly approaches 1, so it measures the "capability ceiling" — can the system do it given enough chances. Pass^k requires all k attempts to succeed, with probability p^k; as k grows it quickly approaches 0, measuring the "reliability floor" — can the system reliably reproduce the same result. The two are equal at k=1 and diverge as k grows, so whenever reporting a metric you must state the value of k, otherwise the numbers aren't comparable. In practice, note also that these formulas assume Trials are independent, while LLMs often behave in correlated ways under the same prompt, so the real Pass@k may be lower than the independent-assumption estimate — meaning an extrapolated "close to 99%" based on a small sample should be treated as an upper bound, not a promise.

Engineering Details Worth Noting

The task directory structure is clean: instruction.md holds the initial prompt, task.toml holds the timeout, verifier, and artifact configuration, environment/ is the Docker build context, solution/solve.sh is the known correct solution, and tests/ contains the verifier. Naming the sfbeans CLI in the instruction is meant to skip the discovery and selection stages, keeping the Eval focused on Success. Before running the real agent, run the solution once to prove the task itself is solvable — this engineering habit avoids a large number of false failures from "the task was designed wrong."

As for the framework, the example uses Harbor — an open-source framework released by the authors of Terminal-Bench, which runs agents in containers, checks results, and records all their actions.

Editorial View

This article's value lies in truly grounding the "agents are users" perspective in engineering practice. When a software's users change from humans to agents, product teams need two sets of measurements: one for the human conversion funnel, and one for the agent Eval system. And the easiest trap to fall into with Evals is mistaking "request succeeded" for "task succeeded." The three metrics — success rate, Pass@k, and Pass^k — correspond to three different failure costs, and choosing the wrong metric leads to completely opposite conclusions. For any team offering an API, CLI, or MCP server, building a test suite layered by the pyramid and distilling Eval tasks from real user tickets and Observability is one of the highest-ROI investments right now.

Background Notes

Reward hack refers to the evaluated Agent finding an unguarded shortcut in the verifier and directly optimizing the scoring signal instead of genuinely completing the task. In E2E Evals, because the Agent has write access to the environment, this risk is far higher than in traditional testing: it might bypass the CLI to rewrite order files directly, tamper with inventory data, modify the state fields the verifier reads, or even forge command logs to prove it "searched." There are three lines of defense: first, isolation — keep seed data and verifier code in paths the Agent cannot write to, and run the verifier in a separate read-only mount; second, chokepoints — ensure the Agent can only change world state through designated interfaces, with all side effects leaving unforgeable audit records; third, cross-validation — use multiple independent signals (final state, command log, resource consumption) to judge together, failing if any signal contradicts. In addition, high-scoring Trials' Traces should be manually spot-checked periodically, because reward hacks often manifest as "high score but suspicious trajectory" that aggregate metrics alone cannot detect.

One-line Summary

Agents are becoming software's new users, and layered Evals are needed to measure whether they truly get tasks right.

Paragraph Summary

The article proposes the "agents are users" perspective, pointing out that traditional feature-availability testing can't measure whether agents truly complete tasks: a request may succeed and the logs be clean, yet the order is still wrong. Borrowing the human user funnel of Discovery–Selection–Access–Success, the author argues Evals should focus on the Success stage and build a test pyramid by number of LLM calls: deterministic tests, single-turn Evals, and end-to-end Evals — the lower layers being cheaper and forming the bulk. Using a coffee-ordering API as an example, the article breaks down the E2E Eval construction workflow — setting goals, choosing metrics (success rate, Pass@k, Pass^k), and designing task sets covering common, edge, and "should-not-act" scenarios — and offers engineering details like directory structure, running the known solution first, and preventing reward hacks. The core conclusion: choose metrics based on failure cost, and distill tasks from real tickets and Observability.

#AI agent testing#Evals#Pass@k#Pass^k#agent test pyramid#E2E eval#reward hack
Share:

Related articles