README.md
mbagley/agent-browserLM Studio plugin that exposes Vercel agent-browser
as model tools. Gives any LLM a Chrome it can drive — open pages, capture
accessibility snapshots, click @eN element refs, type, wait, evaluate JS, and
take screenshots.
npx available on the system. The default binCommand is npx agent-browser,
so no global install of agent-browser is required — npx fetches it on
first run. Run agent-browser install once to download Chrome for Testing.LM Studio's plugin runtime does not inherit the user's shell PATH, so this
plugin discovers the npx (or agent-browser) binary at startup by scanning
common Node-toolchain locations (Homebrew, Volta, fnm, nvm, asdf, the npm
global prefix, and standard system bins) and, as a fallback, asking a login
shell. If discovery fails, set the agent-browser command plugin setting to
an absolute path — e.g. the output of which npx or which agent-browser.
| Tool | Purpose |
|---|---|
browser_open | Launch and/or navigate to a URL |
browser_snapshot | Accessibility-tree snapshot with @eN refs |
browser_screenshot | Save PNG to disk |
browser_click | Click by selector, text query, or @eN ref |
browser_type | Clear and fill an input |
browser_press | Press a keyboard key |
browser_get_text | Read visible text of an element |
browser_page_info | Current URL and title |
browser_wait | Wait for selector / ms / URL pattern / load state |
browser_find | Semantic find by role/text/label/placeholder/testid |
browser_navigate | Back / forward / reload |
browser_eval | Run JS in the page and return its result |
browser_close | Close the session |
| Field | Default | Notes |
|---|---|---|
binCommand | npx agent-browser | Override to agent-browser if installed globally |
session | lmstudio | Isolated session name (own browser + cookies) |
headed | false | Show the Chrome window |
timeoutMs | 30000 | Default per-operation timeout |
screenshotDir | (blank) | Where browser_screenshot writes files |
The plugin ships defaults that make the browser blend in rather than read as
an obvious automated client. These are applied as global flags on every
agent-browser call (the daemon honors them when it launches Chrome). Clear
any field to disable that piece individually.
| Field | Default | Notes |
|---|---|---|
userAgent | recent Chrome/macOS UA | Sent via --user-agent. Clear to use agent-browser's default. |
viewport | 1440x900 | WIDTHxHEIGHT. Becomes --window-size in --args. |
acceptLanguage | en-US,en;q=0.9 | Sent via --headers '{"Accept-Language":"…"}'. |
colorScheme | light | Reported through prefers-color-scheme. no-preference skips the flag. |
extraBrowserArgs | --disable-blink-features=AutomationControlled | Comma-separated Chromium flags merged into --args. The default suppresses navigator.webdriver, the most common automation tell. |
npm install
npm run dev # lms dev — auto-rebuilds and reloads the plugin in LM Studio
npm run test:verify # build + integration test against nytimes.com (network)
npm run push # lms push