verifiers icon indicating copy to clipboard operation
verifiers copied to clipboard

Add local sandbox backend support in v1 Harness API, similar to OpenSandbox, to better utilize CPU resources on On-Demand GPU nodes

Open Alex-Shan opened this issue 5 months ago • 0 comments

Hi Prime Intellect team,

First of all, thank you for building and open-sourcing verifiers. The new v1 Taskset/Harness API looks like a very promising direction for making RL environments more modular and reusable.

I would like to ask whether you would consider adding support for a local sandbox backend in the v1 API, similar in spirit to projects like OpenSandbox.

From the current docs, SandboxEnv, PythonEnv, CliAgentEnv, OpenEnv integration, and related sandbox functionality appear to be primarily configured around Prime Sandboxes / remote sandbox infrastructure. This makes sense for hosted and reproducible execution, but there is one practical issue when using Prime Intellect On-Demand GPUs:

When renting On-Demand GPU machines on primeintellect.ai, the rented instances often come with substantial CPU resources. During RL training or large-scale evals, these CPUs can be significantly underutilized if all environment-side execution, code evaluation, tests, shell commands, or agent workspaces are delegated to remote sandboxes. In this setup, the GPU node pays for CPU capacity that is not fully used, while environment execution also incurs additional remote sandbox latency and infrastructure overhead.

Would it be possible to support a configurable local sandbox provider in v1, for example as a Harness-level backend option?

A possible user-facing configuration could look conceptually like:

[env.harness.sandbox]
backend = "local"
runtime = "docker" # or "podman", "nsjail", etc.
cpu_cores = 8
memory_gb = 16
disk_size_gb = 50
network = "disabled"
timeout_minutes = 30

or:

[env.harness.sandbox]
backend = "prime" # current remote behavior

This would make it possible to choose between:

  1. Remote Prime Sandboxes
    Good for managed execution, reproducibility, isolation, and hosted workflows.

  2. Local sandbox backend
    Good for self-managed training/evaluation on rented GPU nodes where local CPU resources would otherwise be wasted.

Potential benefits:

  • Better utilization of CPU resources on On-Demand GPU machines.
  • Lower latency for tool calls, code execution, test runs, and agent workflows.
  • Reduced dependence on remote sandbox availability for self-managed runs.
  • More flexible deployment for users running prime-rl or evals on their own rented infrastructure.
  • A cleaner abstraction in v1 where the Harness owns the execution backend and sandbox provider.

I understand that local sandboxing has security and reproducibility trade-offs, especially compared with managed Prime Sandboxes. However, even an experimental or opt-in local backend would be very useful for users who control the training machine and are willing to accept those trade-offs.

Some implementation directions might be:

  • Define a common sandbox provider interface used by v1 Harnesses.
  • Keep Prime Sandboxes as the default provider.
  • Add a local provider backed by Docker/Podman or another isolation runtime.
  • Allow SandboxEnv, CliAgentEnv, OpenEnv-style environments, and future v1 Harnesses to select the provider via config.
  • Document the security limitations of local execution clearly.

Is local sandbox support something that is planned or aligned with the v1 roadmap? If not, would the maintainers be open to a community contribution in this direction?

Thanks again for the great work. I think this would make verifiers much more efficient for users training on Prime Intellect On-Demand GPU instances, where unused CPU capacity is otherwise a major waste.

Alex-Shan avatar Jun 10 '26 15:06 Alex-Shan