Kuri – Zig based agent-browser alternative
TL;DR Highlight
A single Zig binary for agent browser control that cuts snapshot tokens 7-12%
Who Should Read
Backend developers running browser agents who are bothered by Playwright/Node dependencies and snapshot token costs
Core Mechanics
- One Zig binary, no Playwright
- It runs as a single binary with no Node.js runtime, per the README.
- kuri is 1.04 MiB and kuri-agent is 615 KiB (Apple M4 Pro, ReleaseFast build).
- Four modes in one project
- kuri is a CDP (Chrome DevTools Protocol, the remote-control protocol for Chrome) server.
- kuri-fetch fetches pages with QuickJS and no Chrome.
- kuri-browse is a terminal browser and kuri-agent is a scriptable CLI.
- Shorter snapshot format saves tokens
- Refs are @e0 (3 chars) instead of [ref=e0] (9 chars), and the per-line '-' prefix is dropped.
- Versus agent-browser, Hacker News is 12% fewer tokens and Google Flights SIN→TPE is 7% fewer (chars/4 approximation).
- /page/state observation is 44x lighter
- On the same Google Flights page, /page/state is 48 tokens and a full snapshot is 2,124.
- It returns only URL, title, scroll %, and counts of forms and links.
- POST /batch cuts round-trips
- It sends N commands in one HTTP call, removing N-1 round-trips and LLM turns.
- Token count stays the same, but HTTP calls drop from 5 to 1.
- Versus libretto it's a mixed result
- Per-call latency is 4–117 ms for kuri and 1,344–1,500 ms for libretto (same Chrome and tab, tiktoken o200k_base).
- Default snapshot of a large list is 4,424 tokens for kuri and 813 for libretto, so kuri loses there.
- For repeat runs libretto compiles to a Playwright script for 0-token replays.
Community Reactions
- Snapshot diffs made a 9-click run 49x cheaper
- A 9-click feed trajectory with naive full re-snapshots costs 44,285 tokens.
- A truncated base plus diffs costs 898 tokens, versus libretto's 939.
- A commenter who used brow.sh for page fetching found this interesting but asked if it's just a Chrome DevTools wrapper
- They question whether kuri-fetch is really standalone if Chrome must run somewhere.
- A commenter reported that the bun and sh install instructions return a 404
- It suggests the install commands may not work as written.
- A commenter noted the README benchmark is self-published
- It claims 16% lower workflow token cost than Vercel's agent-browser on a Google Flights task.
How to Apply
- Swap your observation step for /page/state
- Find where your agent loop takes a full snapshot at every step.
- Replace only the post-click check with /page/state (about 48 tokens) and measure the difference.
- Request snapshots as interactive+compact
- Call /snapshot?filter=interactive&format=compact to get only clickable elements.
- Compare token counts against your current tool on the same page.
- Set limit on long list pages
- Use /snapshot?limit=N to truncate repeated items.
- Re-capture the part you need with scope=@ref.
- Rerun the benchmark in your own environment before adopting
- The README says to rerun cross-tool numbers before quoting a percentage.
- Compare tokens and latency against your current tool on 3 real pages of your service.
Try It
# Run in a shell. Installs Kuri, opens Hacker News, and compares snapshot vs page/state size (Chrome required)
curl -fsSL https://kuri.trilok.ai/download | sh
kuri &
sleep 3
BASE=http://127.0.0.1:8080
SESSION=demo
curl -s -H "X-Kuri-Session: $SESSION" "$BASE/tab/new?url=https%3A%2F%2Fnews.ycombinator.com"
echo "--- snapshot chars:"
curl -s -H "X-Kuri-Session: $SESSION" "$BASE/snapshot?filter=interactive&format=compact" | wc -c
echo "--- page/state chars:"
curl -s -H "X-Kuri-Session: $SESSION" "$BASE/page/state" | wc -cTerminology
Related Papers
WhatsApp's help pages hid LLM instructions: dont recommend a regulator
WhatsApp help pages hid 102 AI-only instructions, including not recommending a data regulator
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ask HN: How to deal with shipping AI-written code you don't understand?
Developers share how they ship AI-written code: design it yourself, let LLMs implement, and test heavily.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.