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

# Fermion Sandbox

> Secure, isolated cloud sandboxes for executing untrusted code safely.

## Secure Code Execution in Isolated Containers

Fermion Sandbox sandbox runs inside a fully isolated Linux container with its own filesystem, process space, and network layer: ensuring total separation from the host system. Developers can launch, execute, and destroy sandboxes on demand.

You can run anything from Node.js scripts to full web servers, with real-time streaming of `stdout` and `stderr` through WebSockets. Fermion manages provisioning, teardown, and optional persistence automatically, allowing developers to focus on writing and executing code rather than managing infrastructure. Whether you’re building an AI code assistant, a browser-based IDE, or a real-time code evaluation platform, Fermion Sandbox makes it seamless and safe.

### Quick Code Preview

<CodeGroup>
  ```typescript Typescript preview theme={null}
  import { Sandbox } from '@fermion-app/sandbox'

  const sandbox = new Sandbox({ apiKey: 'your-api-key' })
  await sandbox.create({ shouldBackupFilesystem: false })

  const result = await sandbox.runCommand({
  	cmd: 'node',
  	args: ['--version']
  })
  console.log(result.stdout) // v20.x.x

  await sandbox.disconnect()
  ```

  ```python Python preview theme={null}
  from fermion_sandbox import Sandbox

  # Initialize the Fermion SDK with your API key
  sandbox = Sandbox(api_key="your-api-key")

  # Create a new sandbox environment
  sandbox.create(should_backup_filesystem=False)

  # Run a simple command inside the sandbox (example: check Python version)
  result = sandbox.run_command(
      "cmd":"python3",
     	"args": ["--version"]
  )

  # Print the output from the command
  print(result.stdout)  # Expected output: Python 3.x.x

  # Disconnect and clean up the sandbox
  sandbox.disconnect()

  ```
</CodeGroup>

## Explore More

<Columns cols={2}>
  <Card title="Getting Started" href="/coding-sandbox/getting-started">
    Learn how to create, run, and manage your first sandbox in minutes.
  </Card>

  <Card title="Available Methods" href="/coding-sandbox/methods/initialization">
    Explore all available methods, and configuration options.
  </Card>
</Columns>
