# SPACE

> Sandboxed Platform for Agentic Code Execution that runs agent and user code in isolated Firecracker microVMs through an HTTP API.

SPACE (Sandboxed Platform for Agentic Code Execution) is an open-source sandbox platform from Perplexity AI. Applications use its HTTP API to create isolated Linux environments in Firecracker microVMs, run commands, collect output, and manage sandbox lifecycles. It is licensed under Apache 2.0.

## What It Is

SPACE is a code-execution sandbox service for applications that need a separate environment for an agent, a user workspace, or a code-running job. The calling application decides what to run and what results to keep. SPACE manages the sandbox, its processes, and the connection carrying command output.

## How the Sandbox Workflow Works

A template supplies the starting environment, and a sandbox is an instance of it with its own VM and writable filesystem. Multiple commands can run in the same sandbox. The typical flow is:

- Create a sandbox from a template and wait for readiness.
- Create a command session and attach to it to start the process.
- Read output and the exit result.
- Keep, pause, or suspend the sandbox, then wake it when needed.
- Delete the sandbox.

Lifecycle changes are asynchronous: the API returns an operation ID that clients poll. Command output uses a separate data-plane connection with a session-scoped attachment token.

## Deployment and Operations

The documentation covers deploying SPACE in a local Kind cluster, and the architecture guide explains how it can run without Kubernetes. An operator CLI handles login, nodes, warm pools, and system-template builds. Warm pools keep booted sandboxes ready so creates skip a cold boot, and base snapshots restore sandboxes on a single node. Operator egress profiles configure network policy additions.

## API and Compatibility

SPACE is implemented in Rust, but applications interact over HTTP and server-sent events, so no Rust library needs to be embedded. It serves a generated OpenAPI reference, and some incubating operations such as snapshots, checkpoint, and rollback are hidden unless enabled for an organization. An E2B Compatibility Wrapper lets the tested E2B Python SDK be used against SPACE.

## Features
- Isolated Firecracker microVM sandboxes
- HTTP API and server-sent events for output streaming
- Template-based sandbox creation
- Command sessions with output and exit result
- Pause, suspend, and wake lifecycle controls
- Asynchronous operations with pollable operation IDs
- Warm pools to skip cold boots
- Base snapshots
- Operator CLI
- Operator egress profiles
- E2B Compatibility Wrapper
- Kubernetes deployment with local Kind setup

## Integrations
Kubernetes, Kind, E2B Python SDK, Firecracker, Tilt

## Platforms
API, CLI, LINUX

## Pricing
Open Source

## Links
- Website: https://github.com/perplexityai/SPACE
- Documentation: https://space.docs.perplexity.ai/guide/index.html
- Repository: https://github.com/perplexityai/SPACE
- EveryDev.ai: https://www.everydev.ai/tools/space
