agent-browser 0.23.4 → 0.24.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 +59 -3
- 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/skills/agent-browser/SKILL.md +31 -2
- package/skills/agentcore/SKILL.md +115 -0
package/README.md
CHANGED
|
@@ -374,6 +374,7 @@ agent-browser provides multiple ways to persist login sessions so you don't re-a
|
|
|
374
374
|
|
|
375
375
|
| Approach | Best for | Flag / Env |
|
|
376
376
|
|----------|----------|------------|
|
|
377
|
+
| **Chrome profile reuse** | Reuse your existing Chrome login state (cookies, sessions) with zero setup | `--profile <name>` / `AGENT_BROWSER_PROFILE` |
|
|
377
378
|
| **Persistent profile** | Full browser state (cookies, IndexedDB, service workers, cache) across restarts | `--profile <path>` / `AGENT_BROWSER_PROFILE` |
|
|
378
379
|
| **Session persistence** | Auto-save/restore cookies + localStorage by name | `--session-name <name>` / `AGENT_BROWSER_SESSION_NAME` |
|
|
379
380
|
| **Import from your browser** | Grab auth from a Chrome session you already logged into | `--auto-connect` + `state save` |
|
|
@@ -437,9 +438,31 @@ Each session has its own:
|
|
|
437
438
|
- Navigation history
|
|
438
439
|
- Authentication state
|
|
439
440
|
|
|
441
|
+
## Chrome Profile Reuse
|
|
442
|
+
|
|
443
|
+
The fastest way to use your existing login state: pass a Chrome profile name to `--profile`:
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
# List available Chrome profiles
|
|
447
|
+
agent-browser profiles
|
|
448
|
+
|
|
449
|
+
# Reuse your default Chrome profile's login state
|
|
450
|
+
agent-browser --profile Default open https://gmail.com
|
|
451
|
+
|
|
452
|
+
# Use a named profile (by display name or directory name)
|
|
453
|
+
agent-browser --profile "Work" open https://app.example.com
|
|
454
|
+
|
|
455
|
+
# Or via environment variable
|
|
456
|
+
AGENT_BROWSER_PROFILE=Default agent-browser open https://gmail.com
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
This copies your Chrome profile to a temp directory (read-only snapshot, no changes to your original profile), so the browser launches with your existing cookies and sessions.
|
|
460
|
+
|
|
461
|
+
> **Note:** On Windows, close Chrome before using `--profile <name>` if Chrome is running, as some profile files may be locked.
|
|
462
|
+
|
|
440
463
|
## Persistent Profiles
|
|
441
464
|
|
|
442
|
-
|
|
465
|
+
For a persistent custom profile directory that stores state across browser restarts, pass a path to `--profile`:
|
|
443
466
|
|
|
444
467
|
```bash
|
|
445
468
|
# Use a persistent profile directory
|
|
@@ -567,7 +590,7 @@ This is useful for multimodal AI models that can reason about visual layout, unl
|
|
|
567
590
|
|--------|-------------|
|
|
568
591
|
| `--session <name>` | Use isolated session (or `AGENT_BROWSER_SESSION` env) |
|
|
569
592
|
| `--session-name <name>` | Auto-save/restore session state (or `AGENT_BROWSER_SESSION_NAME` env) |
|
|
570
|
-
| `--profile <path>` |
|
|
593
|
+
| `--profile <name\|path>` | Chrome profile name or persistent directory path (or `AGENT_BROWSER_PROFILE` env) |
|
|
571
594
|
| `--state <path>` | Load storage state from JSON file (or `AGENT_BROWSER_STATE` env) |
|
|
572
595
|
| `--headers <json>` | Set HTTP headers scoped to the URL's origin |
|
|
573
596
|
| `--executable-path <path>` | Custom browser executable (or `AGENT_BROWSER_EXECUTABLE_PATH` env) |
|
|
@@ -626,7 +649,7 @@ The dashboard displays:
|
|
|
626
649
|
- **Live viewport** -- real-time JPEG frames from the browser
|
|
627
650
|
- **Activity feed** -- chronological command/result stream with timing and expandable details
|
|
628
651
|
- **Console output** -- browser console messages (log, warn, error)
|
|
629
|
-
- **Session creation** -- create new sessions from the UI with local engines (Chrome, Lightpanda) or cloud providers (Browserbase, Browserless, Browser Use, Kernel)
|
|
652
|
+
- **Session creation** -- create new sessions from the UI with local engines (Chrome, Lightpanda) or cloud providers (AgentCore, Browserbase, Browserless, Browser Use, Kernel)
|
|
630
653
|
|
|
631
654
|
## Configuration
|
|
632
655
|
|
|
@@ -1317,6 +1340,39 @@ When enabled, agent-browser connects to a Kernel cloud session instead of launch
|
|
|
1317
1340
|
|
|
1318
1341
|
Get your API key from the [Kernel Dashboard](https://dashboard.onkernel.com).
|
|
1319
1342
|
|
|
1343
|
+
### AgentCore
|
|
1344
|
+
|
|
1345
|
+
[AWS Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/) provides cloud browser sessions with SigV4 authentication.
|
|
1346
|
+
|
|
1347
|
+
To enable AgentCore, use the `-p` flag:
|
|
1348
|
+
|
|
1349
|
+
```bash
|
|
1350
|
+
agent-browser -p agentcore open https://example.com
|
|
1351
|
+
```
|
|
1352
|
+
|
|
1353
|
+
Or use environment variables for CI/scripts:
|
|
1354
|
+
|
|
1355
|
+
```bash
|
|
1356
|
+
export AGENT_BROWSER_PROVIDER=agentcore
|
|
1357
|
+
agent-browser open https://example.com
|
|
1358
|
+
```
|
|
1359
|
+
|
|
1360
|
+
Credentials are automatically resolved from environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`) or the AWS CLI (`aws configure export-credentials`), which supports SSO, profiles, and IAM roles.
|
|
1361
|
+
|
|
1362
|
+
Optional configuration via environment variables:
|
|
1363
|
+
|
|
1364
|
+
| Variable | Description | Default |
|
|
1365
|
+
| -------------------------- | -------------------------------------------------------------------- | ---------------- |
|
|
1366
|
+
| `AGENTCORE_REGION` | AWS region for the AgentCore endpoint | `us-east-1` |
|
|
1367
|
+
| `AGENTCORE_BROWSER_ID` | Browser identifier | `aws.browser.v1` |
|
|
1368
|
+
| `AGENTCORE_PROFILE_ID` | Browser profile for persistent state (cookies, localStorage) | (none) |
|
|
1369
|
+
| `AGENTCORE_SESSION_TIMEOUT`| Session timeout in seconds | `3600` |
|
|
1370
|
+
| `AWS_PROFILE` | AWS CLI profile for credential resolution | `default` |
|
|
1371
|
+
|
|
1372
|
+
**Browser profiles:** When `AGENTCORE_PROFILE_ID` is set, browser state (cookies, localStorage) is persisted across sessions automatically.
|
|
1373
|
+
|
|
1374
|
+
When enabled, agent-browser connects to an AgentCore cloud browser session instead of launching a local browser. All commands work identically.
|
|
1375
|
+
|
|
1320
1376
|
## License
|
|
1321
1377
|
|
|
1322
1378
|
Apache-2.0
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -61,7 +61,17 @@ agent-browser --state ./auth.json open https://app.example.com/dashboard
|
|
|
61
61
|
|
|
62
62
|
State files contain session tokens in plaintext -- add to `.gitignore` and delete when no longer needed. Set `AGENT_BROWSER_ENCRYPTION_KEY` for encryption at rest.
|
|
63
63
|
|
|
64
|
-
**Option 2:
|
|
64
|
+
**Option 2: Chrome profile reuse (zero setup)**
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# List available Chrome profiles
|
|
68
|
+
agent-browser profiles
|
|
69
|
+
|
|
70
|
+
# Reuse the user's existing Chrome login state
|
|
71
|
+
agent-browser --profile Default open https://gmail.com
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Option 3: Persistent profile (for recurring tasks)**
|
|
65
75
|
|
|
66
76
|
```bash
|
|
67
77
|
# First run: login manually or via automation
|
|
@@ -72,7 +82,7 @@ agent-browser --profile ~/.myapp open https://app.example.com/login
|
|
|
72
82
|
agent-browser --profile ~/.myapp open https://app.example.com/dashboard
|
|
73
83
|
```
|
|
74
84
|
|
|
75
|
-
**Option
|
|
85
|
+
**Option 4: Session name (auto-save/restore cookies + localStorage)**
|
|
76
86
|
|
|
77
87
|
```bash
|
|
78
88
|
agent-browser --session-name myapp open https://app.example.com/login
|
|
@@ -693,6 +703,25 @@ Priority (lowest to highest): `~/.agent-browser/config.json` < `./agent-browser.
|
|
|
693
703
|
| [references/profiling.md](references/profiling.md) | Chrome DevTools profiling for performance analysis |
|
|
694
704
|
| [references/proxy-support.md](references/proxy-support.md) | Proxy configuration, geo-testing, rotating proxies |
|
|
695
705
|
|
|
706
|
+
## Cloud Providers
|
|
707
|
+
|
|
708
|
+
Use `-p <provider>` (or `AGENT_BROWSER_PROVIDER`) to run against a cloud browser instead of launching a local Chrome instance. Supported providers: `agentcore`, `browserbase`, `browserless`, `browseruse`, `kernel`.
|
|
709
|
+
|
|
710
|
+
### AgentCore (AWS Bedrock)
|
|
711
|
+
|
|
712
|
+
```bash
|
|
713
|
+
# Credentials auto-resolved from env vars or AWS CLI (SSO, IAM roles, etc.)
|
|
714
|
+
agent-browser -p agentcore open https://example.com
|
|
715
|
+
|
|
716
|
+
# With persistent browser profile
|
|
717
|
+
AGENTCORE_PROFILE_ID=my-profile agent-browser -p agentcore open https://example.com
|
|
718
|
+
|
|
719
|
+
# With explicit region
|
|
720
|
+
AGENTCORE_REGION=eu-west-1 agent-browser -p agentcore open https://example.com
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
Set `AWS_PROFILE` to select a named AWS profile.
|
|
724
|
+
|
|
696
725
|
## Browser Engine Selection
|
|
697
726
|
|
|
698
727
|
Use `--engine` to choose a local browser engine. The default is `chrome`.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentcore
|
|
3
|
+
description: Run agent-browser on AWS Bedrock AgentCore cloud browsers. Use when the user wants to use AgentCore, run browser automation on AWS, use a cloud browser with AWS credentials, or needs a managed browser session backed by AWS infrastructure. Triggers include "use agentcore", "run on AWS", "cloud browser with AWS", "bedrock browser", "agentcore session", or any task requiring AWS-hosted browser automation.
|
|
4
|
+
allowed-tools: Bash(agent-browser:*), Bash(npx agent-browser:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AWS Bedrock AgentCore
|
|
8
|
+
|
|
9
|
+
Run agent-browser on cloud browser sessions hosted by AWS Bedrock AgentCore. All standard agent-browser commands work identically; the only difference is where the browser runs.
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
Credentials are resolved automatically:
|
|
14
|
+
|
|
15
|
+
1. Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, optionally `AWS_SESSION_TOKEN`)
|
|
16
|
+
2. AWS CLI fallback (`aws configure export-credentials`), which supports SSO, IAM roles, and named profiles
|
|
17
|
+
|
|
18
|
+
No additional setup is needed if the user already has working AWS credentials.
|
|
19
|
+
|
|
20
|
+
## Core Workflow
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Open a page on an AgentCore cloud browser
|
|
24
|
+
agent-browser -p agentcore open https://example.com
|
|
25
|
+
|
|
26
|
+
# Everything else is the same as local Chrome
|
|
27
|
+
agent-browser snapshot -i
|
|
28
|
+
agent-browser click @e1
|
|
29
|
+
agent-browser screenshot page.png
|
|
30
|
+
agent-browser close
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Environment Variables
|
|
34
|
+
|
|
35
|
+
| Variable | Description | Default |
|
|
36
|
+
|----------|-------------|---------|
|
|
37
|
+
| `AGENTCORE_REGION` | AWS region | `us-east-1` |
|
|
38
|
+
| `AGENTCORE_BROWSER_ID` | Browser identifier | `aws.browser.v1` |
|
|
39
|
+
| `AGENTCORE_PROFILE_ID` | Persistent browser profile (cookies, localStorage) | (none) |
|
|
40
|
+
| `AGENTCORE_SESSION_TIMEOUT` | Session timeout in seconds | `3600` |
|
|
41
|
+
| `AWS_PROFILE` | AWS CLI profile for credential resolution | `default` |
|
|
42
|
+
|
|
43
|
+
## Persistent Profiles
|
|
44
|
+
|
|
45
|
+
Use `AGENTCORE_PROFILE_ID` to persist browser state across sessions. This is useful for maintaining login sessions:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# First run: log in
|
|
49
|
+
AGENTCORE_PROFILE_ID=my-app agent-browser -p agentcore open https://app.example.com/login
|
|
50
|
+
agent-browser snapshot -i
|
|
51
|
+
agent-browser fill @e1 "user@example.com"
|
|
52
|
+
agent-browser fill @e2 "password"
|
|
53
|
+
agent-browser click @e3
|
|
54
|
+
agent-browser close
|
|
55
|
+
|
|
56
|
+
# Future runs: already authenticated
|
|
57
|
+
AGENTCORE_PROFILE_ID=my-app agent-browser -p agentcore open https://app.example.com/dashboard
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Live View
|
|
61
|
+
|
|
62
|
+
When a session starts, AgentCore prints a Live View URL to stderr. Open it in a browser to watch the session in real time from the AWS Console:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Session: abc123-def456
|
|
66
|
+
Live View: https://us-east-1.console.aws.amazon.com/bedrock-agentcore/browser/aws.browser.v1/session/abc123-def456#
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Region Selection
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Default: us-east-1
|
|
73
|
+
agent-browser -p agentcore open https://example.com
|
|
74
|
+
|
|
75
|
+
# Explicit region
|
|
76
|
+
AGENTCORE_REGION=eu-west-1 agent-browser -p agentcore open https://example.com
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Credential Patterns
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Explicit credentials (CI/CD, scripts)
|
|
83
|
+
export AWS_ACCESS_KEY_ID=AKIA...
|
|
84
|
+
export AWS_SECRET_ACCESS_KEY=...
|
|
85
|
+
agent-browser -p agentcore open https://example.com
|
|
86
|
+
|
|
87
|
+
# SSO (interactive)
|
|
88
|
+
aws sso login --profile my-profile
|
|
89
|
+
AWS_PROFILE=my-profile agent-browser -p agentcore open https://example.com
|
|
90
|
+
|
|
91
|
+
# IAM role / default credential chain
|
|
92
|
+
agent-browser -p agentcore open https://example.com
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Using with AGENT_BROWSER_PROVIDER
|
|
96
|
+
|
|
97
|
+
Set the provider via environment variable to avoid passing `-p agentcore` on every command:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
export AGENT_BROWSER_PROVIDER=agentcore
|
|
101
|
+
export AGENTCORE_REGION=us-east-2
|
|
102
|
+
|
|
103
|
+
agent-browser open https://example.com
|
|
104
|
+
agent-browser snapshot -i
|
|
105
|
+
agent-browser click @e1
|
|
106
|
+
agent-browser close
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Common Issues
|
|
110
|
+
|
|
111
|
+
**"Failed to run aws CLI"** means AWS CLI is not installed or not in PATH. Either install it or set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` directly.
|
|
112
|
+
|
|
113
|
+
**"AWS CLI failed: ... Run 'aws sso login'"** means SSO credentials have expired. Run `aws sso login` to refresh them.
|
|
114
|
+
|
|
115
|
+
**Session timeout:** The default is 3600 seconds (1 hour). For longer tasks, increase with `AGENTCORE_SESSION_TIMEOUT=7200`.
|