brig docs

Compare

Brig compared

On this page

Brig gives a coding agent a machine of its own on your computer. The agent gets a kernel, your project and nothing else, network rules you write, and a broker that keeps its keys on your machine, in one command. This page scores Brig and every other sandbox people run agents in against the five things an unattended agent needs.

The tools fall into three kinds. A process sandbox filters what a process can ask the host kernel for: bubblewrap, Seatbelt, nono, Strands Box, and the sandboxes inside Claude Code, Codex and Cursor. gVisor is neither: it gives the container a kernel of its own, and that kernel runs as a process on the host kernel. A microVM gives the agent a kernel of its own on your machine: Brig, Docker Sandboxes, Apple container and microsandbox. A cloud sandbox runs the code on someone else's machine: E2B and Daytona.

What a coding agent needs #

Need Why
Its own kernel The agent runs code it did not write, from packages, from the web and from the model. A kernel bug reachable from inside a process sandbox is a way out. A microVM puts a hypervisor in the path
The project, and nothing else The agent needs your repository. It does not need your SSH keys, your cloud credentials, your browser profile or your other repositories
Egress rules, enforced outside A sandbox with open internet can send anything it reads anywhere. The rules must name hosts, cover every protocol, and sit where the agent cannot reach them. On an API, they should also limit the methods and paths
Keys kept on the host The agent needs its login and perhaps one token. It should hold a stand-in, not the key, and only the requests you allow should carry the key
An agent in one command The tool must know the agent's paths, its login and its settings, so a run needs no assembly

Scorecard #

Each cell says what the tool does for that need. The pages linked in the first column give the detail and the sources.

Tool Own kernel Project only Egress rules Credentials One command
Brig Yes. hvi on macOS, KVM on Linux Yes. The project and the guest home Yes. L4: hosts and ranges, at a network gateway or in nftables outside the guest. L7: method, path and git repository on each route, and for GitHub's GraphQL API, mutations limited to the repositories you name Yes. A broker on the host adds the key to the requests a route allows. The agent holds a session token for that route, and never the key. An aws route is the exception: it hands the agent temporary AWS keys Yes. Nine built-in profiles
bubblewrap No. Namespaces on the host kernel Yes, if you bind only the project No. All or nothing No. Environment variables No. You write the bind list
Seatbelt No. A policy in the host kernel Yes, if the profile allows it. Most profiles read the whole disk No. No rule by hostname No No. You write the profile
nono No. Landlock and Seatbelt on the host kernel Yes. Deny by default Partial. A proxy on the host, or block all Yes. A proxy adds the key to allowed requests Yes. Profiles and client guides
Strands Box No. Seatbelt on the host kernel Yes. Deny by default. The paths you grant, and the files its shell opens under policy Partial. HTTP and HTTPS through a gateway on the host that terminates TLS, by host, port, method and path Yes. A placeholder the gateway swaps, from an environment variable No. You write box.toml and policy.dw. Examples for Claude Code and Codex
Claude Code, Codex, Cursor No. Seatbelt, bubblewrap and Landlock on the host kernel No. Reads the whole disk, writes the project Partial. A proxy on the host with a domain list Partial. Claude Code masks at the proxy Yes. Built in
gVisor Partial. A kernel in Go, run as a process on the host kernel, with a short list of host system calls Yes, if you mount only the project No. Its own network stack, with the host's network or none No. Environment variables or mounted files No. You bring an image. Gemini CLI has a runsc option
Docker Sandboxes Yes. A microVM per sandbox Yes. The workspace Partial. An HTTP proxy, with address rules for other TCP Yes. A keychain store, with a sentinel the proxy swaps Yes. Agent commands
Dev container No. The Docker host's kernel Yes, if you mount only the project No. A firewall script inside the container No. Variables, or the login inside No. You write devcontainer.json
Apple container Yes. A VM per container Yes. The volumes you mount No No. Registry logins only No. You bring an image
microsandbox Yes. A libkrun microVM Yes. The directory you mount Yes. Hostname and address rules, checked on the host Yes. A placeholder the host swaps on allowed hosts No. A recipe per agent
E2B, Daytona Yes, on their machines. Daytona's default is a container Your project is uploaded Yes. Lists by host and range Partial. Stored with the provider Yes, through an SDK

