Quick Start
1
Install and set your key
2
Run an agent in a Novita sandbox
How It Works
Each run starts a fresh Novita sandbox, executes the code, and cleans up.NovitaSandbox implements the standard SandboxProtocol — start, stop, execute, run_command, read_file, write_file, list_files, get_status, cleanup, and reset — so it works anywhere the other cloud backends work.
Configuration
SandboxConfig.novita() sets sandbox_type="novita" and reuses the shared sandbox settings.
The sandbox honours the shared
resource_limits.timeout_seconds from SandboxConfig when creating the remote environment.
Use the Backend Directly
ImportNovitaSandbox when you want the isolated runtime without an Agent.
Best Practices
Set NOVITA_API_KEY before selecting the backend
Set NOVITA_API_KEY before selecting the backend
NovitaSandbox.is_available returns False when the key is missing, so start() fails fast with an install-and-key hint. Set the key in your environment or CI secrets.Install only the novita extra
Install only the novita extra
pip install "praisonai-sandbox[novita]" pulls novita-sandbox>=2.0.0 and nothing else — keep the dependency tree slim by avoiding [all].Prefer a cloud backend for untrusted code
Prefer a cloud backend for untrusted code
Novita runs code off your host, so it’s a safe default for code you don’t fully trust — unlike the local
subprocess backend.Let cleanup run
Let cleanup run
Each
execute auto-starts the sandbox; call cleanup() (or rely on the agent’s auto-cleanup) so remote sandboxes don’t linger.Related
Sandbox Backends
All cloud and local backends and how to choose between them
praisonai-sandbox Package
Standalone package and the full backend registry

