How perplexityai/space works
SPACE is a service platform for running code in isolated Firecracker microVM sandboxes. The principal workflow is to create a sandbox from a template, wait for its asynchronous lifecycle operation to complete, create and attach a command session, then collect output over a separate data-plane connection; users can subsequently pause, suspend, wake, or delete the sandbox. The graph preserves the documented template-build, compatibility, and operator branches. Internal wiring is only partly evidenced by the excerpts, so edges describe documented product relationships rather than an inferred service-call chain.
Main entry points: src/main.rs HTTP API service · sandbox Sandbox lifecycle · src/main.rs Sandbox manager · public Public API routes
Components 18
API and control
- HTTP API service
crates/apps/api/svc/src/main.rs - Public API routes
crates/libs/api/src/routes/public - Sandbox lifecycle
crates/libs/api/src/controllers/sandbox - Lifecycle operations
crates/libs/api/src/public_operations.rs - E2B compatibility
crates/libs/api/src/routes/e2b
Sandbox runtime
- Data-plane service
crates/apps/data/plane/svc/src/main.rs - Node API service
crates/apps/node/api/svc/src/main.rs - Sandbox manager
crates/apps/sbx/mgr/svc/src/main.rs - Runtime manager
crates/apps/node/runtime/manager/svc/src/main.rs - Runtime supervisor
crates/apps/node/runtime/supervisor/svc/src/main.rs
Templates and builds
- Template API routes
crates/libs/api/src/routes/public/templates.rs - Template manager
crates/libs/template/mgr/src/db.rs - Build service
crates/apps/builder/svc/src/main.rs - Build CLI
crates/apps/builder/cli/src/main.rs
Operations
- Admin CLI
crates/apps/admin/cli/src/main.rs - Operator dashboard
ui/src/app/dashboard - Cluster controller
crates/apps/cluster/controller/svc/src/main.rs
Other components
- Application
Connections 17
- Application → HTTP API service: calls over HTTP
- HTTP API service → Public API routes: serves API
- Public API routes → Sandbox lifecycle: manages lifecycle
- Application → Template API routes: selects template
- Template API routes → Template manager: uses templates
- Application → Lifecycle operations: polls completion
- Application → Data-plane service: attaches session
- Application → Sandbox lifecycle: creates and controls
- Sandbox lifecycle → Node API service: coordinates execution
- Node API service → Sandbox manager: manages sandbox
- Sandbox manager → Runtime manager: runs sandbox
- Runtime manager → Runtime supervisor: supervises runtime
- Application → E2B compatibility: uses compatible API
- Build CLI → Build service: submits builds
- Admin CLI → HTTP API service: operates platform
- Operator dashboard → HTTP API service: manages resources
- Cluster controller → Sandbox manager: coordinates cluster