SuperAPI AI Directory

SPACE

SPACE (Sandboxed Platform for Agentic Code Execution) is an open-source sandbox platform from Perplexity AI for running code in isolated Firecracker microVMs. It provides an HTTP API that allows applications to create Linux environments, execute commands, collect output, and manage sandbox lifecycles. It is suitable for scenarios that require an independent execution environment for agents, user workspaces, or code-running tasks. SPACE is implemented in Rust, but interacts with applications via HTTP and Server-Sent Events (SSE), with no need to embed the Rust library. The platform supports templates that define the initial environment; a sandbox is an instance of a template, has its own independent VM and writable filesystem, and can run multiple commands within the same sandbox. Sandbox lifecycle changes occur asynchronously, and the API returns an operation ID for polling; command output is transmitted over a separate data-plane connection and session-level attachment token. The project uses the Apache 2.0 license.

Open website

About this tool

SPACE (Sandboxed Platform for Agentic Code Execution) is a sandbox platform designed to provide isolated execution environments for agent and user code. It is based on Firecracker microVM technology, ensuring that code runs in a securely isolated Linux environment.

Purpose

SPACE is mainly used in scenarios that require independent execution environments, such as: providing a code execution sandbox for AI agents, creating user workspaces, running code tasks, and so on. Applications interact with SPACE through the HTTP API and decide what code to run and which results to retain, while SPACE is responsible for managing sandboxes, processes, and the connections that transmit command output.

Main capabilities

  • Sandbox management: Create, manage, and destroy sandboxes through the HTTP API. A sandbox is an instance of a template; each sandbox has its own independent VM and writable filesystem, and supports running multiple commands within the same sandbox.
  • Asynchronous lifecycle: Sandbox lifecycle changes (such as creation, start, and stop) are asynchronous operations; the API returns an operation ID, and applications can poll to obtain the completion status.
  • Command execution and output streaming: Supports executing commands in a sandbox and streaming command output over a separate data-plane connection and session-level attachment token.
  • Templates: Templates define the initial environment of a sandbox, and applications can quickly create sandbox instances based on templates.
  • API documentation: Provides OpenAPI specification documents (/openapi-m1.json, etc.), including request fields, response schemas, and error information. Some incubating operations (such as snapshots, checkpoints, and rollbacks) are hidden by default and must be enabled at deployment time.

Usage

  1. Installation and configuration: Deploy SPACE in a local Kind cluster and perform authentication according to the official guide. The setup guide covers Kubernetes deployment, and the architecture guide also explains how to run SPACE without using Kubernetes.
  2. Create your first sandbox: Refer to the "Your first sandbox" tutorial to run commands and collect output. The example uses standard-library-only Python code to interact with SPACE over HTTP.
  3. Build the documentation locally: Install mdBook 0.4.52 and the API build prerequisites, run the script to build the guide and API documentation, and then access it in a browser at http://127.0.0.1:8000 Browse. Building requires Git and Python 3.11+.
  4. Development loop: After local installation, the Tilt monitor keeps running and automatically rebuilds images and performs rolling updates to workloads when files change. Re-run up.sh to wait for the stack to stabilize; do not start a second tilt up.

Use Cases

  • AI agents need an environment to execute code safely.
  • Multi-user platforms need to provide an isolated workspace for each user.
  • Code-running services need to sandbox execution of user-submitted code.
  • Scenarios that require rapidly creating and destroying temporary Linux environments.

Limitations

  • Sandbox lifecycle operations are asynchronous and require polling the operation ID.
  • Some incubating features (such as snapshots, checkpoints, and rollback) are unavailable by default and must be enabled at deployment time.
  • Local development depends on a Kind cluster and Tilt, requiring some Kubernetes knowledge.
  • The project is implemented in Rust, but applications interact via HTTP and SSE and do not need a Rust library.
  • The documentation does not mention fees, pricing, or platform support information.