nemo_gym.sandbox.harness_config
nemo_gym.sandbox.harness_config
The typed sandbox_config of a harness sandbox: the sandbox an agent’s harness runs in.
Module Contents
Classes
API
Bases: SandboxConfig
SandboxConfig for a harness sandbox, whichever server owns it.
The owner is the server that starts it and stops it: an Environment Server that starts one for an attempt and
lends it, or an agent that starts its own because nothing was lent. A lent sandbox is borrowed instead, with
borrow() from nemo_gym.server_runtime.
A server takes the image, working directory and files of a task sandbox from its task. A harness sandbox has no task to take them from, so they are configured here, with the keys agent recipes set today.
Its network rule replaces an agent’s own network_access: an agent that adopts this config refuses the two
set together, so a sandbox never has two egress settings.
A recipe’s other SandboxSpec keys, such as sidecars, are refused here; an agent that moves onto this
config with recipes that set them warns about them for one release first.
Cap tool parallelism to resources.cpu in the sandbox’s environment. Off by default, as
in most agents today. The OpenCode and Pi sandboxed agents turn the caps on in their code rather than in
a recipe, so a subclass of this config for either defaults it to True.
The command the sandbox’s container runs, when the image’s own does not keep it alive.
Files to place in the sandbox at start, by absolute path.
The sandbox image.
The ports the sandbox exposes.
The user commands run as, when not the image’s default.
The working directory the harness runs in.
The spec of the harness sandbox, with this config’s image, workdir, files, entrypoint, user and ports.
image and workdir override the config’s, and files add to its files. The CPU caps go under the
config’s env, so a recipe’s own value wins.