官方文档: https://github.com/vercel-labs/agent-browser/blob/main/README.md
This example demonstrates how to install agent-browser CLI tool.
# Install agent-browser globally
npm install -g agent-browser
# Install browser binaries
agent-browser install
# Clone the repository
git clone https://github.com/vercel-labs/agent-browser.git
cd agent-browser
# Install dependencies
pnpm install
# Build the project
pnpm build
# For native builds
pnpm build:native
# Link globally (optional)
pnpm link --global
# Install with system dependencies (recommended)
agent-browser install --with-deps
# Or manually install Playwright dependencies
# Ubuntu/Debian
sudo apt-get install -y \
libnss3 \
libnspr4 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libdbus-1-3 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libasound2
# Fedora
sudo dnf install -y \
nss \
nspr \
atk \
at-spi2-atk \
cups-libs \
libdrm \
dbus \
libxkbcommon \
libXcomposite \
libXdamage \
libXfixes \
libXrandr \
mesa-libgbm \
alsa-lib
# Set custom browser executable path
export AGENT_BROWSER_EXECUTABLE_PATH=/path/to/chromium
# Or use --executable-path flag
agent-browser open example.com --executable-path /path/to/chromium
# Check version
agent-browser --version
# Test basic command
agent-browser open example.com
npm install -g agent-browseragent-browser install to download browser binaries--version flag