Repository navigation
Conversation
Runs agent sandboxes on a sandbox node and everything that governs them (gateway, supervisors, egress watchdog) on a control node, as one k3s cluster. Uses released OpenShell 0.1.4 with no changes. - deploy/: control-node.sh, sandbox-node.sh, watchdog.sh, verify.sh, and a single-host k3d rehearsal - src/twobox_watchdog/: supervisor middleware with TLS and gateway JWT auth, per-sandbox byte accounting, budgets set in sandbox policy, and quarantine on exceed
Documentation previewBuilt from |
Add SPDX headers to the two-box example's scripts, configs, and package files. Clarify protobuf 6.33.6, whose PyPI metadata reports a non-SPDX "3-Clause BSD License", as BSD-3-Clause.
Name the example for its use case: machine-isolated agents with egress usage monitoring. Two-box remains the name of the deployment pattern. - projects/use-case-examples/two-box-openshell -> agent-containment - twobox_watchdog -> egress_watchdog (middleware egress-watchdog) - node label openshell.io/box -> openshell.io/role - credit Hugging Face's egress usage monitoring proof of concept
Replace the host-process watchdog with a pod on the control node: a pinned stock uv Python image runs the checkout, so there is no image to build. A network policy admits only the gateway and sandbox supervisors, so sandbox nodes can no longer reach the watchdog. The control node no longer needs uv installed.
Every node can reach in-cluster addresses and NodePorts, so a sandbox node's host could open connections to the gateway, which relied on its client certificate alone. A network policy now admits only sandbox supervisors, gateway replicas, and the control node itself.
- escape '@' in the checkout path for k3d's volume flag - download the helm and OpenShell CLI builds for the host OS, and verify checksums with shasum on Linux and macOS - read the checkout owner with GNU or BSD stat - let the operator CLI through the gateway policy with OPERATOR_CIDR, which the rehearsal sets to Docker's network gateway - leave the default kubeconfig untouched
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run frontier agents on a machine you expect them to break: their controls live on another machine they can't reach, and every allowed request counts against a budget.
The egress usage monitoring builds on Hugging Face's proof of concept and RFC by Hugo Larcher; we're building this together with the Hugging Face team.
The setup is one k3s cluster across two or more machines:
It uses released OpenShell 0.1.4 with no changes to OpenShell.
Try it
You need two Ubuntu 24.04 machines or VMs that can reach each other. From
projects/use-case-examples/agent-containment:deploy/rehearse-k3d.shruns the same thing on a single Docker host, without sudo.Exfil budgets live in the sandbox policy
The watchdog counts the bytes each sandbox sends to each allowed host. When a sandbox goes over its budget, the watchdog denies the request and quarantines that sandbox. The budget sits in the sandbox policy, next to the rules it constrains:
Feedback wanted on this shape:
Tested
On a DGX Station (control node) and a DGX Spark (sandbox node), both arm64 and on the same local network:
control-node.shtook 42 s andsandbox-node.sh13 s.verify.shpasses all 9 checks: placement, allowed and refused requests, and watchdog accounting.uv run pytest).What's next