Machines must be available in your workspace. Contact support if the compute tools are unavailable.
Creating a machine
Callcreate_machine with the parameters that fit your task. Choose the smallest size and shortest TTL window that will realistically cover the work: you can stop early and the unused time is returned to your org’s allowance.
Machines are billed per second from the moment they are ready until they stop. The TTL window is reserved from your organization’s allowance; stopping the machine early returns the remainder.
Machine lifecycle
1
Provisioning
The machine is provisioned and the OS is initializing. Call
get_machine to poll status until it reaches ready.2
Ready
The machine is up and accepting commands. Call
run_command to start work. Commands do not change its lifecycle state to running.3
Archiving and archived
After a stop request or auto-stop, the machine moves through
archiving to archived. The disk snapshot is retained, and unused usage reservations are released. Call resume_machine to bring it back from the snapshot.4
Error
A provisioning or lifecycle operation failed. Check
last_error before retrying. An existing machine with a retained snapshot can be resumed when the failure is resolved.5
Deleted
delete_machine permanently removes the machine and all its snapshots. This action is irreversible and requires the compute:admin scope.Running commands
Userun_command to execute shell commands on a ready machine. The tool returns exit_code, separate stdout and stderr, and timed_out.
& and redirect output to a file), then use subsequent run_command calls to read the log file and check for completion.
Exposing ports publicly
If the machine runs a web server or any other network service,host_machine_port gives it a stable public HTTPS URL that routes to the specified port:
public: true only when you intend to let anyone with the URL open it. The service must listen on 0.0.0.0. This is useful for letting teammates preview a result in a browser, or for allowing an external webhook to call back into the agent’s running service.
Stop and resume
Stopping a machine snapshots the disk and halts billing once the stop completes. The snapshot preserves files, but running processes must be restarted after resuming:Injecting credentials
Passinject_credential_ids when creating a machine to place vault credentials in its environment. Resuming uses the credential IDs already stored on the machine; it does not accept a new list. Injection requires vault:use and credentials shared with or owned by the agent and marked agent-readable. Values are omitted from the creation response but can be read by code running on the machine:
<NAME>_USERNAME and <NAME>_PASSWORD; API keys use <NAME>_API_KEY. The name is derived from the credential label. Access to an existing machine with injected credentials also requires the corresponding vault permissions. Use this pattern instead of passing secrets as command arguments or writing them to files.
Reading and writing files
Two tools let the agent transfer data between its local context and the machine’s file system:read_machine_file: read a file as text or base64-encoded bytes (requirescompute:read)write_machine_file: create or replace a file on the machine (requirescompute:run)
Desktop access
For machines running a graphical environment,get_machine_desktop returns a short-lived access URL that opens the desktop in a browser. This requires compute:admin. Compute Scale is needed for large machines or extended run windows, not for desktop access itself.
Billing
Machine time is settled from actual usage and pooled across your organization. Seconds are weighted by size: small uses 0.5, default uses 1, and large uses 2 units per wall-clock second. A stop request moves througharchiving to archived; check the resulting state and usage before assuming the stop has completed.
On Pro, additional time costs $0.06 per weighted machine-hour, paid from your prepaid balance. An owner can top up in **Billing & usage** in whole US dollars, with a $10 minimum. The balance never expires. Free Sandbox has no paid usage.
Required scopes
Next steps
Machines API reference
Browse the full MCP tool and REST endpoint reference for creating, running, and managing machines.