airbrow
v0.0.1
Published
Ultra-fast browser CLI for LLM agents. Rust/CDP based, 50x less memory than Playwright.
Maintainers
Readme
airbrow
Ultra-fast browser CLI for LLM agents. Rust/CDP based.
AI Coding Assistants
Add the skill to your AI coding assistant for richer context:
npx add-skill RenKoya1/airbrowWorks with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Goose, OpenCode, and Windsurf.
Benchmark Results (2026-01-28)
| Metric | airbrow | agent-browser | playwright-cli | |--------|------|---------------|----------------| | Memory | 2.3MB | 1.9MB* | 60MB | | Context | ~6KB | ~90KB | ~89KB | | Binary | 1.8MB | 670KB* | Node.js |
*agent-browser CLI only; requires Playwright backend
Context Size Comparison (Real Data)
| Tool | Hacker News | GitHub | Total | vs airbrow | |------|-------------|--------|-------|---------| | airbrow | ~3KB | ~3KB | ~6.6KB | 1x | | agent-browser | ~60KB | ~30KB | ~90KB | 14x larger | | playwright-cli | ~58KB | ~31KB | ~89KB | 13x larger |
14x smaller context. 25x less memory. Zero dependencies.
Install
From source
cargo build --release
./target/release/airbrowVia npm
npm install -g airbrow
airbrow install # Download Chromium (optional if Chrome installed)
airbrowQuick Start
> open # Start browser
> goto https://example.com # Navigate
> observe # Get interactive elements
{"e":[["r1","a","More info"],["r2","btn","Search"]],"n":2,"t":"Example","u":"https://example.com/"}
> click r1 # Click by ref
> fill r2 "hello world" # Fill input
> screenshot shot.png # Take screenshot
> quit # CloseComparison with Competitors
vs agent-browser (Vercel)
| Feature | airbrow | agent-browser |
|---------|------|---------------|
| Focus | Speed & minimal context | Semantic understanding |
| Context size | ~6KB | ~90KB (14x larger) |
| Element refs | r1, r2 | @e1, @e2 |
| Output | Compact JSON | Full YAML tree |
| PII redaction | Manual | Automatic |
| Use case | LLM agents | Complex semantic tasks |
vs playwright-cli (Microsoft)
| Feature | airbrow | playwright-cli | |---------|------|----------------| | Focus | LLM optimization | Full Playwright API | | Memory | 2.3MB | 60MB (25x more) | | Context | ~6KB | ~89KB (13x larger) | | Startup | 1.8s | 5.6s (3x slower) | | Tracing | No | Yes | | MCP support | No | Yes | | Use case | LLM agents | MCP/IDE integration |
Summary
| Metric | airbrow | Competitors | Advantage | |--------|------|-------------|-----------| | Context | ~6KB | ~90KB | 14x smaller | | Memory | 2.3MB | 60MB | 25x less | | Dependencies | None | Node.js+Playwright | Zero |
Commands (50+)
Session
| Command | Description |
|---------|-------------|
| open | Start browser (add --headed to show) |
| reconnect | Reconnect to existing browser |
| quit | Close browser and exit |
Navigation
| Command | Description |
|---------|-------------|
| goto <url> | Navigate to URL |
| back | Go back |
| forward | Go forward |
| reload | Reload page |
Observation
| Command | Description |
|---------|-------------|
| observe | Get interactive elements with refs (r1, r2...) |
| snap | Get URL and title only |
| snapshot | Full page with text content |
| content | Get main HTML |
Interaction
| Command | Description |
|---------|-------------|
| click <ref> | Click element |
| fill <ref> <text> | Fill input field |
| type <ref> <text> | Type character by character |
| press <key> | Press key (Enter, Tab, Escape...) |
| hover <ref> | Hover over element |
Scroll
| Command | Description |
|---------|-------------|
| scroll [up\|down\|<px>] | Scroll viewport |
| scrollto <ref> | Scroll element into view |
| top | Scroll to top |
| bottom | Scroll to bottom |
| pageup | Page up |
| pagedown | Page down |
Tabs
| Command | Description |
|---------|-------------|
| newtab [url] | Open new tab |
| tabs | List all tabs |
| tab <n> | Switch to tab |
| closetab [n] | Close tab |
Network
| Command | Description |
|---------|-------------|
| block <pattern> | Block URLs matching pattern |
| unblock | Clear all blocks |
| blockimages | Block image loading |
| blockmedia | Block video/audio |
| blockfonts | Block web fonts |
Cookies & Storage
| Command | Description |
|---------|-------------|
| cookies [domain] | Get cookies |
| setcookie <n> <v> <d> | Set cookie |
| clearcookies | Clear all cookies |
| storage get <key> | Get localStorage item |
| storage set <k> <v> | Set localStorage item |
| storage clear | Clear localStorage |
Output
| Command | Description |
|---------|-------------|
| screenshot [path] | Save PNG screenshot |
| pdf [path] | Save PDF |
| eval <js> | Execute JavaScript |
Viewport & Media
| Command | Description |
|---------|-------------|
| viewport <w> <h> | Set viewport size |
| mobile | Mobile emulation (375x667) |
| dark | Dark color scheme |
| light | Light color scheme |
Wait
| Command | Description |
|---------|-------------|
| wait <ms> | Wait milliseconds |
| wait <ref> [timeout] | Wait for element |
Selectors
| Type | Example | Description |
|------|---------|-------------|
| Ref | r1, r2 | From observe output |
| CSS | #id, .class | CSS selector |
| XPath | //div[@id='x'] | XPath expression |
| Text | text:Submit | By text content |
| Role | role:button | By ARIA role |
| Label | label:Email | By label text |
| Placeholder | placeholder:Search | By placeholder |
Output Format
Minimal JSON optimized for LLM context:
{
"e": [["r1","btn","Submit"],["r2","in","Email"]],
"n": 2,
"t": "Page Title",
"u": "https://example.com"
}e: Elements array[ref, type, label]n: Element countt: Page titleu: Current URL
Element types: btn (button), in (input), a (link), sel (select), txt (text)
Output Comparison
airbrow (Compact JSON):
{"e":[["r1","a","Hacker News"],["r2","a","new"]],"n":50,"t":"Hacker News","u":"https://news.ycombinator.com/"}agent-browser (Full YAML Tree):
- document:
- table:
- rowgroup:
- row "Hacker News":
- cell "Hacker News" [ref=e1]:
- link "new" [ref=e5]:
- /url: newestResult: airbrow output is 14x smaller
LLM Agent Integration
Minimal context example
# Python pseudocode
def browse(cmd):
return subprocess.run(["airbrow"], input=cmd, capture_output=True).stdout
browse("open")
browse("goto https://example.com")
result = json.loads(browse("observe"))
# result: {"e":[["r1","btn","Login"]],"n":1,"t":"Example","u":"..."}
browse("click r1")Why minimal context matters
| Tool | observe output | Tokens (~) | |------|----------------|------------| | airbrow | ~200 chars | ~50 | | agent-browser | ~3000 chars | ~750 | | playwright-cli | ~3000 chars | ~750 |
Smaller context = Lower cost + Faster response + Better focus
Feature Comparison
| Feature | airbrow | agent-browser | playwright-cli | |---------|:----:|:-------------:|:--------------:| | Navigation | ✅ | ✅ | ✅ | | Click/Input | ✅ | ✅ | ✅ | | Screenshot | ✅ | ✅ | ✅ | | PDF Output | ✅ | ✅ | ✅ | | Tab Management | ✅ | ✅ | ✅ | | Network Blocking | ✅ | ✅ | ✅ | | Cookies/Storage | ✅ | ✅ | ✅ | | Mobile Emulation | ✅ | ✅ | ✅ | | Dark Mode | ✅ | ✅ | ✅ | | Tracing | ❌ | ✅ | ✅ | | Video Recording | ❌ | ✅ | ❌ | | PII Redaction | ❌ | ✅ | ❌ | | MCP Support | ❌ | ❌ | ✅ |
Security
| Aspect | airbrow | agent-browser | playwright-cli | |--------|------|---------------|----------------| | Sandbox | Chrome default | Playwright | Playwright | | Dependencies | Minimal | Playwright | Node.js + Playwright | | Attack Surface | Low | Medium | High | | PII Protection | Manual | Automatic | Manual |
See Also
- SKILL.md - Full command reference for LLM agents
- ../README.md - Project overview
- ../COMPARISON.md - Detailed benchmark results
License
MIT
