# AI use cases for SPACE (perplexityai/SPACE)

Repo: [perplexityai/SPACE](https://github.com/perplexityai/SPACE) | Use cases: 5 | Page: https://dedupedai.com/use-cases/perplexityai-space/

SPACE is a Rust sandbox platform that runs code in isolated Firecracker microVMs, controlled through an HTTP API.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run agent-written code in an isolated sandbox: https://dedupedai.com/use-cases/perplexityai-space/run-agent-code-in-isolated-sandbox/
- Point existing E2B Python SDK code at SPACE: https://dedupedai.com/use-cases/perplexityai-space/point-e2b-sdk-code-at-space/
- Build the SPACE guide and API docs on your machine: https://dedupedai.com/use-cases/perplexityai-space/build-spitfire-docs-locally/
- Rebuild and test SPACE changes with a Tilt loop: https://dedupedai.com/use-cases/perplexityai-space/iterate-on-space-with-tilt/
- Cut sandbox start time with warm pools and snapshots: https://dedupedai.com/use-cases/perplexityai-space/operate-warm-pools-and-snapshots/

## How to run agent-written code in an isolated sandbox with SPACE

Repo: [perplexityai/SPACE](https://github.com/perplexityai/SPACE) | Difficulty: Intermediate | Time: 2 hours | Basis: From the README

Create a sandbox, run a command in it, and collect its output over the HTTP API.

**Who it is for:** A developer building an AI agent that generates and runs code, and needs each run kept apart from the host and other users.

**The problem:** Running model-written code directly on your application server risks side effects, leaked files, and shared state between runs.

**The outcome:** Each run executes in its own Firecracker microVM sandbox, and your application receives the command output and exit result, then deletes the sandbox.

### Steps

1. Follow [Installation and configuration](docs/installation.md) to deploy SPACE in a local Kind cluster and authenticate.
2. Follow [Your first sandbox](docs/first-sandbox.md) to create a sandbox from a template and wait for readiness.
3. Create a command session, attach to it to start the process, and read the output and exit result.
4. Delete the sandbox when the run finishes.

### Prompt to paste into your agent

```text
Using the repo perplexityai/SPACE, follow docs/first-sandbox.md against a local deployment at <SPACE API URL> to run <command> in a new sandbox. Report the command output and exit result. Verify that the sandbox is deleted after the run.
```

### Caveat

The README describes a Kubernetes-based local setup, so you need a working Kind cluster before the first sandbox can run.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/perplexityai-space/run-agent-code-in-isolated-sandbox/

## How to point existing E2B Python SDK code at SPACE with SPACE

Repo: [perplexityai/SPACE](https://github.com/perplexityai/SPACE) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Use the E2B Compatibility Wrapper so E2B Python SDK scripts run on SPACE sandboxes.

**Who it is for:** A team with existing E2B Python SDK code that wants to move sandbox execution onto SPACE without rewriting the calling code.

**The problem:** Existing E2B-based scripts depend on a sandbox provider the team wants to replace or run in its own infrastructure.

**The outcome:** The same E2B Python SDK script runs against SPACE through the compatibility layer, within the behavior the guide lists as supported.

### Steps

1. Read [E2B Compatibility Wrapper](docs/ecw.md) to see the supported behavior and limitations.
2. Configure ECW as described in the guide.
3. Create a compatibility API key as described in the guide.
4. Run your E2B Python SDK script against the SPACE endpoint configured for ECW.

### Prompt to paste into your agent

```text
In the perplexityai/SPACE repo, follow docs/ecw.md to configure the E2B Compatibility Wrapper and create a compatibility API key. Run <path to E2B Python script> against it and report whether it completes. Verify that any call the guide lists as unsupported is not used by the script.
```

### Caveat

The README limits this path to the behavior documented in the ECW guide, so scripts that rely on other E2B features may not work.

Risk, credentials: The compatibility API key controls sandbox access, so keep it in a secret store and out of source code and logs.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/perplexityai-space/point-e2b-sdk-code-at-space/

## How to build the SPACE guide and API docs on your machine with SPACE

Repo: [perplexityai/SPACE](https://github.com/perplexityai/SPACE) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Build the mdBook guide and API reference locally and browse them in a browser.

**Who it is for:** A developer or operator who wants offline access to the SPACE guide and API reference, or who is editing the docs.

**The problem:** The hosted docs show the published version, not the local checkout you are working from.

**The outcome:** You get a local documentation site that combines the guide and API reference from your current checkout.

### Steps

1. Install mdBook 0.4.52 and the API build prerequisites listed in the README.
2. From a clean checkout, run `bash scripts/build-docs.sh`.
3. Run `python3 -m http.server 8000 --bind 127.0.0.1 --directory target/docs/site`.
4. Open http://127.0.0.1:8000 in a browser to view the combined site. (inferred, check the README)

### Prompt to paste into your agent

```text
In the perplexityai/SPACE checkout, install mdBook 0.4.52, run `bash scripts/build-docs.sh`, then serve target/docs/site on 127.0.0.1 port 8000. Report the build result, and verify that the page at http://127.0.0.1:8000 loads.
```

### Caveat

The build needs mdBook 0.4.52, Git, and Python 3.11+ installed before the script will run.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/perplexityai-space/build-spitfire-docs-locally/

## How to rebuild and test SPACE changes with a Tilt loop with SPACE

Repo: [perplexityai/SPACE](https://github.com/perplexityai/SPACE) | Difficulty: Advanced | Time: 3 hours | Basis: From the README

Run tilt up to rebuild affected images and roll workloads as you edit SPACE files.

**Who it is for:** A contributor changing SPACE services or templates who needs to see runtime behavior on a local Kind cluster.

**The problem:** Manually rebuilding images and redeploying the local cluster after every edit is slow and error-prone.

**The outcome:** Edits trigger rebuilds of affected images and rollouts of their workloads, and you check the change with the Kind smoke suites.

### Steps

1. Complete [local installation](docs/installation.md) so the Kind cluster is running.
2. Run `tilt up` from the repository root.
3. Edit files and let Tilt rebuild affected images and roll their workloads.
4. Run the [Kind smoke suites](infra/space/kind/README.md#smoke-test) to check runtime behavior.

### Prompt to paste into your agent

```text
In the perplexityai/SPACE repo, after local installation, run `tilt up` from the repository root, then run the Kind smoke suites described in infra/space/kind/README.md. Report which suites pass and fail. Verify that Tilt shows the workloads rolled after your edit.
```

### Caveat

The README points to the Kind runbook for topology and template builds, so expect to read that runbook before changing runtime components.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/perplexityai-space/iterate-on-space-with-tilt/

## How to cut sandbox start time with warm pools and snapshots with SPACE

Repo: [perplexityai/SPACE](https://github.com/perplexityai/SPACE) | Difficulty: Advanced | Time: 3 hours | Basis: From the README

Keep booted sandboxes ready or restore from a base snapshot to skip cold boots.

**Who it is for:** An operator running SPACE on Kubernetes or a single node who needs sandboxes to start quickly for interactive or agent workloads.

**The problem:** Cold boots of every new sandbox add latency to each create call.

**The outcome:** Creates reuse ready sandboxes from a warm pool or restore from a base snapshot, and you confirm the faster path with the operator CLI.

### Steps

1. Read [Warm pools](docs/warm-pools.md) and [Base snapshots](docs/base-snapshots.md) to choose the approach for your setup.
2. Run `space-admin-cli login` to authenticate the operator CLI.
3. Configure a warm pool or base snapshot as described in the guide.
4. Create a sandbox and check that the create path matches the guide.

### Prompt to paste into your agent

```text
In the perplexityai/SPACE repo, read docs/warm-pools.md and docs/base-snapshots.md, run `space-admin-cli login`, and configure a warm pool or base snapshot for <target node or cluster>. Report the configuration you applied and the create result. Verify that a new sandbox is created from the pool or snapshot as the guide describes.
```

### Caveat

The README says base snapshots run on a single node, so the snapshot path does not apply to a multi-node setup as written.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/perplexityai-space/operate-warm-pools-and-snapshots/