What Brig gives you #

Brig is the one tool on the list that meets all five on your own machine, on macOS and on Linux, as open source.

  • A kernel per sandbox. On macOS, hvi boots the guest on Hypervisor.framework and runs inside a Seatbelt profile of its own. On Linux, urunc boots it on hvi under KVM by default. Architecture shows each layer.
  • Your project, and nothing else from the host. The guest sees the project at /work/<name> and its own home. Your keychain, SSH agent and other repositories are not there. Security lists what the agent can and cannot reach.
  • Network rules at L4 and L7. A policy names the hosts and ranges the agent can reach. Brig enforces them at a network gateway on macOS and on Linux with hull, and in nftables on Linux with nerdctl, and refuses to boot where it cannot. A route adds rules per request: the methods, the paths and, for git, the repositories. For GitHub's GraphQL API, a route can limit each mutation to the repositories you name. --network offline leaves no route out. Networking has the format and a recording.
  • A credential broker. brig secret import claude-code carries your login in once, and a route keeps it on the host. The agent gets a session token for that route. The broker checks each request, adds the key, and redacts the key from the response. A refused request gets a 403 before the key is read, and every request gets a line in an audit log. Presets cover Claude Code, the Anthropic API, GitHub, AWS and Google Cloud. Credential broker has the format and three recordings.
  • One command per agent. brig run claude ~/code/demo opens Claude Code in its sandbox. Nine profiles ship: Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, Grok, OpenCode, herdr (Claude Code with a herdr server in each sandbox) and a plain Ubuntu shell.

microsandbox meets the first four. Its recipe installs the agent once per sandbox. Docker Sandboxes gives a microVM and a keychain store from a closed-source tool. nono is the nearest process sandbox, and runs on an Intel Mac and on a Linux host with no KVM. Strands Box adds a rule per command, file and request on top of Seatbelt, and runs on Apple silicon only.

Brig states its limits on the security model page. It needs Apple silicon and macOS 15 or newer for its default backend, or a Linux host with KVM. A sandbox boots a kernel, so a cold start takes longer than a process sandbox. A route's rules match the method, the path and the repository. They do not read request bodies, except the GraphQL rules of a github-api route, which read the operation in the body. A host you allow without a route is filtered by name only. hvi, the VMM on macOS, is in process for an external security audit, and no formal third-party review is published at this time.

Other tools #

These do not have a page of their own. Each is a sandbox, and none is built for a coding agent on your machine.

Tool What it is Why it is not on the scorecard
Firecracker, Kata Containers MicroVM runtimes for Linux servers Linux and KVM only. Firecracker needs root for the network setup, and Kata's shim and virtiofsd run as root. No agent, credential or egress layer. Brig's Linux path boots hvi under KVM through urunc
microsandbox A microVM sandbox for untrusted code, with host-side network rules and placeholder secrets It is on the scorecard. Its Claude Code guide installs the agent with a recipe, once per sandbox, and its README calls it beta. The nearest tool to Brig in mechanism
MXC Microsoft's sandbox SDK for Rust, .NET and Node, and the layer behind GitHub Copilot CLI's local sandbox An SDK an agent's maker builds in, not a tool you run an agent in. Its default backend on each platform is a process sandbox on the host kernel: ProcessContainer on Windows, bubblewrap on Linux and Seatbelt on macOS. A rule names an address and a port, and a hostname needs a proxy you run. Its microVM backends are experimental, run a script, and skip macOS
Lima, OrbStack Linux VMs on a Mac General development VMs, with no agent, credential or egress layer. OrbStack runs one VM shared by every container and machine, and its documentation says an isolated machine is not a substitute for a full VM against malicious code
Firejail, nsjail Linux namespace sandboxes Shared kernel. Firejail is setuid root, and its man page says this is a risk
Landlock A Linux kernel mechanism A building block, not a tool. nono and Cursor use it

Sources #

Each linked page lists its sources with the date they were read. The facts about Brig come from Security, Networking, Architecture and Runtimes on this site.

Type a command, a flag or an error message.