Evaluating bounded agents
A small worked example separating task success, step budgets, and execution cost.
Updated
An agent needs a stopping rule. A maximum number of steps is a simple one, but it also changes the system being evaluated. A result described only as “80% success” hides the budget under which that success was obtained.
This note uses an illustrative example, not measured benchmark results, to make the accounting explicit.
Define the unit of success
Section titled “Define the unit of success”Suppose an agent must retrieve the latest version of a document and answer a factual question with a supporting citation. A run succeeds only if all three conditions hold: the correct version was retrieved, the answer is supported, and the citation resolves to the evidence used.
Let mark success for task , and let be the number of tool calls. Across tasks,
The average cost includes failed runs. Reporting only the cost of successful runs can make an unreliable system look artificially inexpensive.
Work through the numbers
Section titled “Work through the numbers”Imagine five tasks with success indicators and tool-call counts . Then and calls per attempted task.
The ratio of total calls to successful tasks is . This is an aggregate accounting ratio. It is not an estimate of the cost to solve each individual task eventually: repeated attempts may be correlated or may never succeed.
Python implementation
successes = [1, 1, 0, 1, 0]tool_calls = [2, 3, 5, 2, 5]
success_rate = sum(successes) / len(successes)calls_per_attempt = sum(tool_calls) / len(tool_calls)calls_per_success = sum(tool_calls) / sum(successes)
print(f"Success: {success_rate:.0%}")print(f"Calls per attempt: {calls_per_attempt:.2f}")print(f"Total calls / successes: {calls_per_success:.2f}")Compare budgets, not just systems
Section titled “Compare budgets, not just systems”Run the same tasks with several budgets while keeping the model, tools, and completion criteria fixed. A larger budget may rescue tasks, waste calls after an unrecoverable error, or introduce new failure opportunities. The direction is an empirical question.
Inspect failures at each budget. A task that needs one more lookup is different from a task stuck in a loop. The first suggests a resource constraint; the second suggests a problem in state, decision policy, or tool feedback.
Limits of the example
Section titled “Limits of the example”Five tasks cannot establish a reliable general performance claim. Tool-call count also ignores differences in token use, latency, and the cost of individual tools. In an actual evaluation, preserve per-task outcomes and traces, report the task distribution, and state the budget alongside every aggregate result.
The infrastructure chapter describes the evidence needed to connect these metrics to specific system failures.