Skip to main content
GravixLayer Sandbox provides secure, isolated cloud environments for executing Python and JavaScript code. Perfect for AI agents, data processing, and dynamic code execution workflows.
Public Preview: GravixLayer Sandbox is currently in public preview. Features are experimental and may have issues or break as ongoing updates continue.

What is GravixLayer Sandbox?

GravixLayer Sandbox creates isolated computing environments where you can:
  • Execute code safely in Python, JavaScript, and other languages
  • Run shell commands with full environment control
  • Manage files with upload, download, read, and write operations
  • Maintain persistent state across multiple executions

Key Features

Secure Isolation

Each sandbox runs in complete isolation with dedicated resources

Multi-Language Support

Execute Python, JavaScript, shell commands with full library support

Persistent State

Maintain variables, files, and execution context across API calls

File Management

Upload, download, read, write, and organize files within sandboxes

LLM Integration

Connect with LLMs to build code interpreters and autonomous agents

Quick Start

# Create sandbox
gravixlayer sandbox create --provider gravix --region eu-west-1

# Run code
gravixlayer sandbox code YOUR_SANDBOX_ID "print('Hello, GravixLayer!')"


# File operations
gravixlayer sandbox file write YOUR_SANDBOX_ID "/home/user/test.txt" "Hello World!"
gravixlayer sandbox file read YOUR_SANDBOX_ID "/home/user/test.txt"
Output:
Created sandbox: 550e8400-e29b-41d4-a716-446655440000
Hello, GravixLayer!
Hello World!

Available Templates

Python Base v1

  • Python 3.11 with data science libraries
  • 2 vCPU shared processing power
  • 1024MB RAM memory allocation
  • 1024MB disk storage

JavaScript Base v1

  • Node.js 20 LTS with popular packages
  • TypeScript support included
  • Same resource allocation as Python

Getting Started

Resource Limits

ResourceLimit
CPU2 vCPU (shared)
Memory1024MB RAM
Disk1024MB
Timeout300s (default, max 3600s)

Setup

pip install gravixlayer
export GRAVIXLAYER_API_KEY="your_api_key_here"