Configuration

Create an agent-browser.json file to set persistent defaults instead of repeating flags on every command.

Config file locations

PriorityLocationScope
1 (lowest)~/.agent-browser/config.jsonUser-level defaults
2./agent-browser.jsonProject-level overrides
3AGENT_BROWSER_* env varsOverride config values
4 (highest)CLI flagsOverride everything

Example config

agent-browser.json
{
  "$schema": "https://agentbrowser.dev/schema.json",
  "headed": true,
  "proxy": "http://localhost:8080",
  "profile": "./browser-data",
  "userAgent": "my-agent/1.0",
  "hideScrollbars": false,
  "ignoreHttpsErrors": true
}

All options

Config KeyCLI FlagTypeDefault
headed--headedbooleanfalse
headless--headlessbooleantrue
proxy--proxy <url>string-
profile--profile <path>string-
userAgent--user-agent <ua>stringChrome default
hideScrollbars--hide-scrollbarsbooleantrue
ignoreHttpsErrors--ignore-https-errorsbooleanfalse
timeout--timeout <ms>number30000
viewport--viewport <WxH>string1280x720
slowMo--slow-mo <ms>number0

Environment variables

Each config key maps to an AGENT_BROWSER_* environment variable using SCREAMING_SNAKE_CASE:

.env or shell
AGENT_BROWSER_HEADED=true
AGENT_BROWSER_PROXY=http://localhost:8080
AGENT_BROWSER_PROFILE=./browser-data
AGENT_BROWSER_TIMEOUT=60000

Custom config path

agent-browser --config ./ci-config.json open example.com
AGENT_BROWSER_CONFIG=./ci-config.json agent-browser open example.com

Session-level config

Flags passed at session open time apply to that session only and override the config file:

agent-browser open --headed --viewport 1920x1080 https://example.com
agent-browser open --proxy http://myproxy:8080 https://example.com