Grip (agentbrowser)
View live ↗Repo: github.com/nikolas-sapa/grip-browser · PyPI: pip install grip-browser
What it is
A Python library that gives AI agents a browser built directly on the Chrome DevTools Protocol — no Playwright, no Puppeteer, no automation framework in between. It converts any page into a semantic summary of interactive elements and visible text, shaped for a model rather than for a rendering engine.
Why it matters
Token cost is the first thing that breaks a production agent with browser access. Raw HTML: ~12,000 tokens per snapshot. Screenshots: ~3,000. Grip: ~50. A full agent loop that costs 200,000 tokens against raw HTML costs about 2,000 with Grip — 100× off the cost and the latency.
CDP-native is the other half. Talking to Chrome directly means no framework to install, no browser binary to manage on top of the one you already have, and no layer translating your intent into someone else's abstraction.
What v0.6.0 changed
The release is mostly a security fix and an interface.
NavigationPolicy was enforced only in Browser.open(). Page.goto() had no check and redirects were never re-checked, so allow_private=False was bypassable — which is the whole point of the flag. It's now enforced through CDP Fetch interception at request stage, so a refused request fails before Chrome resolves DNS, and it's armed for the page lifetime instead of re-applied per navigation.
The private-address block also missed IPv4 spellings Chrome accepts but Python's ipaddress rejects: 2130706433, 0177.0.0.1, 0x7f000001, 127.1. All canonicalized before the check now. Popup targets are closed on attach under a restrictive policy, since a fresh CDP target inherits none of the parent's interception.
Stated rather than hidden: WebSocket handshakes aren't intercepted — CDP's Fetch domain doesn't cover them — and DNS rebinding is out of scope.
New in the same release: a grip CLI (open, snapshot, read, screenshot, run, doctor), file upload and download, localStorage in session save/load, multi-tab control, a Gemini adapter and a base_url on the OpenAI adapter for Ollama, vLLM, LM Studio and OpenRouter. The MCP server went from 5 tools to 8 — and stopped stranding Chrome and its profile directory on a clean stdio exit.
Breaking: window.open() now fails under a restrictive policy, which is the default.
Current status
v0.6.0 on PyPI as grip-browser, plus grip-search v0.2.0 out of the same repo. Open-source, MIT.
Stack
Python, Chrome DevTools Protocol, MCP.