kdpa-agent-box 0.0.0-stage β 1.0.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/Containerfile +34 -0
- package/LICENSE +21 -0
- package/README.md +366 -2
- package/agent-box +473 -0
- package/agent-box-door.plist +19 -0
- package/box-door.py +77 -0
- package/box-quit-browser +13 -0
- package/box-vault +70 -0
- package/chromium-seccomp.json +1235 -0
- package/desktop/agent-box-passwords.desktop +7 -0
- package/desktop/keepassxc.ini +22 -0
- package/desktop/tint2rc +41 -0
- package/entrypoint.sh +71 -0
- package/package.json +70 -4
- package/skills/agent-box/SKILL.md +59 -0
package/Containerfile
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Agent box: one shared Linux desktop with Chromium for AI agents.
|
|
2
|
+
# Same recipe as Anthropic's computer-use demo and E2B's desktop template:
|
|
3
|
+
# virtual screen (Xvfb) + light window manager + VNC with a web viewer (noVNC)
|
|
4
|
+
# + browser + xdotool. Chromium also exposes CDP so agents can use Playwright.
|
|
5
|
+
FROM docker.io/library/debian:trixie-slim
|
|
6
|
+
LABEL agent-box=true org.opencontainers.image.source=https://github.com/kdpa-llc/agent-box
|
|
7
|
+
|
|
8
|
+
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8
|
|
9
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
10
|
+
xvfb x11vnc novnc python3-websockify openbox tint2 keepassxc-minimal \
|
|
11
|
+
chromium xdotool scrot socat iproute2 procps ca-certificates python3-websocket \
|
|
12
|
+
fonts-liberation fonts-dejavu-core fonts-noto-color-emoji xterm \
|
|
13
|
+
&& rm -rf /var/lib/apt/lists/* /usr/share/doc/* /usr/share/man/*
|
|
14
|
+
|
|
15
|
+
# Open the viewer, connect, and scale the screen to the phone or browser window.
|
|
16
|
+
RUN printf '<meta http-equiv="refresh" content="0; url=vnc.html?autoconnect=true&resize=scale&reconnect=true&show_dot=true">\n' \
|
|
17
|
+
> /usr/share/novnc/index.html
|
|
18
|
+
|
|
19
|
+
# Passwords live in one place (the box's KeePassXC vault), not in Chromium's own store.
|
|
20
|
+
RUN mkdir -p /etc/chromium/policies/managed \
|
|
21
|
+
&& printf '{"PasswordManagerEnabled": false}\n' > /etc/chromium/policies/managed/agent-box.json
|
|
22
|
+
|
|
23
|
+
RUN useradd -m -u 1000 -s /bin/bash agent && mkdir -p /data && chown agent:agent /data
|
|
24
|
+
COPY entrypoint.sh box-quit-browser box-vault /usr/local/bin/
|
|
25
|
+
RUN chmod 755 /usr/local/bin/entrypoint.sh /usr/local/bin/box-quit-browser /usr/local/bin/box-vault
|
|
26
|
+
# Taskbar with a "Passwords" button, and KeePassXC settings (no tray, no update
|
|
27
|
+
# checks, never locks by itself, saves after every change).
|
|
28
|
+
COPY desktop/tint2rc /etc/xdg/tint2/agent-box.tint2rc
|
|
29
|
+
COPY desktop/agent-box-passwords.desktop /usr/share/applications/
|
|
30
|
+
COPY desktop/keepassxc.ini /etc/agent-box/keepassxc.ini
|
|
31
|
+
|
|
32
|
+
WORKDIR /home/agent
|
|
33
|
+
EXPOSE 6080 9223
|
|
34
|
+
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kdpa-llc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,367 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# π₯οΈ Agent Box
|
|
4
|
+
|
|
5
|
+
### A computer for your AI agents. You watch, and take over from your phone.
|
|
6
|
+
|
|
7
|
+
Give Claude Code, Codex and other coding agents their own Linux desktop with a real Chromium, saved logins and a password vault. Agents drive the browser with Playwright; you watch in any browser and take over whenever a step needs a person. It runs on your Mac or Linux machine, and only while it's used.
|
|
8
|
+
|
|
9
|
+
[![npm version][npm-version-badge]][npm-package]
|
|
10
|
+
[![npm downloads][npm-downloads-badge]][npm-package]
|
|
11
|
+
[![Node.js 18+][node-badge]][nodejs]
|
|
12
|
+
[![CI][ci-badge]][ci-workflow]
|
|
13
|
+
[![CodeQL][codeql-badge]][codeql-workflow]
|
|
14
|
+
[![License: MIT][license-badge]][license-file]
|
|
15
|
+
[![Platform: macOS | Linux][platform-badge]](#-choose-a-container-tool)
|
|
16
|
+
[![Agent Skills][skills-badge]][agent-skills]
|
|
17
|
+
|
|
18
|
+
[![GitHub Stars][stars-badge]][stargazers]
|
|
19
|
+
[![GitHub Issues][issues-badge]][repo-issues]
|
|
20
|
+
[![GitHub Last Commit][commit-badge]][commits]
|
|
21
|
+
[![PRs Welcome][prs-badge]][contributing]
|
|
22
|
+
|
|
23
|
+
[π Quick start](#-quick-start) Β· [π§° Container tools](#-choose-a-container-tool) Β· [π Passwords](#-passwords) Β· [β¨οΈ Commands](#οΈ-cli-reference) Β· [π Support](#-support-the-project)
|
|
24
|
+
|
|
25
|
+
<img src="https://raw.githubusercontent.com/kdpa-llc/agent-box/main/docs/desktop.png" alt="The agent box desktop: Chromium with a taskbar, as seen in the web viewer" width="720">
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
Coding agents are good at the web until a site wants a login, blocks headless browsers, or needs a person for a CAPTCHA. Agent Box gives them a browser that behaves like yours: it keeps cookies, shows a real screen, and lets you step in. It's the same recipe as Anthropic's computer-use demo and E2B's desktop sandbox, packaged as one command for the machine you already have.
|
|
30
|
+
|
|
31
|
+
- π₯οΈ **A real desktop**: Linux, Chromium and a taskbar, viewable in any browser.
|
|
32
|
+
- π€ **Driven with Playwright**: agents use `playwright-cli` over Chromium's remote-control port instead of clicking on pixels, with desktop screenshots and mouse and keyboard control when they need them.
|
|
33
|
+
- π± **Watch and take over from your phone** through the web viewer and Tailscale.
|
|
34
|
+
- π **Passwords agents don't see**: a KeePassXC vault inside the box. Agents type entries into the page without the values reaching their output.
|
|
35
|
+
- πͺ **Logins that persist** between runs.
|
|
36
|
+
- π€ **Runs only while used**: starts in seconds and stops itself after 20 idle minutes.
|
|
37
|
+
- π§© **Agents already know how to use it**: setup adds an [Agent Skill][agent-skills] for Claude Code, Codex and others.
|
|
38
|
+
|
|
39
|
+
> [!IMPORTANT]
|
|
40
|
+
> The vault keeps passwords out of agents' chats, commands and logs, but it isn't a wall against them: they control the box, so one that sets out to read a password can. Store only test or low-risk accounts there, never your email, bank or cloud admin accounts. See [π‘οΈ Security and privacy](#οΈ-security-and-privacy).
|
|
41
|
+
|
|
42
|
+
## π§° Choose a container tool
|
|
43
|
+
|
|
44
|
+
The box runs in a container. You need Node and one of these:
|
|
45
|
+
|
|
46
|
+
| Container tool | Runs on | Cost | Notes |
|
|
47
|
+
| ------------------------------- | --------------------------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| π **Apple's `container`** | Macs with Apple silicon and macOS 26 or later | Free, open source | **The default there.** Each box is its own small VM, and all its memory comes back when it stops. Setup installs it with Homebrew. |
|
|
49
|
+
| π³ **Colima** with Docker | Macs, Linux | Free, open source | `brew install colima docker`, then `colima start`. Its VM stays on after the box stops, until `agent-box off`. |
|
|
50
|
+
| π³ **Docker Desktop, OrbStack** | Macs | Paid for some businesses | Docker Desktop is paid for companies with 250 or more people or $10M or more in revenue; OrbStack is paid for commercial use. The VM stays on, like Colima's. |
|
|
51
|
+
| π§ **Docker Engine, Podman** | Linux | Free, open source | No VM at all: the box is a plain container. Good for an always-on Linux server. |
|
|
52
|
+
|
|
53
|
+
CI tests Docker on Linux (x64 and arm64) and Podman on every change. Apple's `container` is tested by hand, since GitHub's Mac runners can't run it.
|
|
54
|
+
|
|
55
|
+
## π Quick start
|
|
56
|
+
|
|
57
|
+
### 1. Install
|
|
58
|
+
|
|
59
|
+
**Through your agent:** open a session in your coding agent (Claude Code, Codex, T3 Code or similar) and paste this line:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
Install agent-box from https://github.com/kdpa-llc/agent-box by following the Quick start section of its README.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The agent installs it, and asks you which container tool to use if you have more than one, and where to add its skill.
|
|
66
|
+
|
|
67
|
+
**By hand:** run these two commands in a terminal. `setup` asks you the same questions.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm install -g kdpa-agent-box
|
|
71
|
+
agent-box setup
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
To try the latest `main` before it's released, install from GitHub instead with `npm install -g --allow-git=root github:kdpa-llc/agent-box`. npm 12 refuses installs from GitHub unless you pass `--allow-git=root`, which allows only this package.
|
|
75
|
+
|
|
76
|
+
> **π€ Agents doing the install:**
|
|
77
|
+
>
|
|
78
|
+
> 1. Check the machine has Node and can run one of the container tools above: `uname -sm`, `sw_vers` on a Mac, and `command -v container docker podman`. If none fits, show the user the table and stop.
|
|
79
|
+
> 2. If more than one tool fits, ask the user which to use. Apple's `container` is the default on Macs that can run it; Docker or Podman must already be running.
|
|
80
|
+
> 3. Ask the user where to add the `agent-box` skill; it's how agents learn to use the box. The defaults are the Claude Code skills folder (`$CLAUDE_CONFIG_DIR/skills`, or `~/.claude/skills` when that's unset) and `~/.agents/skills`, which Codex and other agents read. They may instead name other folders, or say none.
|
|
81
|
+
> 4. Run `npm install -g kdpa-agent-box` (if npm can't find the package, use `npm install -g --allow-git=root github:kdpa-llc/agent-box`). Then run `agent-box setup --runtime <tool>`, adding `--skills-dir <folder>` once for each folder they named, `--no-skills` for none, or nothing for the defaults. The first setup takes 1 to 3 minutes.
|
|
82
|
+
> 5. Tell the user what setup printed, and that new agent sessions will know the box.
|
|
83
|
+
|
|
84
|
+
`agent-box setup` is safe to run again. It:
|
|
85
|
+
|
|
86
|
+
- installs `playwright-cli` (npm) if it's missing, and Apple's `container` (Homebrew) when that's the chosen tool;
|
|
87
|
+
- starts the container tool, and remembers the choice in `~/.config/agent-box/config`;
|
|
88
|
+
- builds the box image, which takes 1 to 3 minutes and 1.7 GB;
|
|
89
|
+
- links the `agent-box` skill into the chosen folders.
|
|
90
|
+
|
|
91
|
+
### 2. Watch it
|
|
92
|
+
|
|
93
|
+
Open http://127.0.0.1:6080/ on the same machine, or set up [your phone](#-watch-and-take-over). The box starts the first time an agent runs `agent-box up`, or when you do.
|
|
94
|
+
|
|
95
|
+
### 3. Log in once
|
|
96
|
+
|
|
97
|
+
In the viewer, log in to the accounts your agents should use. The cookies stay in the box's storage, so most sites are already signed in next time.
|
|
98
|
+
|
|
99
|
+
### 4. Ask your agents
|
|
100
|
+
|
|
101
|
+
New agent sessions see the skill and use the box when a task needs a real browser. Sessions that were already open don't see it.
|
|
102
|
+
|
|
103
|
+
## π€ How agents use it
|
|
104
|
+
|
|
105
|
+
The full instructions are in the skill, [`skills/agent-box/SKILL.md`](skills/agent-box/SKILL.md). In short:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
agent-box up # start it (about 7 s); safe to run every time
|
|
109
|
+
playwright-cli -s=my-task attach --cdp=http://127.0.0.1:9222
|
|
110
|
+
playwright-cli -s=my-task tab-new https://example.com
|
|
111
|
+
playwright-cli -s=my-task find "Sign in" # matching page elements, with refs like e12
|
|
112
|
+
playwright-cli -s=my-task click e12
|
|
113
|
+
playwright-cli -s=my-task detach # leaves the browser running for others
|
|
114
|
+
agent-box type-secret "GitHub test" # types a saved password into the focused field
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
- Each agent uses its own `playwright-cli` session and its own tab, so several can share the box.
|
|
118
|
+
- Playwright scripts can connect with `chromium.connectOverCDP('http://127.0.0.1:9222')`.
|
|
119
|
+
- When a step needs a person, such as a CAPTCHA, a passkey or a payment, the skill tells the agent to stop and give you the viewer address.
|
|
120
|
+
|
|
121
|
+
## π± Watch and take over
|
|
122
|
+
|
|
123
|
+
- **On the same machine:** open http://127.0.0.1:6080/.
|
|
124
|
+
- **From your phone:** install Tailscale on the phone and the machine, signed in to the same account. Then run this once on the machine (on Linux, the command is just `tailscale`). It makes the viewer reachable from your own devices only, not from the internet:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
/Applications/Tailscale.app/Contents/MacOS/Tailscale serve --bg --https=8443 http://127.0.0.1:6080
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`agent-box url` prints the phone address. Turn the phone sideways for a bigger view; the keyboard button is in the side bar.
|
|
131
|
+
- **Open the viewer when the box is off (macOS):** run `agent-box door on` once. It adds a 15 MB login service on port 6080 that starts the box when the address is opened, and shows a "Startingβ¦" page meanwhile. The box's own viewer moves to port 6090. Without it, the address only works while the box runs. `agent-box door off` removes it.
|
|
132
|
+
|
|
133
|
+
## π Passwords
|
|
134
|
+
|
|
135
|
+
- **The password manager:** KeePassXC, free and open source, inside the box. The vault is one encrypted file (AES-256, Argon2) in the box's storage, at `/data/vault/vault.kdbx`. Nothing is stored outside the box or in a cloud.
|
|
136
|
+
- **Edit entries:** in the viewer, tap the key button at the bottom left. The manager opens unlocked. Add, edit or delete entries there, including 2FA codes (Entries > TOTP > Set up TOTP). It saves after every change.
|
|
137
|
+
- **Add one through an agent:** ask it to "save a password for X in the agent box". In T3 Code it shows you a private card for the password; elsewhere it asks you to add it in the viewer.
|
|
138
|
+
- **How agents use them:** `agent-box type-secret` looks up and types the entry inside the box, so the value doesn't appear in their chat, commands or output. About 3 seconds after a password, it clears any password still in a field, because page snapshots show their text.
|
|
139
|
+
- **Chromium's own "Save password?" is off**, so the vault is the only place passwords live.
|
|
140
|
+
- **Unlocking:** the vault opens with a random master password kept next to it, in `/data/vault/.master`. That's what lets agents log in while you're away.
|
|
141
|
+
|
|
142
|
+
## ποΈ How it works
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
Agent ββ playwright-cli βββΊ 127.0.0.1:9222 (CDP) βββββββ
|
|
146
|
+
βΌ
|
|
147
|
+
βββββββββββββ the box βββββββββββββ
|
|
148
|
+
β Chromium Β· KeePassXC Β· taskbar β
|
|
149
|
+
β Xvfb screen Β· Openbox β
|
|
150
|
+
β x11vnc βββΊ noVNC β
|
|
151
|
+
ββββββββββββββββββ¬βββββββββββββββββ
|
|
152
|
+
β
|
|
153
|
+
You ββ browser or phone βββΊ 127.0.0.1:6080 (viewer) ββ
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
- **The box** is one Debian container: a virtual screen (Xvfb), a light window manager (Openbox), a taskbar (tint2), Chromium and KeePassXC.
|
|
157
|
+
- **Agents** reach Chromium's remote-control port (CDP) on 127.0.0.1:9222. **You** reach the desktop through noVNC on 127.0.0.1:6080.
|
|
158
|
+
- **Storage:** the browser profile and the vault live in a volume (`agent-box-data`) that outlives the box.
|
|
159
|
+
- **Idle stop:** a watchdog counts viewer connections and browser-control traffic. After 20 quiet minutes it quits Chromium cleanly, so logins are saved, and the box exits.
|
|
160
|
+
|
|
161
|
+
| File | What it does |
|
|
162
|
+
| ------------------------------------- | --------------------------------------------------------------------- |
|
|
163
|
+
| `agent-box` | The command |
|
|
164
|
+
| `skills/agent-box/SKILL.md` | The agent instructions that `setup` links into each agent |
|
|
165
|
+
| `Containerfile` | The box image (Debian trixie-slim) |
|
|
166
|
+
| `entrypoint.sh` | Starts the screen, viewer, Chromium and the idle watchdog |
|
|
167
|
+
| `box-vault` | The password vault inside the box (KeePassXC) |
|
|
168
|
+
| `box-quit-browser` | Closes Chromium cleanly; a plain stop signal kills it before it saves |
|
|
169
|
+
| `desktop/` | Taskbar and KeePassXC settings |
|
|
170
|
+
| `chromium-seccomp.json` | Lets Chromium keep its sandbox under Docker and Podman; regenerate it with `npm run update:seccomp` |
|
|
171
|
+
| `box-door.py`, `agent-box-door.plist` | The optional front door on macOS (`agent-box door on`) |
|
|
172
|
+
| `tests/smoke.sh` | End-to-end test on a real box |
|
|
173
|
+
|
|
174
|
+
## β¨οΈ CLI reference
|
|
175
|
+
|
|
176
|
+
| Command | What it does |
|
|
177
|
+
| ---------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
178
|
+
| `agent-box up` | Start the box if needed and print its addresses |
|
|
179
|
+
| `agent-box down` | Stop the box now (it also stops itself when idle) |
|
|
180
|
+
| `agent-box status` | Whether it runs, and its CPU and memory use |
|
|
181
|
+
| `agent-box url` | Viewer addresses, on this machine and over Tailscale |
|
|
182
|
+
| `agent-box shot [file.png]` | Screenshot of the whole desktop |
|
|
183
|
+
| `agent-box x <xdotool args>` | Mouse and keyboard on the desktop |
|
|
184
|
+
| `agent-box exec <cmd>` | Run a command inside the box |
|
|
185
|
+
| `agent-box logs` | The box's log |
|
|
186
|
+
| `agent-box runtime` | The container tool in use |
|
|
187
|
+
| `agent-box build` | Rebuild the image |
|
|
188
|
+
| `agent-box off` | Stop the box, and the container service or VM if nothing else uses it |
|
|
189
|
+
| `agent-box door on\|off` | (macOS) Always-on helper so the viewer address starts the box |
|
|
190
|
+
| `agent-box secret list\|save\|rm\|open` | Manage the vault; `open` shows the password manager on the box's screen |
|
|
191
|
+
| `agent-box type-secret <name> [--username\|--totp] [--no-enter]` | Type a vault entry into the focused field |
|
|
192
|
+
| `agent-box setup [--runtime T] [--skills-dir D]... [--no-skills]` | Install tools, image and agent skill |
|
|
193
|
+
| `agent-box uninstall [--all]` | Undo setup; `--all` also deletes the image, logins and passwords |
|
|
194
|
+
|
|
195
|
+
Settings (environment variables for `agent-box up`):
|
|
196
|
+
|
|
197
|
+
| Variable | Default |
|
|
198
|
+
| ------------------------------- | --------------------------------- |
|
|
199
|
+
| `BOX_IDLE_MINUTES` | 20 (0 means never stop by itself) |
|
|
200
|
+
| `BOX_MEMORY` | 2G |
|
|
201
|
+
| `BOX_CPUS` | 2 |
|
|
202
|
+
| `BOX_WIDTH` Γ `BOX_HEIGHT` | 1280Γ800 |
|
|
203
|
+
| `BOX_CDP_PORT`, `BOX_VIEW_PORT` | 9222, 6080 |
|
|
204
|
+
| `BOX_RUNTIME` | the tool chosen in setup |
|
|
205
|
+
|
|
206
|
+
## π What it costs
|
|
207
|
+
|
|
208
|
+
Measured on an Apple silicon Mac.
|
|
209
|
+
|
|
210
|
+
- **Memory:** about 0.9 GB inside the box with one page open. With Apple's `container`, the VM holds about 1.8 GB on the Mac while the box runs, and nothing once it stops; the container service stays at about 90 MB. With Colima, its VM held about 1.6 GB with the box running, and stays on until `agent-box off`.
|
|
211
|
+
- **Start:** about 7 s with Apple's `container`. With Colima, about 1 s while its VM is on, or 11 s with the VM off. **Stop:** under 1 s.
|
|
212
|
+
- **Disk:** about 2.2 GB while stopped: the 1.7 GB image, the VM kernel and the browser profile. With Apple's `container`, a running box adds a 1.4 GB copy, deleted when it stops, and building the image needs about 4.5 GB of build cache for a while.
|
|
213
|
+
|
|
214
|
+
## π‘οΈ Security and privacy
|
|
215
|
+
|
|
216
|
+
- Browser control (CDP) and the viewer listen on 127.0.0.1 only. Neither has a password, so anything running on the machine can use them; don't forward or publish those ports.
|
|
217
|
+
- Tailscale Serve makes the viewer reachable from your own devices only. Don't use Tailscale Funnel or a public tunnel for it.
|
|
218
|
+
- The vault keeps passwords out of agents' context and logs, but agents that control the box can still get at them. Store only accounts you'd be fine with an agent using.
|
|
219
|
+
- Page snapshots show the text of password fields; `type-secret` clears them about 3 seconds after typing a password.
|
|
220
|
+
- Chromium keeps its sandbox. Under Docker and Podman the box uses [Docker's default seccomp profile][moby-seccomp] plus the three calls the sandbox needs, instead of `--no-sandbox`.
|
|
221
|
+
- With Apple's `container`, each box is its own VM. With Docker or Podman on Linux, it's a container sharing the host's kernel.
|
|
222
|
+
|
|
223
|
+
See [SECURITY.md][security] to report a vulnerability.
|
|
224
|
+
|
|
225
|
+
## π©Ί Troubleshooting
|
|
226
|
+
|
|
227
|
+
Start with:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
agent-box status
|
|
231
|
+
agent-box logs
|
|
232
|
+
agent-box runtime
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
- **"browser did not come up":** `agent-box logs` shows why. On Docker or Podman, a loop of "chromium exited, restarting" means the seccomp profile wasn't applied.
|
|
236
|
+
- **"docker isn't running":** start Docker Desktop or OrbStack, or `colima start`. With Colima chosen in setup, `agent-box up` starts it for you.
|
|
237
|
+
- **The phone saves a file instead of showing the viewer:** the box is off. Run `agent-box up`, or `agent-box door on` on a Mac.
|
|
238
|
+
- **A port is already in use:** set `BOX_CDP_PORT` and `BOX_VIEW_PORT`.
|
|
239
|
+
- **The build fails for lack of space:** Apple's `container` needs about 5 GB free while it builds.
|
|
240
|
+
- **Agents don't know the box:** start a new session after setup, and check that the skill link exists in your agent's skills folder.
|
|
241
|
+
|
|
242
|
+
## π Update and remove
|
|
243
|
+
|
|
244
|
+
**Update:** run `npm install -g kdpa-agent-box`, then `agent-box setup`, by hand or through an agent. The skill is a link into the package, so it updates too, and the next `agent-box up` rebuilds the image if its files changed. Logins and passwords stay.
|
|
245
|
+
|
|
246
|
+
**Remove:**
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
agent-box uninstall # skill links, front door, running box; keeps logins and passwords
|
|
250
|
+
agent-box uninstall --all # also deletes the image and the box's storage, with its logins and passwords
|
|
251
|
+
npm rm -g kdpa-agent-box
|
|
252
|
+
brew uninstall container # if you used it and nothing else does
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Turn off the phone viewer with `tailscale serve --https=8443 off`.
|
|
256
|
+
|
|
257
|
+
## π€ Contributing
|
|
258
|
+
|
|
259
|
+
Found a bug π, have an idea β¨, or want to improve the docs? Contributions are welcome. Read [CONTRIBUTING.md][contributing], follow the [Code of Conduct][code-of-conduct], and run the checks before opening a pull request:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
npm install # dev tools and the commit-message hook
|
|
263
|
+
npm run lint # shellcheck
|
|
264
|
+
npm test # end-to-end smoke test on a real box
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Releases are automatic: [semantic-release][semantic-release] publishes to npm from [Conventional Commits][conventional-commits] after CI passes. See [PUBLISHING.md][publishing].
|
|
268
|
+
|
|
269
|
+
## π Complementary projects
|
|
270
|
+
|
|
271
|
+
### [MCP Compression Proxy][mcp-compression-proxy]
|
|
272
|
+
|
|
273
|
+
Use a large MCP toolset without loading every tool into every prompt. Agents search for a tool, inspect its schema only when needed, and keep oversized results out of the conversation.
|
|
274
|
+
|
|
275
|
+
### [Local Skills MCP][local-skills-mcp]
|
|
276
|
+
|
|
277
|
+
Serve the skills on your filesystem, like this repo's `agent-box` skill, to any MCP client, not only those that read skill folders.
|
|
278
|
+
|
|
279
|
+
### [Peers][peers]
|
|
280
|
+
|
|
281
|
+
Run long-lived AI agents that own a responsibility, keep their own memory, and coordinate as peers.
|
|
282
|
+
|
|
283
|
+
## π Support the project
|
|
284
|
+
|
|
285
|
+
Open source grows through the people who try it, share it, and improve it. If Agent Box gives your agents a browser they can actually use:
|
|
286
|
+
|
|
287
|
+
- β **[Star the repository][stargazers]** so more people running coding agents can discover it.
|
|
288
|
+
- π **[Report a bug or suggest an idea][repo-issues]** to help shape the roadmap.
|
|
289
|
+
- π **[Contribute code or documentation][contributing]**βfirst-time contributors are welcome.
|
|
290
|
+
- π **Sponsor continued development** using any of the options below.
|
|
291
|
+
|
|
292
|
+
<div align="center">
|
|
293
|
+
|
|
294
|
+
[![GitHub Stars][stars-badge]][stargazers]
|
|
295
|
+
[![Sponsor on GitHub][sponsor-github-badge]][sponsor-github]
|
|
296
|
+
[![Buy Me a Coffee][sponsor-coffee-badge]][sponsor-coffee]
|
|
297
|
+
[![PayPal][sponsor-paypal-badge]][sponsor-paypal]
|
|
298
|
+
|
|
299
|
+
**Every star, issue, pull request, and contribution helps. Thank you! π**
|
|
300
|
+
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
## π License
|
|
304
|
+
|
|
305
|
+
[MIT](LICENSE) Β© 2026 KDPA.
|
|
306
|
+
|
|
307
|
+
## π Acknowledgments
|
|
308
|
+
|
|
309
|
+
Built on [Apple's container][apple-container], [Playwright][playwright] and [playwright-cli][playwright-cli], [noVNC][novnc], [KeePassXC][keepassxc] and [Debian][debian] β’ Inspired by [Anthropic's computer-use demo][anthropic-computer-use] and [E2B's desktop sandbox][e2b-desktop]
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
<div align="center">
|
|
314
|
+
|
|
315
|
+
**[β¬ Back to top](#οΈ-agent-box)**
|
|
316
|
+
|
|
317
|
+
Made with β€οΈ by KDPA
|
|
318
|
+
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<!-- Reference links -->
|
|
322
|
+
|
|
323
|
+
[npm-version-badge]: https://img.shields.io/npm/v/kdpa-agent-box.svg
|
|
324
|
+
[npm-package]: https://www.npmjs.com/package/kdpa-agent-box
|
|
325
|
+
[npm-downloads-badge]: https://img.shields.io/npm/dm/kdpa-agent-box
|
|
326
|
+
[node-badge]: https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg
|
|
327
|
+
[nodejs]: https://nodejs.org/
|
|
328
|
+
[ci-badge]: https://github.com/kdpa-llc/agent-box/actions/workflows/ci.yml/badge.svg
|
|
329
|
+
[ci-workflow]: https://github.com/kdpa-llc/agent-box/actions/workflows/ci.yml
|
|
330
|
+
[codeql-badge]: https://github.com/kdpa-llc/agent-box/actions/workflows/codeql.yml/badge.svg
|
|
331
|
+
[codeql-workflow]: https://github.com/kdpa-llc/agent-box/actions/workflows/codeql.yml
|
|
332
|
+
[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg
|
|
333
|
+
[license-file]: LICENSE
|
|
334
|
+
[platform-badge]: https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey.svg
|
|
335
|
+
[skills-badge]: https://img.shields.io/badge/Agent%20Skills-compatible-purple.svg
|
|
336
|
+
[agent-skills]: https://agentskills.io/
|
|
337
|
+
[stars-badge]: https://img.shields.io/github/stars/kdpa-llc/agent-box?style=social
|
|
338
|
+
[stargazers]: https://github.com/kdpa-llc/agent-box/stargazers
|
|
339
|
+
[issues-badge]: https://img.shields.io/github/issues/kdpa-llc/agent-box
|
|
340
|
+
[repo-issues]: https://github.com/kdpa-llc/agent-box/issues
|
|
341
|
+
[commit-badge]: https://img.shields.io/github/last-commit/kdpa-llc/agent-box
|
|
342
|
+
[commits]: https://github.com/kdpa-llc/agent-box/commits/main
|
|
343
|
+
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
|
|
344
|
+
[contributing]: CONTRIBUTING.md
|
|
345
|
+
[security]: SECURITY.md
|
|
346
|
+
[code-of-conduct]: CODE_OF_CONDUCT.md
|
|
347
|
+
[publishing]: PUBLISHING.md
|
|
348
|
+
[semantic-release]: https://github.com/semantic-release/semantic-release
|
|
349
|
+
[conventional-commits]: https://www.conventionalcommits.org/
|
|
350
|
+
[moby-seccomp]: https://github.com/moby/profiles/blob/main/seccomp/default.json
|
|
351
|
+
[mcp-compression-proxy]: https://github.com/kdpa-llc/mcp-compression-proxy
|
|
352
|
+
[local-skills-mcp]: https://github.com/kdpa-llc/local-skills-mcp
|
|
353
|
+
[peers]: https://github.com/kdpa-llc/peers
|
|
354
|
+
[sponsor-github-badge]: https://img.shields.io/badge/Sponsor-GitHub%20Sponsors-ea4aaa?logo=github
|
|
355
|
+
[sponsor-github]: https://github.com/sponsors/moscaverd
|
|
356
|
+
[sponsor-coffee-badge]: https://img.shields.io/badge/Buy%20Me%20a%20Coffee-support-yellow?logo=buy-me-a-coffee
|
|
357
|
+
[sponsor-coffee]: https://buymeacoffee.com/moscaverd
|
|
358
|
+
[sponsor-paypal-badge]: https://img.shields.io/badge/PayPal-donate-blue?logo=paypal
|
|
359
|
+
[sponsor-paypal]: https://paypal.me/moscaverd
|
|
360
|
+
[apple-container]: https://github.com/apple/container
|
|
361
|
+
[playwright]: https://playwright.dev/
|
|
362
|
+
[playwright-cli]: https://github.com/microsoft/playwright-cli
|
|
363
|
+
[novnc]: https://novnc.com/
|
|
364
|
+
[keepassxc]: https://keepassxc.org/
|
|
365
|
+
[debian]: https://www.debian.org/
|
|
366
|
+
[anthropic-computer-use]: https://github.com/anthropics/claude-quickstarts/tree/main/computer-use-demo
|
|
367
|
+
[e2b-desktop]: https://github.com/e2b-dev/desktop
|