Skip to content

Concepts

Computers and templates

A computer is one isolated desktop on your workspace's worker host. A template says what it starts from.

Computers

A computer (an Env in the SDK, a slot in the HTTP API) is one running desktop: the OSWorld Ubuntu image's GNOME session on display :0, restored from a checkpoint, in its own namespaces and cgroup on your workspace's worker host. You create computers from the SDK or the HTTP API with an API key, or from the console under Computers > Launch computer. Both kinds appear in the console with the same id.

PropertyValue
Operating systemLinux: the OSWorld Ubuntu image (the only launch target)
Screen1920 x 1080, 24-bit, origin (0, 0) at the top left, coordinates in pixels
Size4 vCPU and 4 GiB of memory per desktop, no swap (cgroup limits); one size per host
Useruser (uid 1000), home /home/user, not an administrator: sudo, su and pkexec refuse
Networknone from inside the desktop: loopback only, no DNS
Lifetimeevery computer has one: the workspace default (3600 s unless changed) or the ttl you pass, capped at the workspace maximum (14400 s by default)
Idle timeoutclosed after 1800 s with no request naming it (never longer than its lifetime)

Inside a desktop, nproc and free report the host's CPUs and memory, not the desktop's: the per-desktop view of /proc is an opt-in runtime feature that is not enabled on the current host. The cgroup limits above are what apply.

States

The console shows the state the runtime reports, never an optimistic one. The SDK and HTTP API report the runtime's own record:

Runtime stateConsoleMeaning
creatingStartingThe restore is running
readyReady (In use when a console run drives it)Up; the current episode may still be pending for a few seconds
capturingIn useA save or fork is capturing its state
resettingRecoveringA reset is running
downFailedA restore failed before the desktop ran, or a quarantined computer was released. reset() tries again
quarantinedFailedA gate failed or you quarantined it. Its state is not trusted; steps are refused
destroyingDeletingBeing closed
destroyedDeletedClosed by you, by its lifetime or idle timeout, or by a spend cap. Records are kept

The console also shows states that exist before a desktop does (Requested, Queued) and No heartbeat when the host stopped reporting.

Episodes

Each create, reset and fork child starts a new episode (env.episode counts them). An episode is what a reward belongs to: verify() scores the current episode, and the episode's gate report says whether that reward can be used. See Tasks and verifiers.

Actions

env.step(action) (HTTP POST /v1/slots/{id}/step) runs one action inside the desktop as user:

ActionFormWhat runs
pyautogui"pyautogui.click(100, 200)" or {"type": "pyautogui", "code": "..."}Python with OSWorld's prefix (import pyautogui; import time, failsafe off). At most 16384 characters.
execute{"type": "execute", "command": ["ls", "-l"]} or {"type": "execute", "command": "ls ~/Desktop", "shell": true}A command; waits for it and returns its output and exit code
launch{"type": "launch", "command": ["gedit"]}Starts a command and returns at once
sleep{"type": "sleep", "seconds": 2}Waits on the host, at most 60 s
Python
import drums

with drums.connect() as client:
    with client.create(ttl=600) as env:
        env.step("pyautogui.moveTo(960, 540)")
        r = env.step({"type": "execute", "command": ["ls", "/home/user"]})
        print(r.result["returncode"], r.result["output"].split())
        r = env.step({"type": "execute", "shell": True, "command": "test -d /nope"},
                     check=False)
        print("exit code", r.result["returncode"])

An action that exits non-zero raises ActionFailed unless you pass check=False. If you train a GUI agent, do not give the policy execute: it is a shell and can solve file tasks without touching the GUI. Use it from your own harness for setup and probes.

Observations

env.screenshot() returns PNG bytes (1920 x 1080, 8-bit RGB, about 1.7 MB). env.observe() returns an Observation with .png, .width, .height and .meta (episode, state, verdict, task id, instruction, steps). Resize in your code if your model wants a smaller image.

Templates

A template is a reproducible launch definition. Each published version is an immutable manifest pinned to one image digest:

FieldMeaning
base_checkpointThe image computers restore from, e.g. osworld-ubuntu
image_digestsha256: of the desktop image; a version launches only on hosts whose image matches
expected_state_hashThe file-system hash the state_hash gate checks after every restore
provenanceHashes of the runtime sources and image inspection the checkpoint was made with
resource_config{vcpus, memory_mib, swap_mib}
setupAn optional OSWorld setup recipe replayed on each launch
manifest_hashsha256 of the canonical manifest; the gateway recomputes it before every launch and refuses a mismatch

Every workspace sees the platform template OSWorld Ubuntu (base checkpoint osworld-ubuntu, 4 vCPU, 4096 MiB, no swap). Owners and admins can create workspace templates under Templates and publish a draft version; a published version cannot change. Through the API you choose a template by its base checkpoint name (image="osworld-ubuntu"); GET /v1/checkpoints and client.images() list what your workspace may launch on its host.

Console actions

ActionWhoNotes
LaunchAny memberName, template version, lifetime (presets up to the workspace maximum), labels
RestartThe computer's owner, admins, ownersResets to the launch state (a new episode)
SnapshotAny memberSee Checkpoints, snapshots and forks
ForkAny membern copies, limited by the host and your live-computer limit
TerminateThe computer's owner, admins, ownersIdempotent; measured cost stops
StopNot supported: a desktop cannot be paused and resumed. Terminate ends it; a snapshot keeps its state