actionbook browser command lets AI agents automate any Chromium-based browser. Two modes are available depending on the use case:
Modes
| Mode | Flag | How It Works | Best For |
|---|---|---|---|
| Isolated | (default) | Launches a new Chrome with a fresh, dedicated profile | Automated tasks, CI/CD, headless, no user data needed |
| Extension | --extension | Connects to the user’s running Chrome via extension bridge | Tasks requiring existing login sessions, cookies, personal context |
Isolated Mode
Works out of the box — no setup required. The CLI launches a temporary Chrome process with a dedicated profile and connects via CDP.Extension Mode
Extension mode requires a one-time setup to connect the CLI to your running Chrome.Install the extension
~/.config/actionbook/extension/.Load into Chrome
- Open
chrome://extensionsin Chrome - Enable Developer mode (top-right toggle)
- Click Load unpacked
- Select the directory printed by:
Start the bridge server
The bridge is the WebSocket relay between CLI and Chrome:
serve runs in the foreground. Stop it with Ctrl+C, or use actionbook extension stop from another terminal.Pair the extension
Native Messaging usually handles pairing automatically. If not:
- Click the Actionbook extension icon in Chrome toolbar
- Copy the token (
abk_...) from theserveterminal output - Paste it into the popup and click Save
--extension to any browser command, or set the environment variable:
Browser Commands
All commands below work in both modes. Add--extension to route through the extension bridge.
Navigation
Page Interaction
Debug & Export
Cookie Operations
Tab Management
Recommended Workflow
Combine action manuals with browser automation for the best results:Shutdown
Isolated Mode
Extension Mode
Follow this cleanup order:Extension Security
Extension mode includes multiple security layers to protect your browser.Risk Levels
| Level | Description | Example Operations |
|---|---|---|
| L1 | Read-only, safe | eval, snapshot, screenshot |
| L2 | Page interaction | click, fill, select, navigation |
| L3 | Sensitive operations | Cookie writes on banking/payment sites |
Token Authentication
- Sessions are authenticated with a token (
abk_prefix) - Tokens expire after 30 minutes of idle time
- The bridge auto-rotates tokens; restart
serveif pairing is lost - Token comparison uses constant-time algorithms to prevent timing attacks
Network Isolation
- The bridge server only listens on
127.0.0.1(loopback) - No external network access is possible
- Origin validation enforces exact host matching
Troubleshooting
Ping failed / bridge not running
Ping failed / bridge not running
- Ensure
actionbook extension serveis running - Confirm the extension is loaded and enabled in
chrome://extensions - Check that no other process is using port 19222
- To restart:
actionbook extension stopthenactionbook extension serve
Token required / pairing_required
Token required / pairing_required
- Open the extension popup and paste the latest token from the
serveoutput - Tokens expire after 30 minutes of inactivity — restart the bridge
No tab attached
No tab attached
- Make sure Chrome has at least one visible, active tab
- Run
actionbook --extension browser open <url>first to attach a tab - Avoid
chrome://pages — the debugger cannot attach to them
L3 operation blocked
L3 operation blocked
- Sensitive operations (e.g., cookie writes on banking domains) require manual approval
- Check the extension popup for a pending confirmation dialog
Custom port not working
Custom port not working
- The extension defaults to
ws://localhost:19222 - Start the bridge with:
actionbook extension serve --port <PORT> - Pass to browser commands:
--extension-port <PORT>
GitHub rate limit on install
GitHub rate limit on install
- Anonymous GitHub API allows 60 requests/hour
- Wait and retry, or download the
.zipmanually from GitHub Releases
Offline install
Offline install
- Download
actionbook-extension-v*.zipfrom another machine - Unzip to
~/.config/actionbook/extension/ - Run
actionbook extension install --forceto register native messaging