Skip to main content

inspect-glovebox

A sandbox provider for UK AISI Inspect that runs each sample in a hardware-isolated microVM with a default-deny outgoing-traffic allowlist, and hands your scorer the record of every host the agent reached.

pip install inspect-glovebox

That pulls the glovebox-driver dependency from PyPI too. To run the unreleased code on main instead, install both distributions from the repository:

pip install \
  "glovebox-driver @ git+https://github.com/AlexanderMattTurner/agent-glovebox.git#subdirectory=glovebox-driver" \
  "inspect-glovebox @ git+https://github.com/AlexanderMattTurner/agent-glovebox.git#subdirectory=inspect-glovebox"

Adoption is one line on your Task

from inspect_glovebox import GloveboxSandboxConfig, glovebox_egress_scorer

Task(
    dataset=dataset,
    solver=solver,
    sandbox=SandboxEnvironmentSpec("glovebox", GloveboxSandboxConfig(memory="4g")),
    scorer=glovebox_egress_scorer("pastebin.com"),
)

Inspect finds the provider through this distribution's inspect_ai entry point, so nothing in your own code imports it. sandbox="glovebox" alone takes every default below.

What the host needs

The provider drives the glovebox command, which drives Docker's sbx sandbox runtime. A glovebox you installed (glovebox) is used first; with none on PATH, the provider downloads the release this package pins, refuses it unless its SHA-256 matches the pinned digest, and runs it from ~/.cache/inspect-glovebox. Sign in to sbx, then ask whether this host qualifies:

inspect-glovebox sandbox preflight

That console script comes with this package and runs whichever glovebox a task would drive, so it works before you have installed one. Run glovebox sandbox preflight instead when you installed the CLI yourself.

It exits 0 when the host can boot a sandbox, and otherwise names what is missing and the command that installs it. GLOVEBOX_BIN points the provider at a bin/glovebox that is not on PATH. Every task refuses at startup on a host that fails preflight, so one bad host costs one error and not one error per sample.

Configuration

Field Default Purpose
workspace None Host directory bound into the guest; None mints an empty one per sample.
allowlist None Path to a domain-allowlist.json saying which hosts the guest may reach and how; None takes glovebox's shipped list.
per_sample_workspace True Give each sample a private copy of workspace.
boot_timeout 300 Seconds to wait for the microVM to become usable.
cpus None Virtual CPUs for the VM; None takes glovebox's own cap.
memory None Memory ceiling, such as 4g; None takes glovebox's own cap.
user glovebox-agent The de-privileged guest identity every command runs as.
rootfs_image None Boot from this image, already built by glovebox sandbox build-rootfs; a compose image: fills it in.
capture_egress True Write each sample's outgoing-traffic record beside the run's eval log, in a glovebox-egress/ directory, honoring --log-dir. Falls back to INSPECT_LOG_DIR when no active sample location is available.

Read next

docs/inspect-provider.md covers the lifecycle, custom scorers over the traffic record, cleanup and troubleshooting. It also states which tools run at the model provider rather than in the sandbox, which the allowlist cannot bound. examples/claude_code_task.py is a runnable Claude Code task. examples/containment_smoke.py needs no model API key: inspect eval containment_smoke.py --model mockllm/model boots one sandbox, reaches for an allowed host and a refused one, and grades what left. The sandbox itself lives in the agent-glovebox repository, whose SECURITY.md states the threat model and what each layer does not stop.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inspect_glovebox-0.4.2.tar.gz (212.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inspect_glovebox-0.4.2-py3-none-any.whl (235.0 kB view details)

Uploaded Python 3

File details

Details for the file inspect_glovebox-0.4.2.tar.gz.

File metadata

  • Download URL: inspect_glovebox-0.4.2.tar.gz
  • Upload date:
  • Size: 212.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for inspect_glovebox-0.4.2.tar.gz
Algorithm Hash digest
SHA256 b8e73157a1e6cb70abc0f6006cff1f207c3487866ddfcfb41850210a1683caf0
MD5 639a4e3d8690eaf81c39251d25493c8e
BLAKE2b-256 dbf74a56a2d555f48e9799519f16d99e52945a6d36ca5fe2b2c3a074b758f78f

See more details on using hashes here.

File details

Details for the file inspect_glovebox-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: inspect_glovebox-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 235.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for inspect_glovebox-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 de169b327cdd1d1a9d839ba76b23146d703cb05111fa6f470f84fbe5912da0d4
MD5 a6bef0b25a4fd9cc61d431002877781b
BLAKE2b-256 955cdc20f95631712a223fbe4d65059f0504dadf6dee310112a35fc09f0378aa

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 files

0.4.1

2 files

0.4.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page