chrome-agent: a Rust-built browser automation CLI for LLM agents
chrome-agent is a lightweight Rust CLI that gives LLM agents a token-efficient, stable-ID browser automation interface via CDP, cutting context by ~66%.
chrome-agent is a 3 MB Rust binary designed to give LLM agents the smallest possible representation of a webpage, cutting the token cost of browser automation. Instead of returning ~2,000 tokens of raw DOM like Playwright, it exposes a stripped-down accessibility tree at roughly 50 tokens, a claimed 66% reduction in context spent on page state.
The tool assigns stable element identifiers derived from Chrome's backendNodeId, so scripts don't break when the DOM changes between page loads, unlike sequential or CSS-selector-based approaches. An --inspect flag merges action and observation into a single round-trip, and every error response includes a structured hint field telling the agent what to try next. Seven CDP-level stealth patches, including skipping the commonly-flagged Runtime.enable call, aim to reduce headless-browser detection.
The project positions itself explicitly against agent-browser (Vercel), a feature-rich ~40K-line platform with dashboards and cloud browser support. chrome-agent takes the opposite approach: it strips features to minimize tokens, keeping the codebase to roughly 8.8K lines and shipping as a dependency-free static binary with no Node.js or Playwright runtime required.
For engineers building LLM-driven web agents, token overhead translates directly into latency and API cost. chrome-agent's compact snapshot format, durable element IDs, and JSON-native error handling could reduce the amount of glue code needed to wire an LLM to a real browser session.