Browser SDK that thinks
in tokens.
grip gives your AI agent a semantic page snapshot — interactive elements and visible text — in ~50 tokens. Raw HTML costs 12,000.
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.
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.
Start in 30 seconds
Python 3.11+ · Chrome or Chromium installed.
requires Python 3.11+ · Chrome/Chromium installed