{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "perplexityai-space--run-agent-code-in-isolated-sandbox",
 "repo": "perplexityai/SPACE",
 "repo_url": "https://github.com/perplexityai/SPACE",
 "repo_slug": "perplexityai-space",
 "title": "Run agent-written code in an isolated sandbox",
 "page_title": "How to run agent-written code in an isolated sandbox with SPACE",
 "summary": "Create a sandbox, run a command in it, and collect its output over the HTTP API.",
 "who": "A developer building an AI agent that generates and runs code, and needs each run kept apart from the host and other users.",
 "problem": "Running model-written code directly on your application server risks side effects, leaked files, and shared state between runs.",
 "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": [
  "Follow [Installation and configuration](docs/installation.md) to deploy SPACE in a local Kind cluster and authenticate.",
  "Follow [Your first sandbox](docs/first-sandbox.md) to create a sandbox from a template and wait for readiness.",
  "Create a command session, attach to it to start the process, and read the output and exit result.",
  "Delete the sandbox when the run finishes."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "2 hours",
 "basis": "readme",
 "caveat": "The README describes a Kubernetes-based local setup, so you need a working Kind cluster before the first sandbox can run.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "A host that meets the prerequisites in docs/installation.md",
  "Docker-compatible local setup for a Kind cluster, as described in docs/installation.md",
  "Bash for installation and cluster diagnostics",
  "Git and Python 3.11+ and mdBook 0.4.52 only if you build the docs locally"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/perplexityai-space/run-agent-code-in-isolated-sandbox/",
 "md": "https://dedupedai.com/use-cases/perplexityai-space/run-agent-code-in-isolated-sandbox/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/perplexityai-space--run-agent-code-in-isolated-sandbox.json",
 "api_version": "v1"
}
