or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

charts.mdcontexts.mdexecution.mdindex.mdresults.mdsandbox.md
tile.json

sandbox.mddocs/

Sandbox Management

Core sandbox functionality for creating and managing secure code execution environments in the cloud.

Capabilities

Sandbox Class

The main Sandbox class extends the base E2B sandbox with code interpreter functionality.

/**
 * E2B cloud sandbox for secure and isolated code execution
 * Extends the base sandbox from the e2b package with code interpreter functionality
 * Provides access to Linux OS, file operations, command execution, and code interpretation
 */
class Sandbox {
  /**
   * Default template identifier for code interpreter sandboxes
   */
  protected static readonly defaultTemplate: string; // 'code-interpreter-v1'
}

Usage Examples:

import { Sandbox } from "@e2b/code-interpreter";

// Create a basic sandbox
const sandbox = await Sandbox.create();

// Create a sandbox with custom options
const customSandbox = await Sandbox.create({
  timeoutMs: 120000, // 2 minutes
  apiKey: process.env.E2B_API_KEY
});

// Access sandbox ID
console.log(sandbox.sandboxId);

Inherited Base Functionality

The Sandbox class inherits all functionality from the base E2B SDK, including:

  • Static create method: static create(options?: any): Promise<Sandbox> (inherited from base e2b SDK)
  • File system operations (create, read, write, delete files and directories)
  • Command execution capabilities
  • Network access within the sandbox
  • Environment variable management
  • Process management
  • Terminal access

For complete base functionality, refer to the e2b package documentation.

Integration Notes

The code interpreter sandbox extends the base sandbox with:

  • Jupyter kernel integration for code execution
  • Multi-language support (Python, Deno/TypeScript, etc.)
  • Result streaming and formatting
  • Chart generation and visualization support
  • Stateful execution contexts