Skip to content

About

BX Browser - a DOM-first, vision-capable browser agent. Reads the accessibility tree for 2-4s steps, falls back to vision only when the page demands it. Session keep-alive, model-ladder fallback, zero-dependency core.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BX Browser

A vision-capable, DOM-first browser agent. You give it a task in plain language; it enumerates the page, decides, acts, and repeats until the task is done.

Built to be fast. Most browser agents screenshot every step and wait on a vision model. BX Browser reads the accessibility tree first and only falls back to vision when the page actually demands it — canvas apps, bot walls, visual-only controls.

Why it's fast

  • DOM-first decisions. Numbered elements from the a11y tree mean 2–4 second steps instead of a vision round-trip every turn.
  • Atomic observation. Tree and screenshot are fetched in a single server round-trip, not two.
  • Session keep-alive. Logins persist across runs, so you authenticate once instead of every invocation.
  • Health-aware key rotation. Rotates across a pooled set of model keys and degrades down a model ladder under rate limits rather than failing.

Design

enumerate elements  ->  model picks an INDEX  ->  execute  ->  repeat

Deliberately index-based rather than selector-generating. The model never writes a CSS selector, so it cannot hallucinate one that silently matches the wrong node.

Zero third-party Python dependencies in the core agent — standard library only.

Usage

# run a task
bx_browser.py run "<task>" [--url U] [--max-steps N] [--mode auto|fast|vision]
                           [--profile fast|balanced|smart] [--model M]

# deterministic primitives, no AI calls
bx_browser.py enum [--url U]              # numbered element dump
bx_browser.py click <n>
bx_browser.py type <n> "<text>" [--enter]
bx_browser.py scroll <up|down> [amount]
bx_browser.py goto <url> | back | forward | refresh
bx_browser.py shot [--full] | links [limit] | tabs
bx_browser.py extract '<json-schema>'     # structured scrape, no AI
bx_browser.py js "<expression>"           # raw JS in page context

# diagnostics
bx_browser.py keys | health | close

The non-AI subcommands matter: enum, click, extract and js let you script a deterministic path once you know it, and spend model calls only on the parts that genuinely need judgement.

Configuration

All via environment, nothing hardcoded:

Variable Purpose
CAMOFOX_URL Browser engine endpoint (default http://localhost:9377)
GEMINI_BROWSER_MODEL Model id
BX_MODEL_LADDER Comma-separated fallback ladder
BX_PROFILE fast / balanced / smart
BX_STATE_FILE Session state path
GOOGLE_AI_STUDIO_API_KEY_* Key pool for rotation

Status

Working tool, extracted from a larger private workspace. The engine binding targets a local anti-bot browser server; the agent loop itself is engine-agnostic and the CDP helpers in src/ show the raw protocol path.

MIT.

About

BX Browser - a DOM-first, vision-capable browser agent. Reads the accessibility tree for 2-4s steps, falls back to vision only when the page demands it. Session keep-alive, model-ladder fallback, zero-dependency core.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages