Skip to main content
Miles is RadixArk’s open-source framework for large-scale reinforcement learning and model post-training. It pairs SGLang for high-throughput rollout with Megatron-LM (or FSDP2 / torchtitan) for training, and ships connectors for agentic environments such as Harbor, HUD, NeMo Gym, OpenEnv and Verifiers. Novita Sandbox is listed as a sandbox provider in Miles. The current integration covers the experimental Harbor and OpenEnv recipes on Miles’ main branch. Training a tool-using agent means giving it somewhere to act: run a command, inspect a file, observe what happened, and try again. Miles coordinates the reinforcement learning workflow, and its environment connectors link agent interactions to tasks and feedback. Novita supplies the sandboxes where the supported tasks execute. The split is simple. The training stack handles model generation and policy updates, and the sandbox provides the task execution environment. You connect the two with the documented recipes instead of writing a provider integration of your own.

Supported paths

Prerequisites

  • A Novita account and API key. Set it as NOVITA_API_KEY, or point NOVITA_API_KEY_FILE at a file containing the key. The default lookup path is ~/.config/novita/api_key.
  • A working Miles installation with the model and GPU environment prepared, following the Miles installation guide. Selecting a sandbox backend is only one part of the setup. The full training command follows the Miles recipe.
  • For the OpenEnv path: a Terminal-Bench-2 task checkout and the OpenEnv tbench2_env client. See Hugging Face OpenEnv for how OpenEnv environments run on Novita Sandbox.
  • For the Harbor path: the harbor-miles-v0.20.0 branch of harbor-framework/harbor, installed with uv and the harbor[novita] extra. See Harbor Integration for the Novita side of the Harbor configuration.

Quickstart

OpenEnv

Run the following from the Miles repository. Replace the placeholder with your real key.
CLI
The novita extra installs novita-sandbox>=2.0.7. Setting OPENENV_SANDBOX_BACKEND=novita selects Novita as the provider. You can build the per-task templates ahead of time so the first training episode does not wait for the image build:
CLI
Start with a small task set and check that the environments come up before you commit GPU time to a longer run or build templates for every task.

Harbor

Install Harbor from the harbor-miles-v0.20.0 branch with the harbor[novita] extra, then launch with HARBOR_ENV_TYPE=novita:
CLI
Data preparation, model and GPU arguments, and network layout follow the Miles Harbor recipe.

Configuration

How it works

  • Deterministic templates. Each task’s template name is derived from the task ID plus a digest of the build recipe (base image, build commands, resources, build user and start command). Repeated episodes reuse the template. Editing the recipe produces a new template name instead of silently serving a stale one.
  • Per-episode sandboxes. Each episode starts a sandbox from the template, launches the env server as root, waits for its health endpoint on the sandbox’s public host, and kills the sandbox when the episode ends.
  • TTL with keepalive. Sandboxes are created with a bounded lifetime. A keepalive thread re-arms the TTL while the creating process is alive. If the caller is hard-killed, the sandbox is reclaimed within the TTL instead of running forever.
  • Concurrency and rate limits. Sandbox creation is bounded by a configurable concurrency limit, and rate-limit responses from the Novita API are retried.
Last modified on November 5, 2026