Skip to content
INSTALL AUDIT · REAL INSTALL, LOGGED

Is agent-browser safe to install? Install audit of agent-browser 0.43.0 (npm)

Audited on 2026-11-13 against version 0.43.0, upstream commit 4720bc3. Package: agent-browser on npm. Repository: github.com/vercel-labs/agent-browser.

We ran npm install -g agent-browser in a throwaway Ubuntu 24.04 container and recorded what it downloaded, what it wrote, what it printed and what the first commands returned. Everything below marked as our result comes from those logs. Upstream claims are labelled as such.

Quick verdict

Install risk: Medium
Low for the npm step, moderate once you add the browser. npm install downloaded only from registry.npmjs.org, took the native binary from a per-platform optional package and wrote nothing else outside the package. The footprint comes from agent-browser install: 194 MB of Chrome for Testing into ~/.agent-browser (408M on disk), plus --with-deps, which runs apt-get as root for 36 named packages.
Runtime risk: moderate to high
By design it runs a detached daemon that drives Chrome over a local DevTools port. As root, in a container, or when the CI environment variable is set, it adds --no-sandbox to Chrome, it writes the last URL to disk, and it can hold credentials and session tokens under ~/.agent-browser. Chrome itself looked up several Google hosts during one page open.

Installing agent-browser 0.43.0 from npm looked low risk in our Ubuntu 24.04 containers: registry-only downloads, a native binary from a platform package, and no daemon or shell profile edits at install time. The bigger footprint is the browser. agent-browser install adds 194 MB of Chrome for Testing (408M in ~/.agent-browser), --with-deps installs system libraries with the system package manager (apt in our runs), and npm uninstall leaves all of that behind. At runtime, treat it as handing your agent a real browser, with Chrome's sandbox off when you run as root, in a container, or when the CI environment variable is set.

Supported platforms (README): macOS (ARM64, x64), Linux (ARM64, x64, glibc and musl), Windows (x64). We tested Linux only. Jump to the libglib-2.0.so.0 fix, Chrome not found or does it send data anywhere?

METHOD

What we ran

Docker ubuntu:24.04 (Ubuntu 24.04.5 LTS), started with docker run --rm --cpus 2 and 2g or 3g of memory, running as root. Run 1 used Node v18.19.1 and npm 9.2.0 from Ubuntu apt. Runs 2 and 3 used the official Node v22.21.1 tarball from nodejs.org (npm 10.9.4). Run 2 added --cap-add SYS_PTRACE for strace; run 3 added SYS_PTRACE and NET_ADMIN for tcpdump. Only the read-only test script was mounted, with no host secrets or environment variables. Each run started from a fresh container.

All runs: container
docker run --rm --cpus 2 --memory 2g ubuntu:24.04   # or --memory 3g; run 2 and 3 add --cap-add SYS_PTRACE, run 3 adds --cap-add NET_ADMIN
Run 1: Ubuntu's apt Node (v18.19.1)
apt-get install -y -qq nodejs npm ca-certificates file
Run 1: install with verbose network log
npm install -g agent-browser@0.43.0 --foreground-scripts --loglevel=info
Run 1: first run
agent-browser --version
agent-browser --help
Run 2: Node 22 from nodejs.org
apt-get install -y -qq curl ca-certificates xz-utils file strace procps
curl -fsSL https://nodejs.org/dist/v22.21.1/node-v22.21.1-linux-x64.tar.xz | tar -xJ -C /opt
export PATH=/opt/node-v22.21.1-linux-x64/bin:$PATH
Run 2: install, then files changed outside the package
touch /tmp/marker
npm install -g agent-browser@0.43.0 --foreground-scripts --loglevel=info
find / -xdev -newer /tmp/marker -type f
Run 2: the native binary
agent-browser --version
file <native binary>; ldd <native binary>
Run 2: before any browser is installed
agent-browser open https://example.com
agent-browser doctor
Run 2: browser download, no system deps
agent-browser install
agent-browser open https://example.com
Run 2: system deps, then a real page
agent-browser install --with-deps
agent-browser open https://example.com
agent-browser snapshot -i
ps -eo pid,ppid,comm,args --width 200
agent-browser close
Run 2: connect() trace
strace -f -qq -e trace=connect -o /tmp/st timeout 90 agent-browser open https://example.com
strace -f -qq -e trace=connect -o /tmp/st2 agent-browser --version
Run 2: uninstall
npm uninstall -g agent-browser
which agent-browser
du -sh /root/.agent-browser
Run 3: setup (Node v22.21.1 tarball as in run 2)
apt-get install -y -qq curl ca-certificates xz-utils strace procps tcpdump
npm install -g agent-browser@0.43.0
agent-browser install --with-deps
Run 3: DNS and connect() capture during one page open
tcpdump -i any -n -l 'udp port 53' > /tmp/dns.txt &
strace -f -qq -e trace=connect -o /tmp/st agent-browser open https://example.com &
agent-browser get url
cat /root/.agent-browser/default.target
ps -eo args --width 4000   # the Chrome command line
agent-browser close
Run 3: uninstall and manual cleanup
npm uninstall -g agent-browser
du -sh /root/.agent-browser
rm -r /root/.agent-browser
Registry metadata
npm view agent-browser@0.43.0 dist --json

