HeadlinesBriefing favicon HeadlinesBriefing.com

Kuri: Zig-Based Browser Automation for AI Agents

Hacker News •
×

Kuri is a browser automation framework built specifically for AI agents, written in Zig with zero Node.js dependencies. The project offers CDP automation, accessibility snapshots, HAR recording, and a standalone fetcher—all in a 464 KB binary that cold starts in roughly 3 milliseconds. Four modes cover different use cases: kuri handles CDP server duties, kuri-fetch works without Chrome, kuri-browse provides an interactive terminal browser, and kuri-agent enables scriptable automation with security testing capabilities.

Token efficiency appears to be Kuri's main selling point. On Google Flights, a full agent loop (navigate, snapshot, click, snapshot, evaluate) costs 4,110 tokens with kuri-agent versus 4,880 for agent-browser—a 16% reduction per cycle that compounds across multi-step tasks. The compact snapshot mode uses just 1,927 tokens compared to agent-browser's 2,425 in interactive mode. Action responses use flat JSON (like {"ok":true}) rather than nested CDP structures, with click operations consuming only 9 tokens.

Most browser automation tools were designed for QA engineers, but Kuri targets agent loops directly. The developers deliberately narrowed the scope compared to agent-browser's 140+ commands—Kuri offers around 40 endpoints focused on useful state extraction at minimal model cost. Notably, tools like lightpanda that show lower token counts actually fail to render JavaScript-heavy SPAs; Google Flights returns a 507-token empty shell because it renders via client-side fetch(). The binary is 13x smaller than agent-browser (464 KB vs 6.0 MB) and installs with 10x less disk space (3.3 MB vs 33 MB).