{"slug": "your-agent-needs-eyes-not-another-chrome", "title": "Your Agent Needs Eyes, Not Another Chrome", "summary": "Developer Kunal Kushwaha released shoji 0.3.0, an open-source WebKit browser that renders pages inside terminal emulators supporting the kitty graphics protocol (Ghostty, kitty, WezTerm) and exposes a command-line control interface for coding agents. Measured on macOS 27.2 against headless Chrome 158 at a 1280×800 viewport, shoji used 77 MB versus 267 MB on a tiny page and 218 MB versus 351 MB on a Wikipedia article, with 4 processes versus 12 and about 1 MB on disk versus 1.5 GB for the Chrome app. The tool gives agents a structured `snapshot` of on-screen elements with short ids like `e2`, plus `fill`, `click` and `errors` commands, so an agent can drive the same page the developer is viewing rather than a hidden copy.", "body_md": "Three weeks ago, Claude Code [moved my editor into the terminal](https://kunalkushwaha.github.io/2026/11/05/claude-code-picked-neovim/). One piece of VS Code was still missing: a browser.\n\nNot for reading the news. Across my projects I keep producing HTML: slide decks, explanation sheets, and a lot of SVG diagrams. In VS Code I saw them right beside the code. In Neovim, each one meant a detour: open it separately, in a browser or from its folder.\n\nSo why not see them in the terminal itself? And if I could see a page there, my coding agents could too: click it, and read its errors.\n\nThe usual way to do either is headless Chrome. Terminal browsers like KittyBrowser and awrit run on it, and agent browser tools often drive it through Node and Playwright. It works. It’s also a whole second browser, 1.5 GB on disk, running next to my local models.\n\nMy Mac already has a browser engine. Safari uses it, and so can any app.\n\nThe browser was already on my Mac. It just wasn’t in my terminal.\n\nThat’s how **shoji** (障子) started: a real WebKit browser that runs inside the terminal. It’s now [open source](https://github.com/kunalkushwaha/shoji).\n\n## Why not just wrap Chrome?\n\nSame pages, same 1280×800 viewport, measured after the page settled. Memory is the macOS footprint (what Activity Monitor shows), summed over shoji plus its WebKit helpers, or Chrome’s whole process tree:\n\n|  | shoji | headless Chrome | \n|---|---|---|\n| Memory, tiny page | **77 MB** | 267 MB | \n| Memory, Wikipedia article | **218 MB** | 351 MB | \n| Processes | **4** | 12 | \n| On disk | **about 1 MB** | 1.5 GB (the app) | \n\nThe page itself costs about the same in any engine. The saving is the browser *around* the page: Chrome’s browser, GPU, network and utility processes, against three small WebKit helper processes. That’s why the saving is biggest on a small page (71%) and smaller on real ones (38% on Wikipedia). And there’s no engine to ship: WebKit is already part of macOS.\n\nMeasured on one Mac (macOS 27.2, shoji 0.3.0 next to Chrome 158 headless), one run per number. [Method and caveats](https://github.com/kunalkushwaha/shoji/blob/main/docs/performance.md).\n\n## One page, two readers\n\nI see the page. An agent can read a screenshot, but structured text is easier to act on, so shoji gives it that too:\n\n```\nshoji ctl open ./index.html\nshoji ctl snapshot --view\n#   heading \"Account settings\" [e1] level=1\n#   textbox \"Full name\" [e2] value=\"\"\n#   button \"Save\" [e6]\nshoji ctl fill e2 \"Ada Lovelace\"\nshoji ctl click Save\nshoji ctl errors      # exceptions, console.error, failed or 4xx/5xx requests\n```\n\n`snapshot` lists what’s on screen, one line per thing you can read or use: what it is, its label, and a short id like `e2`. The agent uses that id in its next command. When something breaks, `errors` collects it in one place.\n\nThat gives the agent a loop:\n\nIt tests its own work, and I review the result.\n\nInside Neovim, shoji draws the page in an editor window, and that same page answers `shoji ctl`.\n\nThe agent drives the page I’m looking at, not a hidden copy.\n\nThat completes my VS Code replacement: an editor in the terminal, plus a light browser my agents can drive. No Electron, no headless Chrome.\n\n## How a browser fits in a terminal\n\nTerminals that speak the kitty graphics protocol (Ghostty, kitty, WezTerm) can show images. shoji keeps a live WebKit view off-screen, takes a picture only when the page changes, and sends just the rows that changed. What you see are pixels, but your mouse and keys go back to the real WebKit view, so links, forms, scrolling and JavaScript behave like a real browser. In my test, an animated page ran at 30 fps on a full Retina pane, using 34% of one core.\n\nIt even runs games. Here’s Sky Rings, my little 3D flight game, flying itself in shoji. Every frame is a `shoji ctl screenshot`, the same command an agent uses:\n\n## What it is, and what it isn’t\n\nI built shoji for my own setup: Neovim in Ghostty, on a Mac, with agents that need to see the pages they build. It isn’t a replacement for Chrome, or for headless Chrome in every agent pipeline. On a Mac, it shows what’s possible with the engine you already have.\n\n- **Early.** No tabs, downloads, right-click menus or tmux yet, and capturing HTML video is untested. The Neovim plugin isn’t published yet; the[protocol](https://github.com/kunalkushwaha/shoji/blob/main/docs/neovim.md) is, so you can write your own.\n- **Mac first.** It leans on one private WebKit call to keep the off-screen page live. Without it pages still load, but animations and timers stall, and a macOS update could take it away.\n- **Linux is a bonus.** Native packages target Debian testing/sid and Arch, which ship WPE WebKit 2.54; other distros can use the Docker image, mainly for agents. Don’t expect the same memory savings: there, memory comes out close to headless Chromium. The win is a third of the processes, a smaller image, and no Node or Playwright.\n- **Not Chrome.** WebKit is a different engine, so if your users are on Chrome, test there too. And if you already keep Chrome open all day, one more tab costs less than a whole new Chrome. It just isn’t in your terminal.\n\nAn agent that can see the page can check its own work. That’s the part worth copying, whatever browser you use.\n\n## Try it\n\nIt’s Apache-2.0 and runs in Ghostty, kitty or WezTerm. On macOS 13 or later:\n\n```\ncurl -LO https://github.com/kunalkushwaha/shoji/releases/download/v0.3.0/shoji-0.3.0-macos-universal.tar.gz\ntar -xzf shoji-0.3.0-macos-universal.tar.gz\nsudo install shoji-0.3.0/shoji /usr/local/bin/\n\nshoji https://example.com\n```\n\nOn Linux, get the `.deb` (Debian testing/sid) or Arch package from the [releases page](https://github.com/kunalkushwaha/shoji/releases/tag/v0.3.0), or build the Docker image from the repo for any other distro. [Linux instructions](https://github.com/kunalkushwaha/shoji#linux).\n\nA shoji is a paper screen in a wooden frame: the light from outside shows through it. Here, it’s web pages, showing through your terminal.", "url": "https://wpnews.pro/news/your-agent-needs-eyes-not-another-chrome", "canonical_source": "https://kunalkushwaha.github.io/2026/11/28/agent-needs-eyes-not-another-chrome/", "published_at": "2026-11-28 07:00:00+00:00", "updated_at": "2026-11-28 08:44:27.409775+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["shoji", "Kunal Kushwaha", "WebKit", "Claude Code", "Neovim", "Ghostty", "Chrome", "Playwright"], "also_reported_by": [], "takeaway": "Reusing macOS's built-in WebKit instead of shipping headless Chrome cut memory from 267 MB to 77 MB on a tiny page and from 351 MB to 218 MB on a Wikipedia article, while a `snapshot` command exposing labeled elements with ids like `e2` lets agents click and fill the same page the developer sees.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/your-agent-needs-eyes-not-another-chrome", "markdown": "https://wpnews.pro/news/your-agent-needs-eyes-not-another-chrome.md", "text": "https://wpnews.pro/news/your-agent-needs-eyes-not-another-chrome.txt", "jsonld": "https://wpnews.pro/news/your-agent-needs-eyes-not-another-chrome.jsonld"}}