let your agents safely use the internet: KERNEL kit for docker sandboxes
docker sandboxes now has a KERNEL kit. give agents the ability to drive a browser session on KERNEL while keeping the sandbox itself isolated.
your agent needs the web, but your sandbox's network policy blocks it. the direct fix is to run chromium inside the sandbox and relax the network policy, but that creates risk. every site the agent might visit has to be in the sandbox's policy, because network requests cross the sandbox boundary. you now need to manage a browser too, with versions, flags, crashes, and captchas.
we built the KERNEL kit for docker sandboxes so the browser doesn't have to be in the sandbox at all. the agent and its code stay in docker and the browser runs on KERNEL, which is where the page actually loads.
how KERNEL kit for docker sandbox works
KERNEL kit has five components: the KERNEL cli, a quick-reference guide, agent instructions, network rules, and a credential binding. together, these components serve a shared purpose of giving your agent safe access to the web through KERNEL.
- the KERNEL cli gives your agent access to any KERNEL command from within the sandbox, such as
kernel browsers createto spin up a new browser orkernel invoketo trigger an action on a deployed KERNEL application. - the quick-reference guide is a markdown file that helps your agent know how to use KERNEL. it includes examples so your agent can see how to add the sdk as a project dependency or run common cli commands.
- the agent instructions tell the agent to read the quick-reference guide and delete browsers when it’s done with them.
- the network rules tell your docker sandbox which network paths must be accessible for the KERNEL kit to work. these pathways include KERNEL endpoints and package registries for any dependencies installed by the cli or sdk.
- the credential binding lives in a proxy on your host machine. this proxy injects the KERNEL api key into any requests made to
api.onkernel.com, so that your agent never sees the real credential.
getting started
on a host with docker sandboxes installed and signed in, create a KERNEL api key and store it. sbx prompts for the value and keeps it on your host, usually in your os keychain:sbx secret set kernel
then run your agent with the kit. this example uses claude code, but the kit works with any agent whose sandbox includes npm:sbx run claude --name kernel-demo --kit docker.io/sbx/kernel-kit:latest
now the KERNEL kit is set up, and you can ask your agent to browse the web safely. for example, you can ask it to browse hacker news with this prompt:use the KERNEL cli to open https://news.ycombinator.com in a KERNEL browser and tell me the titles of the top three stories. delete the browser when you're done.
side note: if you’re curious and want to see the sentinel value that the host provides to your sandbox, you can run the following command on your host:sbx exec kernel-demo sh -lc 'echo "$KERNEL_API_KEY"'
ready to try the KERNEL kit?
the KERNEL kit for docker sandbox is available right away. to try it out for yourself, see our docs for more details on how to get started. we’d love your feedback, so please try it out and tell us how it went.