agent-browser 0.15.3 → 0.16.1

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 CHANGED
@@ -495,6 +495,7 @@ This is useful for multimodal AI models that can reason about visual layout, unl
495
495
  | `--action-policy <path>` | Path to action policy JSON file (or `AGENT_BROWSER_ACTION_POLICY` env) |
496
496
  | `--confirm-actions <list>` | Action categories requiring confirmation (or `AGENT_BROWSER_CONFIRM_ACTIONS` env) |
497
497
  | `--confirm-interactive` | Interactive confirmation prompts; auto-denies if stdin is not a TTY (or `AGENT_BROWSER_CONFIRM_INTERACTIVE` env) |
498
+ | `--native` | [Experimental] Use native Rust daemon instead of Node.js (or `AGENT_BROWSER_NATIVE` env) |
498
499
  | `--config <path>` | Use a custom config file (or `AGENT_BROWSER_CONFIG` env) |
499
500
  | `--debug` | Debug output |
500
501
 
@@ -910,12 +911,50 @@ await browser.stopScreencast();
910
911
  agent-browser uses a client-daemon architecture:
911
912
 
912
913
  1. **Rust CLI** (fast native binary) - Parses commands, communicates with daemon
913
- 2. **Node.js Daemon** - Manages Playwright browser instance
914
- 3. **Fallback** - If native binary unavailable, uses Node.js directly
914
+ 2. **Node.js Daemon** (default) - Manages Playwright browser instance
915
+ 3. **Native Daemon** (experimental, `--native`) - Pure Rust daemon using direct CDP, no Node.js required
916
+ 4. **Fallback** - If native binary unavailable, uses Node.js directly
915
917
 
916
918
  The daemon starts automatically on first command and persists between commands for fast subsequent operations.
917
919
 
918
- **Browser Engine:** Uses Chromium by default. The daemon also supports Firefox and WebKit via the Playwright protocol.
920
+ **Browser Engine:** Uses Chromium by default. The default Node.js daemon also supports Firefox and WebKit via Playwright. The experimental native daemon speaks Chrome DevTools Protocol (CDP) directly and supports Chromium-based browsers and Safari (via WebDriver).
921
+
922
+ ## Experimental: Native Mode
923
+
924
+ The native daemon is a pure Rust implementation that communicates with Chrome directly via CDP, eliminating the Node.js and Playwright dependencies. It is currently **experimental** and opt-in.
925
+
926
+ ### Enabling Native Mode
927
+
928
+ ```bash
929
+ # Via flag
930
+ agent-browser --native open example.com
931
+
932
+ # Via environment variable (recommended for persistent use)
933
+ export AGENT_BROWSER_NATIVE=1
934
+ agent-browser open example.com
935
+ ```
936
+
937
+ Or add to your config file (`agent-browser.json`):
938
+
939
+ ```json
940
+ {"native": true}
941
+ ```
942
+
943
+ ### What's Different
944
+
945
+ | | Default (Node.js) | Native (`--native`) |
946
+ |---|---|---|
947
+ | **Runtime** | Node.js + Playwright | Pure Rust binary |
948
+ | **Protocol** | Playwright protocol | Direct CDP / WebDriver |
949
+ | **Install size** | Larger (Node.js + npm deps) | Smaller (single binary) |
950
+ | **Browser support** | Chromium, Firefox, WebKit | Chromium, Safari (via WebDriver) |
951
+ | **Stability** | Stable | Experimental |
952
+
953
+ ### Known Limitations
954
+
955
+ - Firefox and WebKit are not yet supported (Chromium and Safari only)
956
+ - Some Playwright-specific features (tracing format, HAR export) are not available
957
+ - The native daemon and Node.js daemon share the same session socket, so you cannot run both simultaneously for the same session. Use `agent-browser close` before switching modes.
919
958
 
920
959
  ## Platforms
921
960
 
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-browser",
3
- "version": "0.15.3",
3
+ "version": "0.16.1",
4
4
  "description": "Headless browser automation CLI for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/daemon.js",
@@ -485,6 +485,21 @@ Priority (lowest to highest): `~/.agent-browser/config.json` < `./agent-browser.
485
485
  | [references/profiling.md](references/profiling.md) | Chrome DevTools profiling for performance analysis |
486
486
  | [references/proxy-support.md](references/proxy-support.md) | Proxy configuration, geo-testing, rotating proxies |
487
487
 
488
+ ## Experimental: Native Mode
489
+
490
+ agent-browser has an experimental native Rust daemon that communicates with Chrome directly via CDP, bypassing Node.js and Playwright entirely. It is opt-in and not recommended for production use yet.
491
+
492
+ ```bash
493
+ # Enable via flag
494
+ agent-browser --native open example.com
495
+
496
+ # Enable via environment variable (avoids passing --native every time)
497
+ export AGENT_BROWSER_NATIVE=1
498
+ agent-browser open example.com
499
+ ```
500
+
501
+ The native daemon supports Chromium and Safari (via WebDriver). Firefox and WebKit are not yet supported. All core commands (navigate, snapshot, click, fill, screenshot, cookies, storage, tabs, eval, etc.) work identically in native mode. Use `agent-browser close` before switching between native and default mode within the same session.
502
+
488
503
  ## Ready-to-Use Templates
489
504
 
490
505
  | Template | Description |