We keep the raw logs on file. See how we run install audits for the full checklist.

INSTALL

What the npm installer does

The package

  • agent-browser@0.43.0: unpacked size 320,283 bytes, 42 files, license Apache-2.0 (npm registry metadata).
  • engines: node >=22.0.0. The only lifecycle script is postinstall: node scripts/postinstall.js.
  • The native Rust binary is not in the main tarball. It ships in seven per-platform optional packages, @agent-browser/cli-darwin-x64, cli-darwin-arm64, cli-linux-x64-gnu, cli-linux-x64-musl, cli-win32-x64-msvc, cli-linux-arm64-gnu and cli-linux-arm64-musl, all 0.43.0. npm installs the one for your platform.
  • npm view agent-browser@0.43.0 dist --json lists two registry signatures and an attestations entry with an SLSA provenance predicate (https://slsa.dev/provenance/v1). We did not verify the attestation ourselves.

Network during npm install

  • npm's info log (run 2, Node 22) showed requests to registry.npmjs.org only: metadata for agent-browser and the seven platform packages, then the tarballs for agent-browser and @agent-browser/cli-linux-x64-gnu. npm reported added 2 packages in 4s.
  • In run 1, npm 9.2.0 on Node 18 also fetched the @agent-browser/cli-linux-x64-musl tarball and reported added 3 packages in 3s.
  • postinstall downloaded nothing in our runs.

Postinstall, explained

We read scripts/postinstall.js in full at upstream commit 4720bc3. In the order the code runs, it:

  • Finds the native binary in the platform package and makes it executable (chmod 755).
  • Only if that platform package is missing (for example after npm install --omit=optional, or with a lockfile made on another platform), downloads https://github.com/vercel-labs/agent-browser/releases/download/v<version>/<binaryName> instead. That fallback follows 301/302 redirects and writes the file. It does not check a checksum or signature. We read this code path but did not trigger it.
  • Writes bin/.install-method with the package manager's name (npm in our run), which agent-browser upgrade uses.
  • On global installs, re-points the global agent-browser bin entry at the native binary, so commands skip the Node launcher.
  • Prints a Chrome reminder. On Linux it first runs which for google-chrome, google-chrome-stable, chromium-browser and chromium.
Exact postinstall output (run 1, npm install -g agent-browser@0.43.0 --foreground-scripts --loglevel=info; run 2's filtered log shows the same lines)
> agent-browser@0.43.0 postinstall
> node scripts/postinstall.js

✓ Native binary ready: @agent-browser/cli-linux-x64-gnu
✓ Optimized: bin entry points to native binary (zero overhead)

  ⚠ No Chrome installation detected.
  If you plan to use a local browser, run:

    agent-browser install

  On Linux, include system dependencies with:

    agent-browser install --with-deps

  You can skip this if you use --cdp, --provider, --engine, or --executable-path.

npm info run agent-browser@0.43.0 postinstall { code: 0, signal: null }

added 3 packages in 3s

Files written, and no daemon at install time

  • Package directory, 21M: lib/node_modules/agent-browser under the Node prefix. bin/ holds .install-method, agent-browser-linux-x64 (20,460,232 bytes, ELF 64-bit x86-64 PIE, dynamically linked; ldd reported no missing libraries) and agent-browser.js (the 2,707-byte Node launcher).
  • Global command: a symlink to bin/agent-browser-linux-x64 (run 1: /usr/local/bin/agent-browser; run 2: /opt/node-v22.21.1-linux-x64/bin/agent-browser).
  • Outside the package, find -newer showed only npm's own /root/.npm/_update-notifier-last-checked.
  • No daemon, service, cron job or systemd unit at install time, and no shell profile edits. A daemon does start later, when you open a page (see Runtime below).
  • agent-browser --version printed agent-browser 0.43.0 (exit 0), and strace counted 0 AF_INET connects for it.
BROWSER DOWNLOAD

agent-browser install: what it downloads

npm install only gets you the CLI. The browser is a separate step: agent-browser install downloads Chrome for Testing. Postinstall prints the reminder; it does not run the download.

$ agent-browser install # run 2, exit 0, verbatim (the progress counter redraws in place from 10/194 MB; shown at its final value)
⚠ Linux detected. If browser fails to launch, run:
  agent-browser install --with-deps

Installing Chrome...
  Downloading Chrome 157.0.8103.78 for linux64
  https://storage.googleapis.com/chrome-for-testing-public/157.0.8103.78/linux64/chrome-linux64.zip
  194/194 MB (100%)
✓ Chrome 157.0.8103.78 installed successfully
  Location: /root/.agent-browser/browsers/chrome-157.0.8103.78

Note: If you see "shared library" errors when running, use:
  agent-browser install --with-deps
  • Download: Chrome for Testing 157.0.8103.78 for linux64, a 194 MB zip from storage.googleapis.com.
  • Location: /root/.agent-browser/browsers/chrome-157.0.8103.78 (301 files). ~/.agent-browser was 408M afterwards.
  • Version choice: upstream cli/src/install.rs reads https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json.
  • We did not check a checksum of the zip ourselves and did not determine whether install.rs verifies one.

agent-browser install --with-deps: the apt step

--with-deps installs the system libraries with the detected package manager (upstream install.rs: apt-get, dnf or yum; other distros exit with No supported package manager found (apt-get, dnf, or yum)), so it needs root or sudo. Upstream installation docs say that as root it calls the package manager directly and for other users it uses sudo. On apt systems it first runs apt-get install --simulate and aborts if apt would remove any package. We only ran the apt path, as root, on Ubuntu 24.04. The commands it printed (run 3, filtered by grep to these lines, exit 0):

$ agent-browser install --with-deps # run 3, verbatim lines
Installing system dependencies...
Running: apt-get update
Running: apt-get install -y libxcb-shm0 libx11-xcb1 libx11-6 libxcb1 libxext6 libxrandr2 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libgtk-3-0t64 libpangocairo-1.0-0 libpango-1.0-0 libatk1.0-0t64 libcairo-gobject2 libcairo2 libgdk-pixbuf-2.0-0 libxrender1 libasound2t64 libfreetype6 libfontconfig1 libdbus-1-3 libnss3 libnss3-tools libnspr4 libatk-bridge2.0-0t64 libdrm2 libxkbcommon0 libatspi2.0-0t64 libcups2t64 libxshmfence1 libgbm1 fonts-noto-color-emoji fonts-noto-cjk fonts-freefont-ttf
✓ System dependencies installed
End of the same command's output in run 2, after agent-browser install had already downloaded Chrome
✓ System dependencies installed
Installing Chrome...
✓ Chrome 157.0.8103.78 is already installed
  • 36 packages are named on the command line. On the base ubuntu:24.04 image, apt printed 158 Setting up lines in run 2, because it also installed their dependencies.
  • Those dependencies set up system services in our container. Run 2's apt output includes the lines below: systemd-timesyncd and systemd-resolved units were enabled, and an attempt to convert /etc/resolv.conf to a symlink failed inside Docker. We did not identify which named package pulled them in, and we did not test a machine that already has them.
  • In run 3, agent-browser install --with-deps on its own (no earlier agent-browser install) installed the libraries and downloaded Chrome, and open then worked (the download lines were filtered out of our run 3 log; ~/.agent-browser was 408M afterwards and open worked).
  • These apt packages stay installed after npm uninstall.
Run 2 apt output, excerpt (verbatim)
Creating group 'systemd-timesync' with GID 997.
Creating user 'systemd-timesync' (systemd Time Synchronization) with UID 997 and GID 997.
Created symlink /etc/systemd/system/dbus-org.freedesktop.timesync1.service → /usr/lib/systemd/system/systemd-timesyncd.service.
Created symlink /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service → /usr/lib/systemd/system/systemd-timesyncd.service.
Created symlink /etc/systemd/user/graphical-session-pre.target.wants/session-migration.service → /usr/lib/systemd/user/session-migration.service.
Converting /etc/resolv.conf to a symlink to /run/systemd/resolve/stub-resolv.conf...
mv: cannot move '/etc/resolv.conf' to '/etc/.resolv.conf.systemd-resolved.bak': Device or resource busy
Cannot take a backup of /etc/resolv.conf.
ln: failed to create symbolic link '/etc/resolv.conf': Device or resource busy
Cannot install symlink from /etc/resolv.conf to ../run/systemd/resolve/stub-resolv.conf
Creating group 'systemd-resolve' with GID 996.
Creating user 'systemd-resolve' (systemd Resolver) with UID 996 and GID 996.
Created symlink /etc/systemd/system/dbus-org.freedesktop.resolve1.service → /usr/lib/systemd/system/systemd-resolved.service.
Created symlink /etc/systemd/system/sysinit.target.wants/systemd-resolved.service → /usr/lib/systemd/system/systemd-resolved.service.
FIRST RUN

First run: exact outputs

Straight after npm install, before any browser was installed (run 2, Node 22):

$ agent-browser open https://example.com # exit 1
✗ Auto-launch failed: Chrome not found. Checked:
  - agent-browser cache: /root/.agent-browser/browsers
  - System Chrome installations
  - Puppeteer browser cache
  - Playwright browser cache
Run `agent-browser install` to download Chrome, or use --executable-path.
$ agent-browser doctor # exit 1
agent-browser doctor

Environment
  pass  CLI version 0.43.0 (linux x86_64)
  pass  Home directory /root
  pass  State and socket directory /root/.agent-browser
  pass  50.6 GB free at state dir

Chrome
  fail  No Chrome binary found
        fix: agent-browser install

Recording
  warn  ffmpeg not found on PATH (only needed for `record`)
        fix: apt install ffmpeg (Debian/Ubuntu)

Daemons
  pass  No active daemons

Security
  info  No encryption key set (will be auto-generated on first auth save)
        fix: export AGENT_BROWSER_ENCRYPTION_KEY=$(openssl rand -hex 32)

Providers
  info  Browserless: BROWSERLESS_API_KEY not set
  info  Browserbase: BROWSERBASE_API_KEY not set
  info  Browser Use: BROWSER_USE_API_KEY not set
  info  Kernel: KERNEL_API_KEY not set
  info  AgentCore: no AWS credentials in env (AWS_ACCESS_KEY_ID / AWS_PROFILE)
  info  AI_GATEWAY_API_KEY not set (chat command disabled)
        fix: export AI_GATEWAY_API_KEY=gw_...

Network
  info  TLS roots: built-in Mozilla roots
  pass  Chrome for Testing CDN reachable (1000ms, HTTP 200)

Launch test
  fail  Browser launch failed: Chrome not found. Checked:
  - agent-browser cache: /root/.agent-browser/browsers
  - System Chrome installations
  - Puppeteer browser cache
  - Playwright browser cache
Run `agent-browser install` to download Chrome, or use --executable-path.
        fix: agent-browser install   # or check --debug output

Summary: 6 pass, 1 warn, 2 fail

tip: Run with --fix to attempt repairs.
  • doctor exits 1 while Chrome is missing. Both failures are the missing Chrome; the warning is ffmpeg, which is only needed for record.
  • doctor makes a network request of its own: the pass line Chrome for Testing CDN reachable (1000ms, HTTP 200). Upstream cli/src/doctor/network.rs fetches https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json. Upstream docs say --offline skips the network checks; we did not test that.
  • The Security line is about the auth vault key. See Credentials and data at rest below.

After agent-browser install --with-deps, the same container could open a page (run 2, each command exit 0):

Run 2 outputs, verbatim
$ agent-browser open https://example.com
[agent-browser] launched browser
✓ Example Domain
  https://example.com/
$ agent-browser snapshot -i
- link "Learn more" [ref=e1]
$ agent-browser close
✓ Browser closed

After close, ps found no chrome or agent-browser processes left (run 2 and run 3).

COMMON ERROR · VERIFIED FIX

Fix: error while loading shared libraries: libglib-2.0.so.0 (Chrome exited early, exit code 127)

This is the error you get on a fresh Ubuntu 24.04 machine or container if you run agent-browser install without --with-deps. The Chrome download succeeds, then Chrome cannot start.

Error text (verbatim, from our log)
✗ Auto-launch failed: Chrome exited early (exit code: 127) without writing DevToolsActivePort
(also tried parsing stderr) Chrome exited before providing DevTools URL
Chrome stderr:
  /root/.agent-browser/browsers/chrome-157.0.8103.78/chrome: error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory

Linux, fresh ubuntu:24.04. agent-browser open https://example.com after agent-browser install without --with-deps (run 2), exit 1. Verified: we reproduced it and the fix.

Cause. agent-browser install downloads Chrome for Testing, but not the system libraries Chrome links against. A minimal Ubuntu 24.04 image has no libglib-2.0.so.0, so the Chrome binary failed to load (exit code 127) before it could open its DevTools port.

Fix. Run agent-browser install --with-deps. It installs the browser libraries with the detected package manager (upstream install.rs: apt-get, dnf or yum; otherwise it exits with No supported package manager found), so it needs root or sudo (upstream docs: as root it calls the package manager directly, otherwise it uses sudo). On our Ubuntu 24.04 containers it ran apt-get update and apt-get install for 36 libraries and fonts. In runs 2 and 3 it exited 0 and agent-browser open https://example.com then worked.

Fix (runs 2 and 3, as root; use sudo or a root shell otherwise)
agent-browser install --with-deps
agent-browser open https://example.com

In both runs, open then printed [agent-browser] launched browser and ✓ Example Domain, exit 0. If you would rather install the libraries yourself, the apt-get install line above lists the 36 package names it used on Ubuntu 24.04 (Debian/Ubuntu only; names differ on other releases).

COMMON ERROR · VERIFIED FIX

Fix: Auto-launch failed: Chrome not found

npm install -g agent-browser does not download a browser, so the first open fails until you install one.

Error text (verbatim, from our log)
✗ Auto-launch failed: Chrome not found. Checked:
  - agent-browser cache: /root/.agent-browser/browsers
  - System Chrome installations
  - Puppeteer browser cache
  - Playwright browser cache
Run `agent-browser install` to download Chrome, or use --executable-path.

Linux. agent-browser open https://example.com right after npm install -g agent-browser (run 2), exit 1. agent-browser doctor reported the same in its Launch test. Verified: we reproduced it and the fix.

Cause. npm install does not download a browser. agent-browser looked in its own cache, system Chrome installs and the Puppeteer and Playwright caches, and found none.

Fix. Run agent-browser install to download Chrome for Testing, or point it at a Chrome you already have with --executable-path. On a minimal Linux image, run agent-browser install --with-deps instead: in run 3 that one command installed the system libraries and Chrome, and open then worked (the download lines were filtered out of our run 3 log; ~/.agent-browser was 408M afterwards and open worked). We did not test --executable-path.

Fix
# Download Chrome for Testing into ~/.agent-browser/browsers (run 2)
agent-browser install

# On a minimal Linux image, libraries and Chrome in one step (run 3; needs root or sudo)
agent-browser install --with-deps

# Or use a Chrome you already have (not tested by us)
agent-browser --executable-path /path/to/chrome open https://example.com
COMMON WARNING · VERIFIED

npm WARN EBADENGINE on Ubuntu 24.04's Node 18

Ubuntu 24.04's apt nodejs package is Node 18. agent-browser 0.43.0 declares Node 22 or later.

Error text (verbatim, from our log)
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'agent-browser@0.43.0',
npm WARN EBADENGINE   required: { node: '>=22.0.0' },
npm WARN EBADENGINE   current: { node: 'v18.19.1', npm: '9.2.0' }
npm WARN EBADENGINE }

Ubuntu 24.04 with Node v18.19.1 and npm 9.2.0 from apt (run 1), during npm install -g agent-browser@0.43.0. The install still exited 0. Verified: we reproduced it and the fix.

Cause. agent-browser 0.43.0 declares engines node >=22.0.0, and npm only warns about engines. postinstall links the global command straight to the native binary, so agent-browser --version (agent-browser 0.43.0) and --help both exited 0 on Node 18. We did not test open or snapshot on Node 18, or the Node launcher path (used when install scripts are blocked).

Fix. Install Node 22 or later to match the declared engine. We used the official v22.21.1 tarball from nodejs.org in runs 2 and 3, where the warning did not appear.

What we ran instead (runs 2 and 3)
curl -fsSL https://nodejs.org/dist/v22.21.1/node-v22.21.1-linux-x64.tar.xz | tar -xJ -C /opt
export PATH=/opt/node-v22.21.1-linux-x64/bin:$PATH
node --version   # v22.21.1
npm install -g agent-browser@0.43.0
UPSTREAM REPORTS · NOT REPRODUCED

Install problems reported upstream (we did not reproduce these)

These are open issues on the upstream tracker that touch installation. We list them so you can recognise them. We did not reproduce any of them, and their causes and fixes are the reporters' and maintainers', not ours.

Upstream issue title
CLI hangs and throws os error 11 (Resource temporarily unavailable) on Ubuntu 24.04 VM

Upstream issue #1049 (open). We did not reproduce this: our Ubuntu 24.04 runs were Docker containers, not a VM, and the CLI did not hang. Upstream report: we did not reproduce it.

Cause. Reported upstream for an Ubuntu 24.04 VM. We have no first-party cause.

Fix. Follow issue #1049 for status. agent-browser doctor is the upstream first step for a misbehaving install.

github.com/vercel-labs/agent-browser/issues/1049

Upstream issue title
macOS npm binary is ad-hoc signed / Gatekeeper-rejected; CLI hangs silently (0 stdout/stderr)

Upstream issue #1729 (open), macOS. We did not reproduce this: we did not test macOS. Upstream report: we did not reproduce it.

Cause. Reported upstream: the macOS binary from npm is ad-hoc signed and rejected by Gatekeeper, and the CLI then hangs without output.

Fix. Follow issue #1729 for status. Upstream installation docs also list Homebrew (brew install agent-browser) for macOS; we did not test it.

github.com/vercel-labs/agent-browser/issues/1729

UPSTREAM REPORT · NOT VERIFIED BY US

#2214: postinstall repoints the global agent-browser symlink during local (non-global) installs

We only ran global installs, so we did not reproduce it.

Issue #2214

UPSTREAM REPORT · NOT VERIFIED BY US

#941: Network timeout with bundled Chrome 146 in certain network environments

Reported for Chrome 146. Our runs downloaded Chrome 157.0.8103.78 and did not time out, but we did not try to reproduce the reporter's network conditions.

Issue #941

RUNTIME

Runtime: what runs while a browser is open

agent-browser open starts a background daemon and a Chrome it controls. This is what we saw while a page was open:

  • A daemon process, agent-browser-linux-x64, with parent pid 1 (detached from the shell that started it), owning Chrome, plus two chrome_crashpad_handler processes (run 2, ps).
  • The CLI talks to the daemon over a UNIX socket: strace showed connects to /root/.agent-browser/default.sock.
  • agent-browser close printed ✓ Browser closed, and afterwards no chrome or agent-browser processes were left.
  • Idle timeout, from the upstream changelog (v0.33.1), not tested by us: the daemon exits after 1 hour without commands by default. AGENT_BROWSER_IDLE_TIMEOUT_MS=0 turns that off. (The default applies to headless browsers agent-browser launched; per the changelog it never closes headed or user-attached browsers.)
Chrome command-line flags while the page was open (run 3, verbatim)
--remote-debugging-port=0
--no-first-run
--no-default-browser-check
--disable-background-networking
--disable-backgrounding-occluded-windows
--disable-component-update
--disable-default-apps
--disable-hang-monitor
--disable-popup-blocking
--disable-prompt-on-repost
--disable-sync
--disable-features=Translate
--enable-features=NetworkService,NetworkServiceInProcess,WebMCPTesting,DevToolsWebMCPSupport
--metrics-recording-only
--password-store=basic
--use-mock-keychain
--headless=new
--hide-scrollbars
--enable-unsafe-swiftshader
--user-data-dir=/tmp/agent-browser-chrome-b3201ade-719d-4c05-b44a-11d86a1e0f40
--window-size=1280,720
--no-sandbox
--disable-dev-shm-usage

--no-sandbox is added automatically when you are root, in a container, or when the CI environment variable is set

We did not pass --no-sandbox. In upstream cli/src/native/cdp/chrome.rs, should_disable_sandbox() carries the doc comment "Returns true if Chrome's sandbox should be disabled because the environment doesn't support it (containers, VMs, CI runners, running as root)". The code returns true when a CI environment variable is set, when the effective user is root, when /.dockerenv or /run/.containerenv exists, or when /proc/1/cgroup mentions docker, kubepods or lxc. If you passed --no-sandbox yourself, it leaves it alone.

What it means: Chrome's sandbox is off for that session, so a malicious page has one less barrier between it and the account running Chrome. Our runs were root in a Docker container, which is why we saw it. We did not test as a normal user on a desktop. If you run agent-browser as root, keep untrusted browsing inside a container or VM you can throw away.

Other runtime facts

  • --remote-debugging-port=0 lets Chrome pick a random local DevTools (CDP) port; strace showed one connect to 127.0.0.1. We did not test whether other local users or processes can reach it.
  • --user-data-dir=/tmp/agent-browser-chrome-<uuid> is a fresh temporary profile per launch, not your personal Chrome profile. Upstream docs: --profile <name> instead copies a Chrome profile's cookies and login state into a temp directory, and --cdp / --auto-connect attach to a browser you already run.
  • ~/.agent-browser/default.target (mode 600, 91 bytes) records the last page. After open https://example.com it contained {"targetId":"B056B38AAEF503A6A7CB0666D5B33691","url":"https://example.com/","pinned":false}, and agent-browser get url printed https://example.com/.
NETWORK · PRIVACY

Does agent-browser send data anywhere?

During one agent-browser open https://example.com in run 3, the container looked up nine hostnames. Only one was the page we asked for. These are the DNS queries tcpdump saw on udp port 53 (count, then the query):

DNS queries during open + close (run 3, verbatim)
      2 A? dns.google.
      2 A? chrome.cloudflare-dns.com.
      1 AAAA? chromereleases.googleblog.com.
      1 A? www.gstatic.com.
      1 A? www.google.com.
      1 A? play.google.com.
      1 A? ogads-pa.clients6.google.com.
      1 A? example.com.
      1 A? clients2.google.com.
      1 A? chromereleases.googleblog.com.
connect() destinations during one open (run 2, strace, count then address, verbatim)
     19 inet_addr("153.92.2.6")
      7 sun_path="/run/dbus/system_bus_socket"
      4 sun_path="/root/.agent-browser/default.sock"
      4 inet_addr("142.251.156.119")
      3 inet_addr("8.8.4.4")
      3 inet_addr("172.64.41.3")
      2 sun_path="/var/run/nscd/socket"
      2 inet_addr("173.194.41.95")
      2 inet_addr("173.194.41.132")
      2 inet_addr("162.159.61.3")
      2 inet_addr("142.251.154.7")
      2 inet_addr("142.251.154.119")
      2 inet_addr("142.251.152.120")
      1 inet_addr("173.194.41.100")
      1 inet_addr("172.66.147.243")
      1 inet_addr("127.0.0.1")
      1 inet_addr("104.20.23.154")
  • The container's resolvers were 153.92.2.6 (the host provider's resolver), 1.1.1.1 and 8.8.4.4.
  • strace in runs 2 and 3 also showed AF_INET connects to addresses we believe are Google- and Cloudflare-operated, and to the configured resolvers. Our run 3 port pairing was unreliable (grep/paste misaligned the fields), so we do not state ports.
  • agent-browser --version made no internet connections (0 AF_INET connects).
  • By design, agent-browser doctor contacts the Chrome for Testing CDN and agent-browser install downloads from storage.googleapis.com.

