Skip to main content
Sandbox provides a full Linux compute environment for running complex workloads. Install packages, use system tools, and execute long-running processes.

Key Features

  • Full Linux Environment - Ubuntu with bash shell
  • Package Management - pip (Python), npm (Node.js)
  • System Tools - curl, wget, git, ffmpeg, imagemagick, and more
  • Persistent Session - Files persist within same session
  • Higher Limits - 5-minute default timeout, up to 12GB memory

How to Enable

For Agents

  1. Agents > Select Agent > Settings > Capabilities
  2. Attach Sandbox

For MCP Gateways

  1. Gateways > Select Gateway > Capabilities
  2. Attach Sandbox

Usage Examples

Install and Use Package

Process Images

Complex Data Pipeline

Environment Details

Available Languages

  • Python 3.11 - Full stdlib + pip
  • Node.js 20 - npm/yarn support
  • Bash/Shell - Full command line access
  • Other tools - git, curl, wget, ffmpeg, etc.

Size Tiers

Storage

  • Session-scoped - Data deleted after session ends
  • Files capability - Persistent storage (separate)

Resource Limits

Difference from Code Runner

Use Code Runner for: Quick calculations, simple tasks Use Sandbox for: Package installation, heavy computation, external tools

Common Use Cases

Data Processing

Web Scraping

Image/Video Processing

Database Operations

Cost

For current pricing details, see Pricing. Monitor in Account > Usage dashboard.

Best Practices

Install Strategically

Only install packages you need:

Set Resource Limits

Prevent runaway processes:

Use Virtual Environments

Avoid conflicts with environment setup:

Monitor Output

Keep track of what’s happening:

Troubleshooting

Session Timeout

Command exceeded timeout (5 min default, 30 min max). Break into smaller tasks or optimize code.

Out of Memory

Exceeded memory for your size tier. Scale up or process in batches.

Package Installation Fails

  • Check package name is correct
  • Ensure compatible Python/Node version
  • Try installing dependencies separately

File Not Found

Session storage is temporary. Use Files capability for persistent storage.

Next Steps