How we test a browser tool for AI agents, and how to rerun it
We run the same agent, model, prompt and task with only the browser tool changed, check every answer, and measure a noise floor before believing any difference. A 70-run A/A test on Haiku cost $0.27 and showed that input tokens, cost, wall time, steps and score are stable, while characters returned and look-backs are not.
The setup
The local test runs headless Claude Code (claude -p, Bash and Skill only, Haiku, 40 turns, 8 minutes) on seven fixed public-site tasks. Each build of Browser Layer is packed from a git ref into its own prefix, and each run gets its own home and temp directory. A run costs about $0.004, no logins are needed, and expected answers were computed once from the pages. Score is the share of expected tokens found in the answer.
What we measure per run
- Score: how much of the expected answer was found.
- Steps: the number of shell calls.
- Input and output tokens, dollars and wall-clock seconds, as reported by Claude Code.
- Characters returned and carried: how much output came back, and how long it stayed in context.
- Look-backs: calls that go back over earlier output with grep, head, sed and the like.
The noise floor: what we can and cannot trust
Before comparing builds we ran the same build against itself, 70 runs, $0.27. The last column is the smallest difference that clears two standard errors.
- Input tokens: -1.3% between the two halves, detectable at 6%.
- Cost: -5%, detectable at 4%. Wall time: +1%, detectable at 8%.
- Steps: -0.6%, detectable at 9%. Score: 1.00 against 0.94.
- Characters returned: -8%, detectable at 18%. Carried: -4%, detectable at 24%.
- Look-backs: 0.37 against 0.26, detectable only above 52%.
So which numbers count
Stable enough to trust: input tokens, cost, wall time, steps and score. Weak: characters returned and carried, because a few large answers dominate. Not usable: look-backs, at about 0.3 a run on short tasks. A difference is worth believing only when it exceeds the floor and most tasks go the same way.
A change the test can see at once
We appended 14,000 characters of design notes to the agent’s skill file and ran 35 more runs ($0.18). Input tokens rose 31% (all 7 tasks up), cost 28% (7 of 7), wall time 43% (7 of 7). Steps, carried characters, characters returned and score did not change. A long instruction file costs tokens at every step even when it changes nothing about behavior, so keep skills short.
What it cannot show
The agent is Haiku, not the larger model in the public benchmark, and the tasks are short, about four steps, with no run hitting a limit. So it shows the direction of agent behavior, not benchmark scores, and it cannot show long-task effects such as timeouts, 100-step runs or blocked sites.
Rerun it
Run an A/A whenever the task set, model or repeat count changes, and read its table as the floor.
node bench/local/run.mjs --out bench/local/out/x --arm A=hardening --arm B=my-branch --repeats 5 node bench/local/compare.mjs --a A --b B bench/local/out/x
Questions
How do you benchmark a browser tool for AI agents?
Give the same agent, model, prompt and task to each tool, change only the browser, check every answer against ground truth, and run an A/A of the same build to measure the noise floor before trusting any difference.
How much does a benchmark run cost?
About $0.004 a run on Haiku, so 70 runs cost about $0.30.
Does a long skill file cost tokens?
Yes. In our test, 14,000 extra characters in the skill raised input tokens 31% and cost 28% with no change in steps or score.