Optimize your agent

Return less

Read web pages as text

An agent that browses by screenshot or by reading raw HTML pays for every pixel and tag. Open-source tools such as agent-browser and Playwright return the page as compact text with a ref per element. On the Claude API, web search and fetch can filter results in code first.

Checked on the vendor's pages 30 Nov 2026

Where it fits

Building my own agent Fits

Text snapshots, or filtered web search and fetch on the Claude API.

Using a coding agent Fits

agent-browser or Playwright CLI with a skill.

Using an enterprise assistant Not confirmed

The vendor's browsing tool decides.

Using a workflow tool Not confirmed

Fetch the page as text, not a screenshot.

The setting in each harness

Read on each vendor's own page, linked next to the setting.

HarnessSetting
Claude API and Agent SDK

web_search_20260318 and web_fetch_20260318 filter results in code before they enter context

platform.claude.com, read 30 Nov 2026
Pi

npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md

github.com, read 30 Nov 2026
Claude Code

npm i -g agent-browser, then npx skills add vercel-labs/agent-browser

github.com, read 30 Nov 2026
Cursor

npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md

github.com, read 30 Nov 2026
Codex

npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md

github.com, read 30 Nov 2026
OpenCode

npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md

github.com, read 30 Nov 2026