Foundations

How do you measure agent reliability?

Measure reliability as a success rate over many runs, add consistency and recovery, and turn those numbers into targets you actually hold the agent to.

The core numbers

  • Task success rate: the share of realistic runs that end in the correct state. The headline metric.
  • Consistency: run the same scenario many times and see how often it succeeds. A task that passes 9 of 10 times is not "done."
  • Recovery rate: when something fails mid-task, how often the agent recovers instead of derailing.
  • Latency and cost: a reliable agent that is too slow or too expensive is still unusable.
pythondef success_rate(scenario, run_agent, check, n=50):
    # Run the same scenario n times and measure how often it ends correctly.
    passed = sum(1 for _ in range(n) if check(run_agent(scenario)))
    return passed / n

rate = success_rate(refund_scenario, run_agent, refund_is_correct, n=50)
assert rate >= 0.98, f"success rate {rate:.0%} is below the 98% target"

Turn metrics into targets

Borrowing from site reliability engineering, pick an explicit target, for example "at least 98 percent task success on the core scenarios," and treat a dip below it as a problem to fix rather than a number to admire. The Google SRE Book is a good grounding in setting and defending these objectives.

Where these numbers live

Tracking these rates over time needs somewhere to store runs and compare them. Langfuse (open-source) and Braintrust (hosted) both keep run history and let you diff one version against the next. The honest limitation of either is that neither decides what "correct" means for your task, so you still write the checks that produce the pass or fail behind every rate.

If you cannot state your agent's success rate with a number and a sample size behind it, you do not yet know how reliable it is.

Key takeaways

  • Report reliability as a rate with a sample size, never a single pass.
  • Track success, consistency, recovery, latency, and cost together.
  • Set an explicit target and treat falling below it as a defect.

Further reading

  • Google SRE Book GoogleGoogle's foundational text on setting reliability targets and defending them over time.