Choose The Primitive
| Goal | Start With | Why |
|---|---|---|
| Run code or install dependencies in a clean VM | Machines | Machines are the runtime boundary for commands, files, networking, desktop, and lifecycle. |
| Execute commands, stream logs, or manage processes | Commands | Commands are the process API inside a machine. |
| Read, write, upload, download, or search files | Filesystem | Filesystem APIs are for machine-local paths such as /workspace. |
| Run notebook-style code with structured results | Code Interpreter | Code Interpreter adds stateful cells, artifacts, and language contexts. |
| Automate a browser or GUI app | Desktop Environments | Desktop machines expose screenshots, input, windows, clipboard, viewer sessions, and recordings. |
| Avoid repeating setup on every machine create | Templates | Templates turn setup steps or images into reusable machine environments. |
| Persist shared files outside VM memory | Volumes | Volumes are durable filesystems that can mount into one or more machines. |
| Expose an HTTP or WebSocket service | Networking | Preview URLs and WebSockets route traffic to services inside machines. |
| Track long-running work and lifecycle state | Observability | Lifecycle events, webhooks, and monitor streams show what changed and why. |
Common Workflows
| Workflow | Path |
|---|---|
| Create a machine, run a command, read a file, then destroy it | Machines -> Commands -> Filesystem |
| Start a web app and share it with a signed URL | Commands -> Preview URLs |
| Build a reusable Python or Node environment | Templates -> Template build -> Logging |
| Keep generated data across machine lifetimes | Volumes -> Mounting volumes |
| Let an agent use a browser or desktop app | Desktop automation -> Managed viewer |
| Debug a retained or long-running machine | Monitor -> PTY or SSH |
First Working Shape
Most Build workflows start with a machine and then opt into the primitives they need:Build Areas
Machines
Create isolated runtimes and choose lifecycle behavior.
Commands
Run foreground, streaming, and background work.
Filesystem
Move data in and out of machine paths.
Networking
Expose services and connect over HTTP, WebSockets, or SSH.
Templates
Build reusable environments for faster starts.
Volumes
Persist and share files outside VM memory.
Desktop Environments
Automate GUI workflows and supervise them in a viewer.
Observability
Subscribe to lifecycle events, webhooks, and metrics.