Skip to main content
This legacy page is kept for users who still use the 1.x or beta SDK line. New SDK 2.x integrations should follow the current Sandbox documentation.
This page lists the legacy Novita Agent Sandbox SDK and CLI versions for users who still need the 1.x stable or 1.x beta SDK line.

Legacy Novita SDK Versions

If you need to stay on the legacy 1.x SDK line, pin one of the following versions explicitly:
PackageLast 1.x stable versionLast 1.x beta version
Python SDKnovita-sandbox==1.0.5novita-sandbox==1.2.5b2
JavaScript/TypeScript SDKnovita-sandbox@1.0.2novita-sandbox@1.2.3b1
CLInovita-sandbox-cli@1.0.4novita-sandbox-cli@1.2.3b1

Installation

Install Legacy Stable SDK

npm i novita-sandbox@1.0.2

Install Legacy Stable CLI

npm i -g novita-sandbox-cli@1.0.4

Install Legacy Beta SDK

npm i novita-sandbox@1.2.3b1

Install Legacy Beta CLI

npm i -g novita-sandbox-cli@1.2.3b1

Setup Configuration

Legacy SDK versions use sandbox.novita.ai by default. You only need to configure your Novita API key.
Bash
export NOVITA_API_KEY="<Your Novita AI API Key>"

Examples

Below is an example showing how to create a sandbox through the SDK and run specified commands.
import { Sandbox } from 'novita-sandbox/code-interpreter'

const sbx = await Sandbox.create()
const execution = await sbx.commands.run('ls -l')
console.log(execution)

await sbx.kill()
Below is an example showing how to use the Novita Sandbox CLI.
# Authentication in CLI
novita-sandbox-cli auth login

# Start sandbox and connect to terminal
novita-sandbox-cli sandbox spawn <template-id>

# List sandboxes
novita-sandbox-cli sandbox list

# Shutdown running sandboxes
novita-sandbox-cli sandbox kill <sandbox-id>