agent-browser 0.31.2 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -5
- package/bin/agent-browser-darwin-arm64 +0 -0
- package/bin/agent-browser-darwin-x64 +0 -0
- package/bin/agent-browser-linux-arm64 +0 -0
- package/bin/agent-browser-linux-musl-arm64 +0 -0
- package/bin/agent-browser-linux-musl-x64 +0 -0
- package/bin/agent-browser-linux-x64 +0 -0
- package/bin/agent-browser-win32-x64.exe +0 -0
- package/package.json +1 -1
- package/scripts/check-version-sync.js +11 -0
- package/scripts/sync-version.js +14 -0
- package/skill-data/core/SKILL.md +7 -1
- package/skill-data/core/references/commands.md +2 -1
- package/skill-data/core/references/trust-boundaries.md +1 -0
package/README.md
CHANGED
|
@@ -517,7 +517,7 @@ Common tools include:
|
|
|
517
517
|
- `agent_browser_eval`
|
|
518
518
|
- `agent_browser_close`
|
|
519
519
|
|
|
520
|
-
Each tool has typed fields such as `url`, `selector`, `text`, `key`, and `
|
|
520
|
+
Each tool has typed fields such as `url`, `selector`, `text`, `key`, `session`, and `allowedDomains`, so MCP clients show meaningful approval prompts instead of raw command arrays. The common `allowedDomains` array maps to `--allowed-domains` and activates the same WebRTC containment and launch-mode restrictions. Each tool also accepts `extraArgs` for advanced CLI flags and exact CLI parity. Tool discovery is paginated and includes read-only/open-world annotations so modern MCP clients can load the large typed surface incrementally.
|
|
521
521
|
|
|
522
522
|
Example MCP client config:
|
|
523
523
|
|
|
@@ -720,7 +720,7 @@ agent-browser includes security features for safe AI agent deployments. All feat
|
|
|
720
720
|
- **Authentication Vault**: Store credentials locally (always encrypted), reference by name. The LLM never sees passwords. `auth login` navigates with `load` and then waits for login form selectors to appear (SPA-friendly, timeout follows the default action timeout). A key is auto-generated at `~/.agent-browser/.encryption-key` if `AGENT_BROWSER_ENCRYPTION_KEY` is not set: `echo "pass" | agent-browser auth save github --url https://github.com/login --username user --password-stdin` then `agent-browser auth login github`
|
|
721
721
|
- **Plugin System**: Extend agent-browser with external executable plugins. Plugins run out-of-process over the `agent-browser.plugin.v1` stdio JSON protocol and declare capabilities such as `credential.read`, `browser.provider`, `launch.mutate`, or `command.run`.
|
|
722
722
|
- **Content Boundary Markers**: Wrap page output in delimiters so LLMs can distinguish tool output from untrusted content: `--content-boundaries`
|
|
723
|
-
- **Domain Allowlist**: Restrict navigation to trusted domains (wildcards like `*.example.com` also match the bare domain): `--allowed-domains "example.com,*.example.com"`. Sub-resource requests (scripts, images, fetch)
|
|
723
|
+
- **Domain Allowlist**: Restrict navigation to trusted domains (wildcards like `*.example.com` also match the bare domain): `--allowed-domains "example.com,*.example.com"`. Sub-resource requests (scripts, images, fetch), WebSocket/EventSource connections, and `sendBeacon` calls to non-allowed domains are blocked. WebRTC peer connections are disabled in supported Chromium sessions while the allowlist is active to prevent STUN, TURN, and DNS traffic from bypassing HTTP interception. Dedicated and shared workers are guarded with a bootstrap wrapper; if a page CSP forbids that wrapper, the worker fails closed rather than running without the allowlist guard. Pre-existing CDP sessions, auto-connect, Chrome profiles, direct-page provider plugins, agent-browser restore or state-file replay, raw Chrome args that select profiles, restore sessions, or open startup pages, iOS, and Safari reject this option because agent-browser cannot install equivalent containment before page scripts run. Include any CDN domains your target pages depend on (e.g., `*.cdn.example.com`).
|
|
724
724
|
- **Action Policy**: Gate destructive actions with a static policy file: `--action-policy ./policy.json`
|
|
725
725
|
- **Action Confirmation**: Require explicit approval for sensitive action categories: `--confirm-actions eval,download`
|
|
726
726
|
- **Output Length Limits**: Prevent context flooding: `--max-output 50000`
|
|
@@ -729,7 +729,7 @@ agent-browser includes security features for safe AI agent deployments. All feat
|
|
|
729
729
|
| ----------------------------------- | ---------------------------------------- |
|
|
730
730
|
| `AGENT_BROWSER_CONTENT_BOUNDARIES` | Wrap page output in boundary markers |
|
|
731
731
|
| `AGENT_BROWSER_MAX_OUTPUT` | Max characters for page output |
|
|
732
|
-
| `AGENT_BROWSER_ALLOWED_DOMAINS` | Comma-separated allowed domain patterns
|
|
732
|
+
| `AGENT_BROWSER_ALLOWED_DOMAINS` | Comma-separated allowed domain patterns; requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins |
|
|
733
733
|
| `AGENT_BROWSER_ACTION_POLICY` | Path to action policy JSON file |
|
|
734
734
|
| `AGENT_BROWSER_CONFIRM_ACTIONS` | Action categories requiring confirmation |
|
|
735
735
|
| `AGENT_BROWSER_CONFIRM_INTERACTIVE` | Enable interactive confirmation prompts |
|
|
@@ -910,7 +910,7 @@ This is useful for multimodal AI models that can reason about visual layout, unl
|
|
|
910
910
|
| `--download-path <path>` | Default download directory (or `AGENT_BROWSER_DOWNLOAD_PATH` env) |
|
|
911
911
|
| `--content-boundaries` | Wrap page output in boundary markers for LLM safety (or `AGENT_BROWSER_CONTENT_BOUNDARIES` env) |
|
|
912
912
|
| `--max-output <chars>` | Truncate page output to N characters (or `AGENT_BROWSER_MAX_OUTPUT` env) |
|
|
913
|
-
| `--allowed-domains <list>` | Comma-separated allowed domain patterns (or `AGENT_BROWSER_ALLOWED_DOMAINS` env) |
|
|
913
|
+
| `--allowed-domains <list>` | Comma-separated allowed domain patterns; also disables WebRTC peer connections in supported Chromium sessions and rejects CDP, auto-connect, Chrome profiles, restore/state replay, direct-page provider plugins, unsafe startup `--args`, iOS, and Safari (or `AGENT_BROWSER_ALLOWED_DOMAINS` env) |
|
|
914
914
|
| `--action-policy <path>` | Path to action policy JSON file (or `AGENT_BROWSER_ACTION_POLICY` env) |
|
|
915
915
|
| `--confirm-actions <list>` | Action categories requiring confirmation (or `AGENT_BROWSER_CONFIRM_ACTIONS` env) |
|
|
916
916
|
| `--confirm-interactive` | Interactive confirmation prompts; auto-denies if stdin is not a TTY (or `AGENT_BROWSER_CONFIRM_INTERACTIVE` env) |
|
|
@@ -1254,10 +1254,23 @@ const result = await withAgentBrowserSandbox(async (sandbox) => {
|
|
|
1254
1254
|
});
|
|
1255
1255
|
```
|
|
1256
1256
|
|
|
1257
|
-
Install `@agent-browser/sandbox` and `@vercel/sandbox` in the consuming app. See the [sandbox helper example](examples/sandbox/) for minimal
|
|
1257
|
+
Install `@agent-browser/sandbox` and `@vercel/sandbox` in the consuming app. See the [sandbox helper example](examples/sandbox/) for minimal Vercel Sandbox usage, or the [environments example](examples/environments/) for a full UI demo with a deploy-to-Vercel button.
|
|
1258
1258
|
|
|
1259
1259
|
Fresh Vercel and Eve sandboxes install Chromium system dependencies by default. Pass `installSystemDependencies: false` only when your sandbox image already includes those libraries.
|
|
1260
1260
|
|
|
1261
|
+
### Eve extension
|
|
1262
|
+
|
|
1263
|
+
Give an [eve](https://eve.dev) agent the full browser tool set by mounting the [`@agent-browser/eve`](packages/@agent-browser/eve/) extension:
|
|
1264
|
+
|
|
1265
|
+
```typescript
|
|
1266
|
+
// agent/extensions/browser.ts
|
|
1267
|
+
import browser from "@agent-browser/eve";
|
|
1268
|
+
|
|
1269
|
+
export default browser({});
|
|
1270
|
+
```
|
|
1271
|
+
|
|
1272
|
+
This composes ~20 namespaced tools into the agent — `browser__navigate`, `browser__snapshot`, `browser__click`, `browser__fill`, `browser__find`, `browser__screenshot`, and more — all running agent-browser inside the agent's sandbox. agent-browser installs automatically on first use; pre-install it in `agent/sandbox.ts` with the `@agent-browser/eve/sandbox` helpers to bake the cost into the sandbox template instead. Configuration (domain allowlists, output limits, session naming) and per-tool overrides are covered in the [package README](packages/@agent-browser/eve/README.md), and the [eve example](examples/eve/) is a complete app with the extension mounted.
|
|
1273
|
+
|
|
1261
1274
|
### Serverless (AWS Lambda)
|
|
1262
1275
|
|
|
1263
1276
|
```typescript
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -44,6 +44,11 @@ if (!sandboxVersionMatch) {
|
|
|
44
44
|
|
|
45
45
|
const sandboxRuntimeVersion = sandboxVersionMatch[1];
|
|
46
46
|
|
|
47
|
+
// Read Eve package version
|
|
48
|
+
const evePkg = JSON.parse(readFileSync(join(rootDir, 'packages/@agent-browser/eve/package.json'), 'utf-8'));
|
|
49
|
+
const eveVersion = evePkg.version;
|
|
50
|
+
const eveSandboxDependency = evePkg.dependencies?.['@agent-browser/sandbox'];
|
|
51
|
+
|
|
47
52
|
const mismatches = [];
|
|
48
53
|
if (packageVersion !== cargoVersion) {
|
|
49
54
|
mismatches.push(` cli/Cargo.toml: ${cargoVersion}`);
|
|
@@ -57,6 +62,12 @@ if (packageVersion !== sandboxVersion) {
|
|
|
57
62
|
if (packageVersion !== sandboxRuntimeVersion) {
|
|
58
63
|
mismatches.push(` packages/@agent-browser/sandbox/src/version.ts: ${sandboxRuntimeVersion}`);
|
|
59
64
|
}
|
|
65
|
+
if (packageVersion !== eveVersion) {
|
|
66
|
+
mismatches.push(` packages/@agent-browser/eve/package.json: ${eveVersion}`);
|
|
67
|
+
}
|
|
68
|
+
if (eveSandboxDependency !== 'workspace:^') {
|
|
69
|
+
mismatches.push(` packages/@agent-browser/eve dependency @agent-browser/sandbox: ${eveSandboxDependency}`);
|
|
70
|
+
}
|
|
60
71
|
|
|
61
72
|
if (mismatches.length > 0) {
|
|
62
73
|
console.error('Version mismatch detected!');
|
package/scripts/sync-version.js
CHANGED
|
@@ -68,6 +68,20 @@ if (sandboxPkg.version !== version) {
|
|
|
68
68
|
console.log(` packages/@agent-browser/sandbox/package.json already up to date`);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
// Update packages/@agent-browser/eve/package.json (version + workspace sandbox dependency)
|
|
72
|
+
const evePkgPath = join(rootDir, "packages", "@agent-browser", "eve", "package.json");
|
|
73
|
+
const evePkg = JSON.parse(readFileSync(evePkgPath, "utf-8"));
|
|
74
|
+
const eveSandboxDependency = "workspace:^";
|
|
75
|
+
if (evePkg.version !== version || evePkg.dependencies["@agent-browser/sandbox"] !== eveSandboxDependency) {
|
|
76
|
+
const oldVersion = evePkg.version;
|
|
77
|
+
evePkg.version = version;
|
|
78
|
+
evePkg.dependencies["@agent-browser/sandbox"] = eveSandboxDependency;
|
|
79
|
+
writeFileSync(evePkgPath, JSON.stringify(evePkg, null, 2) + "\n");
|
|
80
|
+
console.log(` Updated packages/@agent-browser/eve/package.json: ${oldVersion} -> ${version}`);
|
|
81
|
+
} else {
|
|
82
|
+
console.log(` packages/@agent-browser/eve/package.json already up to date`);
|
|
83
|
+
}
|
|
84
|
+
|
|
71
85
|
// Update package runtime version constant
|
|
72
86
|
const sandboxVersionPath = join(
|
|
73
87
|
rootDir,
|
package/skill-data/core/SKILL.md
CHANGED
|
@@ -58,7 +58,11 @@ agent-browser mcp --tools all
|
|
|
58
58
|
agent-browser mcp --tools core,network,react
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Configure the MCP client to launch `agent-browser` with `["mcp"]`. The server defaults to MCP protocol 2025-11-25 and accepts older supported client protocol versions during initialization. The default tools profile is `core`, which keeps MCP context small for everyday browser automation. Use `--tools all` for the full typed CLI parity surface, or combine profiles with commas, such as `--tools core,network,react`. Profiles are `core`, `network`, `state`, `debug`, `tabs`, `react`, `mobile`, and `all`; the `debug` profile includes plugin registry and command.run tools. Each tool accepts typed arguments plus `extraArgs` for advanced CLI flags and exact CLI parity. Tool discovery is paginated and includes read-only/open-world annotations so modern MCP clients can load the large typed surface incrementally. Use the tool `session` argument or `AGENT_BROWSER_SESSION` to isolate browser sessions.
|
|
61
|
+
Configure the MCP client to launch `agent-browser` with `["mcp"]`. The server defaults to MCP protocol 2025-11-25 and accepts older supported client protocol versions during initialization. The default tools profile is `core`, which keeps MCP context small for everyday browser automation. Use `--tools all` for the full typed CLI parity surface, or combine profiles with commas, such as `--tools core,network,react`. Profiles are `core`, `network`, `state`, `debug`, `tabs`, `react`, `mobile`, and `all`; the `debug` profile includes plugin registry and command.run tools. Each tool accepts typed arguments plus `extraArgs` for advanced CLI flags and exact CLI parity. The common `allowedDomains` array maps to `--allowed-domains` and activates the same WebRTC containment and launch-mode restrictions. Tool discovery is paginated and includes read-only/open-world annotations so modern MCP clients can load the large typed surface incrementally. Use the tool `session` argument or `AGENT_BROWSER_SESSION` to isolate browser sessions.
|
|
62
|
+
|
|
63
|
+
## Eve agent integration
|
|
64
|
+
|
|
65
|
+
For Eve agents, mount the `@agent-browser/eve` extension instead of hand-writing browser tools. It adds namespaced tools such as `browser__navigate`, `browser__snapshot`, `browser__click`, `browser__fill`, `browser__find`, and `browser__screenshot`, all backed by agent-browser running inside the Eve sandbox. The sandbox bootstrap helpers (`installAgentBrowser`, `agentBrowserRevalidationKey`) ship with the same package under `@agent-browser/eve/sandbox`, so `agent/sandbox.ts` needs no extra dependency.
|
|
62
66
|
|
|
63
67
|
## Reading a page
|
|
64
68
|
|
|
@@ -105,6 +109,8 @@ agent-browser get count ".item" # count matching elements
|
|
|
105
109
|
|
|
106
110
|
Use `read [url]` when you need to consume documentation or other text pages rather than interact with a rendered UI. Omit the URL to read the rendered DOM of the active tab in the current browser session, including browser auth state and client-side updates. Explicit URL reads send `Accept: text/markdown`, try the same URL with `.md` appended when the first response is not markdown, walk ancestor paths toward `/` to find the nearest `llms.txt` for a matching docs link, print markdown/plain text when available, and fall back to readable text extracted from HTML without launching Chrome. Add `--filter <text>` to narrow a page to matching heading sections, `--outline` for compact headings on one page, `--llms index` for a compact nearest-ancestor `llms.txt` link list, and `--llms full` only when you explicitly need `llms-full.txt`. With `--llms` or `--require-md`, omitting the URL uses the active tab URL because those modes depend on HTTP resources. With `--llms` or `--outline`, `--filter <text>` narrows links, sections, or headings. Add `--require-md` when you specifically want to verify markdown negotiation, `--raw` when you need the response body unchanged, and `--json` when you need metadata such as `source` and `contentType`. Global safeguards such as `--allowed-domains`, `--content-boundaries`, and `--max-output` also apply to read fetches and output.
|
|
107
111
|
|
|
112
|
+
For sessions that handle sensitive data, use `--allowed-domains` to restrict navigations and page-initiated network traffic. Supported Chromium sessions also disable `RTCPeerConnection` while the allowlist is active so WebRTC STUN, TURN, and related DNS traffic cannot bypass the HTTP filter. Dedicated and shared workers are guarded with a bootstrap wrapper; if a page CSP forbids that wrapper, the worker fails closed rather than running without the allowlist guard. Pre-existing CDP sessions, auto-connect, Chrome profiles, direct-page provider plugins, agent-browser restore or state-file replay, raw Chrome args that select profiles, restore sessions, or open startup pages, iOS, and Safari reject this option because agent-browser cannot install equivalent containment before page scripts run. This is browser-level containment, not an operating-system firewall; see [Trust boundaries](references/trust-boundaries.md) for deployment guidance.
|
|
113
|
+
|
|
108
114
|
## Interacting
|
|
109
115
|
|
|
110
116
|
```bash
|
|
@@ -358,7 +358,7 @@ Common tools include:
|
|
|
358
358
|
- `agent_browser_eval`
|
|
359
359
|
- `agent_browser_close`
|
|
360
360
|
|
|
361
|
-
Tool calls use the same config files and environment variables as the CLI. Each tool accepts typed arguments plus `extraArgs` for advanced CLI flags and exact CLI parity. Tool discovery is paginated and includes read-only/open-world annotations so modern MCP clients can load the large typed surface incrementally. Use the `session` tool argument or `AGENT_BROWSER_SESSION` to isolate browser state.
|
|
361
|
+
Tool calls use the same config files and environment variables as the CLI. Each tool accepts typed arguments plus `extraArgs` for advanced CLI flags and exact CLI parity. The common `allowedDomains` array maps to `--allowed-domains` and activates the same WebRTC containment and launch-mode restrictions. Tool discovery is paginated and includes read-only/open-world annotations so modern MCP clients can load the large typed surface incrementally. Use the `session` tool argument or `AGENT_BROWSER_SESSION` to isolate browser state.
|
|
362
362
|
|
|
363
363
|
## Global Options
|
|
364
364
|
|
|
@@ -456,5 +456,6 @@ AGENT_BROWSER_PROVIDER="browserbase" # Browser provider or configured pr
|
|
|
456
456
|
AGENT_BROWSER_STREAM_PORT="9223" # Override WebSocket streaming port (default: OS-assigned)
|
|
457
457
|
AGENT_BROWSER_CONFIG="./agent-browser.json" # Custom config file
|
|
458
458
|
AGENT_BROWSER_CDP="9222" # Connect daemon to CDP port or WebSocket URL
|
|
459
|
+
AGENT_BROWSER_ALLOWED_DOMAINS="example.com" # Restrict network domains; requires a fresh controllable browser context without profile/session startup args, restore/state replay, or direct-page provider plugins
|
|
459
460
|
AGENT_BROWSER_PLUGINS='[{"name":"vault","command":"agent-browser-plugin-vault","capabilities":["credential.read"]},{"name":"stealth","command":"agent-browser-plugin-stealth","capabilities":["launch.mutate"]}]'
|
|
460
461
|
```
|
|
@@ -45,6 +45,7 @@ The hook in particular exposes `window.__REACT_DEVTOOLS_GLOBAL_HOOK__` to every
|
|
|
45
45
|
|
|
46
46
|
## Network interception and automation artifacts
|
|
47
47
|
|
|
48
|
+
- `--allowed-domains` blocks non-allowlisted HTTP traffic, WebSocket and EventSource connections, and `sendBeacon` calls. It also disables `RTCPeerConnection` for supported Chromium sessions because STUN, TURN, and related DNS traffic do not pass through CDP HTTP interception. Dedicated and shared workers are guarded with a bootstrap wrapper; if a page CSP forbids that wrapper, the worker fails closed rather than running without the allowlist guard. Locally launched Chrome additionally disables non-proxied WebRTC UDP. Pre-existing CDP sessions, auto-connect, Chrome profiles, direct-page provider plugins, agent-browser restore or state-file replay, raw Chrome args that select profiles, restore sessions, or open startup pages, iOS, and Safari reject this option because agent-browser cannot install equivalent containment before page scripts run. Treat this as browser-level containment and combine it with host or container egress controls when you need an operating-system security boundary.
|
|
48
49
|
- `network route` can fail or mock requests. Treat it the way you treat production traffic manipulation — confirm with the user before using it against anything other than a dev server.
|
|
49
50
|
- `har start` / `har stop` records every request and response body to disk, including auth headers and bearer tokens. Don't share HAR files without redaction.
|
|
50
51
|
- Screenshots and videos can accidentally capture secrets (auto-filled form fields, visible tokens in URL bars, etc.). Review before sending.
|