# 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.

Last checked: 30 Nov 2026, against the vendor's own pages.

Family: Return less.

## 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**: partly (not confirmed). The vendor's browsing tool decides.
- **Using a workflow tool**: partly (not confirmed). Fetch the page as text, not a screenshot.

## The setting in each harness
- [Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/): web_search_20260318 and web_fetch_20260318 filter results in code before they enter context ([source](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#dynamic-filtering), read 30 Nov 2026)
- [Pi](https://usefewertokens.com/harnesses/pi/): npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026)
- [Claude Code](https://usefewertokens.com/harnesses/claude-code/): npm i -g agent-browser, then npx skills add vercel-labs/agent-browser ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026)
- [Cursor](https://usefewertokens.com/harnesses/cursor/): npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026)
- [Codex](https://usefewertokens.com/harnesses/codex/): npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026)
- [OpenCode](https://usefewertokens.com/harnesses/opencode/): npm i -g agent-browser, then add "run agent-browser skills get core and follow it" to AGENTS.md ([source](https://github.com/vercel-labs/agent-browser), read 30 Nov 2026)

## Read more
- [agent-browser, from Vercel Labs](https://github.com/vercel-labs/agent-browser)
- [Playwright CLI with skills, from Microsoft](https://github.com/microsoft/playwright-cli)
- [Dynamic filtering in Anthropic's web fetch tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#dynamic-filtering)
