An agent pays for each character a tool returns: in tokens, in latency, and
in the context left for the task. vitro cuts that four ways, each measured on
real pages. Tokens are estimated as
characters / 4, which the ~ marks. Savings are against
vitro's earlier reply, the JSON node list. The last three need a
decision-provider key.
Every snapshot, by default
snapshot answers with one line per element in reading order,
uid role name, with = value on controls that hold
one. Unnamed wrappers, list bullets and text that repeats the line above are
dropped. Everything an agent can act on stays. No key, no model, and nothing
leaves the machine.
| Page | JSON node list | Line tree | Saved |
|---|---|---|---|
| Wikipedia, Erlang | ~81,146 | ~15,109 | −81% |
| GitHub, elixir | ~15,930 | ~4,251 | −73% |
| Hacker News | ~17,864 | ~3,286 | −82% |
| MDN, <input> | ~93,614 | ~27,718 | −70% |
| GOV.UK, driving | ~6,303 | ~1,482 | −76% |
Estimated tokens for a full-page snapshot, measured 2026-11-12.
format: "nodes" still returns the full JSON list.
Only the part the task needs
snapshot(session_id, lease, page_id, goal: "renew my driving licence")
With a decision-provider key on the team (Jev, Clef or OpenAI Decisions,
under Team), vitro cuts the page into sections at
its headings and landmarks. It asks the provider, in one request, which
sections serve the goal. The rest are listed by id and label.
snapshot(sections: ["s7"]) fetches any of them with no provider
call.
| Page and goal | Jev | Clef | Clef Flash |
|---|---|---|---|
| Wikipedia: who created Erlang | −94% | −97% | −95% |
| GitHub: the list of releases | −95% | −94% | −93% |
| Hacker News: log in | −97% | −97% | −96% |
| MDN: the placeholder attribute | −97% | −93% | −82% |
| GOV.UK: renew a licence | −89% | −88% | −88% |
Savings against the full page's JSON node list. All fifteen runs kept the element the goal needed. A goal snapshot took 0.2–0.8s on Jev, 0.3–1.3s on Clef Flash and 0.7–3.6s on Clef. A separate run of the five tasks on decisions measured 0.2–0.5s per call on Jev across all five arguments.
A form in one call
find(session_id, lease, page_id,
descriptions: ["the email field", "the password field", "the sign in button"])
This needs a decision-provider key. vitro looks for each element in one
request over one snapshot, and each uid comes back on the same
snapshot_id. On three real forms, three or four calls became one
and finished 2–4× sooner (Jev: 181–236ms against 484–703ms). The picks matched
one-at-a-time calls.
Waiting for a meaning
wait_for(session_id, lease, page_id, means: "the search results are showing")
This needs a decision-provider key. Use it when you cannot name the words
that mark a page as ready. vitro checks the statement about once a second, at
most 30 times or 45s, so the agent does not snapshot in a loop. The saving is
in agent turns: on a page ready after three seconds, two calls replaced four.
Each check sends the page to the team's provider, so prefer text
when you know the words.
Where you see it
Each trimmed reply carries trimmed, saying what it saved. The
bar at the top of the console and the desktop window counts it per session
and for the team.
Re-running the numbers
The pages change, so expect the figures to move a few points. These scripts drive a running vitro over MCP, as an agent does:
elixir bench/snapshot_tokens.exs [--goals]
elixir bench/find_batch.exs
elixir bench/wait_means.exs
With a provider configured, the same data leaves the machine as for
expect(means:): the accessibility tree, the URL and the title,
sent to the team's chosen provider with the team's key. See
Security.