> ## Documentation Index
> Fetch the complete documentation index at: https://docs.novita.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Legacy SDKs & CLI

> [!WARNING]
>
> 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:

| Package | Last 1.x stable version | Last 1.x beta version |
| - | - | - |
| Python SDK | `novita-sandbox==1.0.5` | `novita-sandbox==1.2.5b2` |
| JavaScript/TypeScript SDK | `novita-sandbox@1.0.2` | `novita-sandbox@1.2.3b1` |
| CLI | `novita-sandbox-cli@1.0.4` | `novita-sandbox-cli@1.2.3b1` |

## Installation

### Install Legacy Stable SDK

```bash JavaScript & TypeScript icon="terminal" theme={"system"}
npm i novita-sandbox@1.0.2
```

```bash Python icon="terminal" theme={"system"}
pip install novita-sandbox==1.0.5
```

### Install Legacy Stable CLI

```bash Bash icon="terminal" theme={"system"}
npm i -g novita-sandbox-cli@1.0.4
```

### Install Legacy Beta SDK

```bash JavaScript & TypeScript icon="terminal" theme={"system"}
npm i novita-sandbox@1.2.3b1
```

```bash Python icon="terminal" theme={"system"}
pip install novita-sandbox==1.2.5b2
```

### Install Legacy Beta CLI

```bash Bash icon="terminal" theme={"system"}
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 Bash icon="terminal" theme={"system"}
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.

```js JavaScript & TypeScript icon="js" theme={"system"}
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()
```

```python Python icon="python" theme={"system"}
from novita_sandbox.code_interpreter import Sandbox

sbx = Sandbox.create()
execution = sbx.commands.run('ls -l')
print(execution)

sbx.kill()
```

Below is an example showing how to use the Novita Sandbox CLI.

```bash Bash icon="terminal" theme={"system"}
# Authentication in CLI
novita auth login

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

# List sandboxes
novita sandbox list

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.