INTERPRETATION

Our interpretation, not proof

example.com is the page we requested. The other names look like Chrome's own traffic: dns.google and chrome.cloudflare-dns.com look like Chrome's DNS-over-HTTPS upgrade probes for the 8.8.4.4 and 1.1.1.1 resolvers configured in the container; clients2.google.com is a Chrome update and component host; www.google.com, play.google.com, ogads-pa.clients6.google.com, www.gstatic.com and chromereleases.googleblog.com look like a Google page or "what's new" content loaded by Chrome for Testing. They appeared even though agent-browser passes --disable-background-networking and --disable-component-update.

What we cannot say: we did not attribute each connection to a process (strace's pid-to-command mapping was not captured), so we cannot say whether the agent-browser binary itself contacted Google. We did not capture payloads, which were TLS-encrypted. In the upstream source, a search for telemetry, posthog, sentry and analytics only matched network-recording filters in cli/src/native/flow/, not an analytics SDK.

If outbound traffic matters to you, put agent-browser behind an egress firewall or a container network policy. Its --allowed-domains option filters what pages load, but the upstream security docs say "The domain allowlist is not an operating-system firewall." We did not test --allowed-domains.

DATA AT REST · UPSTREAM DOCS

Credentials and data at rest

This section is from the upstream docs (security.mdx and sessions.mdx at commit 4720bc3). We did not test the auth vault, state files or attach modes.

  • Auth vault: profiles live in ~/.agent-browser/auth/ and are always encrypted with AES-256-GCM. If AGENT_BROWSER_ENCRYPTION_KEY is not set, a key is auto-generated at ~/.agent-browser/.encryption-key on first use, so the key sits in the same directory as the data it protects. Our doctor run showed info No encryption key set (will be auto-generated on first auth save).
  • state save files: sessions.mdx says "State files contain session tokens in plaintext." Its fix for encryption at rest is AGENT_BROWSER_ENCRYPTION_KEY.
  • --restore sessions are stored in ~/.agent-browser/sessions/ and auto-expire after 30 days by default (AGENT_BROWSER_STATE_EXPIRE_DAYS).
  • --auto-connect and --cdp attach to a real Chrome over remote debugging. sessions.mdx warns: "--remote-debugging-port exposes full browser control on localhost. Any local process can connect."
  • For passwords, the docs use --password-stdin (echo "pass" | agent-browser auth save github --url https://github.com/login --username user --password-stdin) rather than a password on the command line.
HARDENING

How to limit the risk

A checklist built from what we saw and from the upstream security docs. Items marked as upstream we did not test.

  1. If you run agent-browser as root, do it in a container or VM you can throw away. As root, in a container, or when the CI environment variable is set, it turns Chrome's sandbox off (--no-sandbox). Some agent harnesses and dev shells set CI.
  2. Put an egress firewall or container network policy around it if outbound traffic matters. In our run, Chrome looked up several Google hosts during one page open.
  3. Use --allowed-domains to keep the agent on the sites it needs, but it is not an operating-system firewall (upstream security docs). Upstream also rejects it with --cdp, --auto-connect, --profile, --restore and state files. We did not test it.
  4. Use --action-policy with a policy that denies eval, download and upload (upstream example: {"default": "allow", "deny": ["eval", "download", "upload"]}), or --confirm-actions for those categories.
  5. Use --content-boundaries so your orchestrator can tell page text from tool output (prompt injection), and --max-output to cap page content (upstream).
  6. Set AGENT_BROWSER_ENCRYPTION_KEY yourself (doctor suggests export AGENT_BROWSER_ENCRYPTION_KEY=$(openssl rand -hex 32)) and store it outside ~/.agent-browser, so the key is not auto-generated next to the auth vault and saved state files are encrypted.
  7. Use --password-stdin for auth save, not a password in the command line.
  8. Don't --auto-connect your daily Chrome. It hands your logged-in browser to the agent, and upstream warns that any local process can connect to the remote debugging port.
  9. Use Node 22 or later and pin the version (npm install -g agent-browser@0.43.0) if you want to match this audit.
CLEANUP

Uninstall: npm uninstall leaves Chrome behind

  • npm uninstall -g agent-browser printed removed 2 packages, and the command was gone (which exited 1).
  • It left /root/.agent-browser behind at 408M: the downloaded Chrome and default.target. If you used them, the auth vault, the auto-generated .encryption-key and saved sessions live there too (upstream paths).
  • Remove it by hand with rm -r ~/.agent-browser. In run 3 the directory was gone afterwards.
  • The apt packages from --with-deps also remain. We did not remove them.
  • We only checked ~/.agent-browser. Run 2's ps showed Chrome's crashpad handler using a database under /root/.config, which we did not inspect.
Run 3 uninstall and cleanup, verbatim
$ npm uninstall -g agent-browser
removed 2 packages in 770ms
$ du -sh /root/.agent-browser
408M	/root/.agent-browser
$ rm -r /root/.agent-browser
$ ls /root/.agent-browser
ls: cannot access '/root/.agent-browser': No such file or directory
LIMITS

Not tested

This audit covers three global npm installs on Ubuntu 24.04 (x86_64), as root in Docker. We did not test:

  • macOS and Windows installs, including the macOS Gatekeeper report (#1729).
  • Homebrew, Cargo and building from source.
  • pnpm, Bun and Yarn installs, npx agent-browser, and project (non-global) installs, including the symlink report (#2214).
  • The postinstall GitHub download fallback (for example with --omit=optional).
  • agent-browser upgrade and doctor --fix (and doctor --offline).
  • Running as a non-root desktop user, so we did not see whether Chrome keeps its sandbox there.
  • Node 18 beyond --version and --help: no open or snapshot, and not the Node launcher path.
  • The auth vault, state save and restore, --profile, --cdp and --auto-connect.
  • Cloud providers, plugins, MCP mode, recording and --executable-path.
  • --allowed-domains, --action-policy, --confirm-actions and --content-boundaries.
  • The daemon's 1-hour idle timeout.
  • Whether other local users or processes can reach the random CDP port.
  • Files Chrome writes outside ~/.agent-browser (e.g. the crashpad database under ~/.config, /tmp/agent-browser-chrome-* profiles) and whether they are removed.
  • Linux ARM64 (upstream install.rs: agent-browser install exits there with Chrome for Testing does not provide Linux ARM64 builds; use a system Chromium with --executable-path).
  • dnf and yum (non-apt) distributions for --with-deps.
  • Checksum verification of the Chrome for Testing zip: we neither checked one nor determined whether install.rs does.
  • The payload contents of outbound connections (TLS), and which process made each connection.
SOURCES

Sources

FAQ

Frequently asked questions

Is agent-browser safe to install?

In our Ubuntu 24.04 containers, npm install -g agent-browser (0.43.0) downloaded only from registry.npmjs.org, took its native binary from a per-platform optional package, and wrote nothing outside the package except npm's own update-check file, with no daemon or shell profile edits at install time. We rate the install risk medium because of the next step: agent-browser install downloads 194 MB of Chrome for Testing, --with-deps runs the system package manager (apt-get as root in our runs), and at runtime Chrome runs with --no-sandbox when you are root, in a container, or when the CI environment variable is set.

Where does agent-browser install Chrome?

In ~/.agent-browser/browsers/. In our run, agent-browser install downloaded Chrome for Testing 157.0.8103.78 for linux64 (a 194 MB zip from storage.googleapis.com) into /root/.agent-browser/browsers/chrome-157.0.8103.78, and ~/.agent-browser was 408M afterwards. npm install itself does not download Chrome; postinstall only prints a reminder.

How do I fix "error while loading shared libraries: libglib-2.0.so.0" when running agent-browser?

Run agent-browser install --with-deps. On a fresh Ubuntu 24.04, Chrome for Testing is missing system libraries, so agent-browser open failed with Chrome exited early (exit code: 127) and the libglib-2.0.so.0 message. --with-deps installs them with the detected package manager (apt-get, dnf or yum per upstream install.rs); in our Ubuntu 24.04 container it ran apt-get update and apt-get install for 36 browser libraries and fonts. It needs root or sudo. After it, agent-browser open https://example.com worked (exit 0) in our container.

Does agent-browser work with Node 18?

It declares engines node >=22.0.0. On Ubuntu 24.04's apt Node v18.19.1, npm install printed npm WARN EBADENGINE but succeeded, and agent-browser --version and --help both exited 0, because postinstall links the global command straight to the native binary. We did not test opening pages on Node 18 or the Node launcher path there. Use Node 22 or later to match the declared engine.

Does npm uninstall remove the downloaded Chrome?

No. npm uninstall -g agent-browser removed 2 packages and the command, but /root/.agent-browser stayed at 408M, holding the downloaded Chrome and default.target. Remove it with rm -r ~/.agent-browser. The system libraries installed by --with-deps also stay. We only checked ~/.agent-browser, not files Chrome may write elsewhere (such as its crashpad database under ~/.config).

Why does agent-browser run Chrome with --no-sandbox?

Because it detected an environment that, per its source comment, doesn't support Chrome's sandbox. In upstream cli/src/native/cdp/chrome.rs, should_disable_sandbox() returns true when CI is set, when you run as root, or when it detects a Docker, Podman or other container. Our runs were root in Docker, so Chrome ran with --no-sandbox. That removes a layer of protection against malicious pages, so keep untrusted browsing in a disposable container or VM. We did not test as a normal desktop user.