gripv0.2
pip install grip-browser

50 tokens per page snapshot.
Not 12,000.

grip is a CDP-native browser SDK for AI agents. It hands your agent a semantic page snapshot — interactive elements and visible text — instead of raw HTML. No Playwright bloat.

PyPI versionPyPI monthly downloadsGitHub stars
https://amazon.com
PAGE: Amazon.com
Interactive:
~12,000 tokenswith raw HTML·~50 tokenswith grip

Built for agents, not browsers

Every feature exists to save tokens, reduce hallucinations, and make agentic loops more reliable.

Pure CDP

Speaks Chrome DevTools Protocol directly — no Playwright binary, no Puppeteer overhead.

Fuzzy element matching

Click "Go" or type "search" — grip resolves to the real element. No CSS selectors.

Shadow DOM traversal

Web components, Chrome extensions, custom elements — all discovered in the same snapshot.

Typed error recovery

Every failure is a typed BrowserError with a suggested RecoveryAction. Your agent decides.

Token trace

Every action recorded with timing and token cost. Export to JSONL for audit or replay.

LLM adapters

OpenAI and Anthropic adapters ship out of the box. Bring your own via the LLMAdapter protocol.

Three lines to a working agent

From a single snapshot to a fully autonomous browsing loop.

quick_start.py
import asyncio
from grip import Browser

async def main():
    async with Browser(headless=True) as browser:
        page = await browser.open("https://news.ycombinator.com")
        snapshot = await page.snapshot()

        print(snapshot.text_content)       # readable page text
        print(snapshot.elements)           # interactive elements only
        print(snapshot.tokens_estimated)   # ~50

asyncio.run(main())

Why not Playwright or Puppeteer?

They were built for humans testing UIs. grip is built for LLMs running loops.

Feature
grip
Playwright MCP
Puppeteer
Token-efficient snapshots*
Shadow DOM traversal
Prompt injection guard
Typed error recovery
Element staleness detection
Pure CDP (no binary bloat)
Screenshot token tracking

* Playwright MCP ships accessibility-tree snapshots — far smaller than raw HTML, but typically hundreds to thousands of tokens per page. grip's semantic snapshot averages ~50.

Start in 30 seconds

Python 3.11+ · Chrome or Chromium installed.

$pip install grip-browser

requires Python 3.11+ · Chrome/Chromium installed