Cloud-hosted Chromium for AI agents with stealth, managed auth, and live session replay
114
Cloud-hosted Chromium for AI agents with stealth, managed auth, and live session replay
| Name | Required | Default | Description |
|---|---|---|---|
version | Optional | 0.39.3 | Kernel CLI release to install |
[email protected]| Type | Required | Description | |
|---|---|---|---|
com.docker.sandbox/network-policy@1 | Required | — | |
com.docker.sandbox/credential@1 | Required | Kernel API key | |
com.docker.sandbox/agent-context@1 | Required | — | |
sbx run <agent> --kit docker/sbx-kit-kernel:latestRun the following command to install sbx on your machine.
brew install docker/tap/sbxwinget install Docker.sbxNote
Experimental: Sandbox Kit v3This kit uses the experimental Sandbox Kit specification, specifically v3. The format and runtime behavior may change before v3 is stable.
A mixin kit (kind: mixin) that gives any Docker Sandbox agent access to
Kernel cloud browsers. The kit installs the Kernel
CLI, adds an agent quick-reference guide, and routes API authentication through
the sandbox proxy so the real credential never enters the sandbox.
Create a Kernel account and store its API key once in Docker Sandboxes' host-side secret store:
sbx secret set kernel
The primary form is the published OCI artifact on Docker Hub:
sbx run --kit "docker.io/docker/sbx-kit-kernel:latest" claude
Or target this repo directly over git:
sbx run --kit "git+https://github.com/docker/sbx-kits-contrib.git#dir=kernel" claude
Or use a local clone:
sbx run --kit ./kernel/ claude
Mix it with another kit by repeating --kit:
sbx run --kit ./kernel/ --kit ./ruff-lint/ claude
The kit works with any agent that ships npm. It installs the kernel CLI
globally so the agent can run kernel browsers create, kernel browsers list,
and so on directly from the terminal.
A quick-reference guide rides the kit's overlay layer, so it is already at
/home/agent/.kernel/quickstart.md when the agent starts.
The kit installs the CLI but not the SDK — that belongs in your project's
package.json or requirements.txt:
TypeScript / JavaScript:
npm install @onkernel/sdk playwright-core
Use playwright-core (not playwright): it provides connectOverCDP without
downloading local Chromium binaries that you won't use.
Python:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 pip install kernel playwright
The kit declares two things:
com.docker.sandbox/credential@1 capability whose apiKey.inject maps
api.onkernel.com to the kernel credential, telling the proxy to inject
Authorization: Bearer <key> on outbound requests to that host.com.docker.sandbox/network-policy@1 capability whose runtime.allow
uses *.onkernel.com to also permit CDP WebSocket proxy URLs
(wss://proxy.<region>.onkernel.com:8443/...), which don't get auth
injection. api.onkernel.com is listed literally beside the wildcard as
well: an inject domain has to appear in the same phase's allow list by
exact host, which keeps the injection rule auditable against the list.The inject domain is intentionally narrow (just the REST API host). A wildcard
there would put the proxy into TLS-intercept mode for all *.onkernel.com
traffic — including the CDP WebSocket connections that carry browser data —
which would corrupt them.
KERNEL_API_KEY is declared with apiKey.proxyManaged: true: the sandbox
holds a placeholder value; the proxy substitutes the real credential at
request time. The real key comes from the host secret stored under the
kernel service name.
| Component | Location | How |
|---|---|---|
kernel CLI | /usr/local/bin/kernel (global) | npm install -g @onkernel/cli at build time, carried in the kit's overlay layer by kernel.dockerfile |
| Quick-reference guide | /home/agent/.kernel/quickstart.md | Static file from files/, carried in the kit's overlay layer by kernel.dockerfile |
Both arrive with the image, so the kit runs no lifecycle hooks at all and does nothing at sandbox creation. The CLI install used to be a create-time install hook — the only mechanism a v2 mixin had for installing anything — and moving it into the overlay removes the per-sandbox npm download, makes the CLI digest-pinned and scannable, turns a broken install into a failed publish rather than a failed sandbox, and drops the kit's entire install-phase network grant (npm plus the two GitHub release-asset hosts).
The version no longer floats either. The descriptor's version arg carries the
release, the recipe installs that exact npm version, and the kit publishes
provides: ["kernel@<version>"] plus a top-level version: from the same arg —
so the publish tag names the CLI release the overlay carries, and a kit asking
for kernel >= 0.39 can resolve against it. The build runs kernel --version
and fails if the installed binary reports anything else, which matters here
because the npm package's postinstall downloads the real binary from a GitHub
release: the package version and the binary could otherwise disagree unnoticed.
To bump it, set the arg's default to the current latest:
curl -fsSL https://registry.npmjs.org/@onkernel/cli/latest | jq -r .version
The kit creates no persistent host-side state. Browser sessions created inside
the sandbox are scoped to your Kernel organization and can be deleted from the
Kernel dashboard or with kernel browsers delete <id>.
Pulls:
58
Last week