@mercuryo-ai/agentbrowse-cli 0.1.7 → 0.1.9
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 +57 -30
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,59 +1,86 @@
|
|
|
1
1
|
# @mercuryo-ai/agentbrowse-cli
|
|
2
2
|
|
|
3
|
-
Browser
|
|
3
|
+
Browser automation CLI for AI agents.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
browser actions on visible page state. If the task includes protected login,
|
|
7
|
-
identity, or payment forms, pair it with `@mercuryo-ai/magicpay-cli` or use
|
|
8
|
-
`@mercuryo-ai/magicpay-agent-cli`.
|
|
5
|
+
AgentBrowse CLI is the operator-facing way to work with a real web page.
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
Use it when you need to:
|
|
11
8
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
9
|
+
- launch a browser or attach to an existing CDP session;
|
|
10
|
+
- inspect the current page and act on visible controls;
|
|
11
|
+
- navigate directly to a known URL;
|
|
12
|
+
- extract structured data from the page;
|
|
13
|
+
- capture screenshots or recover a stuck browser session.
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
AgentBrowse works well as a standalone browser tool. It can also sit next to
|
|
16
|
+
MagicPay when a broader flow later reaches a protected login, identity, or
|
|
17
|
+
payment step.
|
|
18
|
+
|
|
19
|
+
Open source:
|
|
20
|
+
|
|
21
|
+
- library and docs: `https://github.com/MercuryoAI/agentbrowse`
|
|
22
|
+
|
|
23
|
+
## Install
|
|
19
24
|
|
|
20
25
|
```bash
|
|
21
26
|
npm i -g @mercuryo-ai/agentbrowse-cli@latest
|
|
22
|
-
agentbrowse init <magicpay-api-key>
|
|
23
|
-
agentbrowse --version
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
`observe` and `extract`. After setup, start a fresh agent session if the new
|
|
28
|
-
CLI is not visible immediately.
|
|
29
|
+
## Core Loop
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
1. `agentbrowse launch [url]` or `agentbrowse attach <cdp-url>`
|
|
32
|
+
2. `agentbrowse observe`
|
|
33
|
+
3. `agentbrowse act <targetRef> <action> [value]`
|
|
34
|
+
4. repeat `observe` after meaningful page changes
|
|
35
|
+
5. `agentbrowse navigate <url>` if the destination is already known
|
|
36
|
+
6. `agentbrowse extract '<schema-json>' [scopeRef]` when you need structured
|
|
37
|
+
output
|
|
38
|
+
7. `agentbrowse screenshot` or `agentbrowse browser-status` for evidence and
|
|
39
|
+
debugging
|
|
40
|
+
8. `agentbrowse close` when you are done
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
## When You Need API Setup
|
|
43
|
+
|
|
44
|
+
Simple browser tasks work without API setup.
|
|
45
|
+
|
|
46
|
+
Goal-based `observe` and `extract` use the shared agent config. Set it up once
|
|
47
|
+
with:
|
|
33
48
|
|
|
34
49
|
```bash
|
|
35
|
-
agentbrowse
|
|
50
|
+
agentbrowse init <api-key>
|
|
36
51
|
```
|
|
37
52
|
|
|
38
|
-
|
|
53
|
+
You can also provide `MAGICPAY_API_KEY` in the environment. Use
|
|
54
|
+
`agentbrowse doctor` only if semantic commands still fail after `init` and you
|
|
55
|
+
want to inspect `~/.magicpay/config.json`.
|
|
56
|
+
|
|
57
|
+
## First Task
|
|
58
|
+
|
|
59
|
+
Start with a plain browser task:
|
|
39
60
|
|
|
40
61
|
```bash
|
|
41
62
|
agentbrowse launch "https://example.com"
|
|
42
|
-
agentbrowse observe
|
|
63
|
+
agentbrowse observe
|
|
43
64
|
```
|
|
44
65
|
|
|
45
|
-
|
|
46
|
-
|
|
66
|
+
If you want a focused or structured result:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
agentbrowse init <api-key>
|
|
70
|
+
agentbrowse observe "find the next visible action to continue"
|
|
71
|
+
agentbrowse extract '{"summary":"string"}'
|
|
72
|
+
```
|
|
47
73
|
|
|
48
74
|
## Command Groups
|
|
49
75
|
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
76
|
+
- Session setup: `launch`, `attach`, `navigate`
|
|
77
|
+
- Page work: `observe`, `act`, `extract`
|
|
78
|
+
- Diagnostics and cleanup: `screenshot`, `browser-status`, `close`
|
|
79
|
+
- Semantic runtime setup: `init`, `doctor`, `--version`
|
|
53
80
|
|
|
54
|
-
##
|
|
81
|
+
## Companion Tools
|
|
55
82
|
|
|
56
|
-
-
|
|
83
|
+
- If the page is already at a protected login, identity, or payment form:
|
|
57
84
|
use `@mercuryo-ai/magicpay-cli`
|
|
58
|
-
-
|
|
85
|
+
- If one CLI should cover both browser work and protected fills:
|
|
59
86
|
use `@mercuryo-ai/magicpay-agent-cli`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mercuryo-ai/agentbrowse-cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.9",
|
|
4
|
+
"description": "Browser automation CLI for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@browserbasehq/stagehand": "^3.0.0",
|
|
39
39
|
"dotenv": "^16.4.0",
|
|
40
|
-
"@mercuryo-ai/magicpay-home": "0.1.
|
|
41
|
-
"@mercuryo-ai/
|
|
42
|
-
"@mercuryo-ai/
|
|
40
|
+
"@mercuryo-ai/magicpay-home": "0.1.7",
|
|
41
|
+
"@mercuryo-ai/magicpay-sdk": "0.1.0-test.7",
|
|
42
|
+
"@mercuryo-ai/agentbrowse": "0.2.54"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^22.0.0",
|