How does Opera Browser CLI reduce tokens?

Raw snapshot vs Opera Neon CLI: compact
Henrik Lexow2026-07-29Technical blogs

How Opera Browser CLI Compresses Browser Snapshots to Save Tokens?

Opera Browser CLI is the key part of the workflow that lets the AI agent control Opera from the command line.

It can open pages, take snapshots, click buttons, fill out forms, switch tabs, inspect what’s happening in the browser, and string those actions together.

The important bit is what happens after each action.

Opera Browser CLI captures the updated page and sends a snapshot back to the model so it can decide what to do next. The latest version compresses browser snapshots by default. In the benchmarks, the compressed output is labeled opera-compact.

It’s a compression layer inside Opera Browser CLI that cleans up the page before the model reads it.

The compression layer builds on AXI—the Agent experience Interface reference design—rather than replacing it. It keeps the structure the agent needs and trims away the bits that don’t help it make its next move.

The useful stuff stays. The clutter goes.

Some of the savings are almost comically small.


A reference like:

uid=2_3

Becomes:

@2.3

The shorter version costs fewer tokens but still gives the agent a reliable element to act on.

A role like:

RootWebArea

Becomes:

root

Again, same meaning. Less text.

The compression layer also:

  • removes attributes the role already makes obvious
  • drops empty nodes and stray whitespace
  • turns headings into Markdown
  • shortens same-origin URLs to their paths
  • replaces repeated long URLs with compact references
  • cuts repeated boilerplate and joins fragmented text back together

None of that sounds especially dramatic on its own. That’s the point.

Spread those savings across every element on a page, then repeat them after every click, scroll, and navigation, and they add up fast.

The model still gets what it needs to understand the page and decide what to do next. It just isn’t made to wade through the same clutter every time.

Same tasks. A lot less context.

We wanted to see whether smaller snapshots affected what the agent could actually do, not just the number of tokens it used.

So we tested opera-compact across seven browser tasks adapted from AXI’s bench-browser suite. Each condition was run 35 times—five repetitions across seven tasks.

token usage comparison

opera-compact used 66% fewer input tokens than opera-raw and 80% fewer than the raw MCP baseline. All three formats still completed every task. Shrinking the snapshots didn’t hurt the results—it just gave the agent a lot less text to chew through.

The opera-compact runs were quicker too, averaging 6.8 seconds compared with 8.5 seconds for opera-raw and 9.8 seconds for mcp-raw.


Raw MCP snapshot vs OPera CLI: compact

There are limits to what this benchmark tells us. We used one model and seven fairly contained tasks, mostly on documentation-heavy pages such as GitHub, MDN, Wikipedia, Python documentation, and RFC pages. A sprawling dashboard or app-style interface could behave very differently.

Why token efficiency matters after the demo

“The first run tells you whether the agent can do the job. The next hundred tell you whether the automation was worth building.”

A monthly research run can probably survive a little waste. But an agent checking five sources every hour, can’t. Neither can a QA agent working through hundreds of product states or an internal agent moving between dashboards all day.

On a session-limited plan, smaller snapshots let the agent browse for longer before it hits the wall. They also leave more room for the parts of the task that matter: the original instructions, what the agent has found, what it has already tried, and what still needs doing.

Token efficiency doesn’t just make the same workflow cheaper. It gives you more freedom to build workflows you can actually keep running.

Get started with Opera Browser CLI

The latest Opera Browser CLI compresses snapshots by default. There’s no extra package to install and no setting to remember.

Install and set it up with:

npm install -g opera-browser-cli

opera-browser-cli setup

Run the setup once, choose the Opera browser you want to use, and you’re ready to go. The core CLI works across Opera desktop browsers, while Do, Make, and Research are available in Opera Neon.

Smaller snapshots mean the model spends less of each session rereading the browser and more of it keeping track of the actual task—what you asked for, what it found, and what to do next.

“For research workflow, that can mean up to 2.5x more browsing before the session limit kicks in.”

That’s really the point. Give the model less page clutter to work through so the session can focus on the work itself.

Less to read. More tokens for reasoning.