Dory is in development. The invite-only beta has not opened yet; prices and limits are planned and may change.

Python SDK

The computeengines package is the Python SDK and also installs the cec command line. It needs Python 3.10 or later and is licensed Apache-2.0. It uses httpx for HTTP and websockets for streams.

Status. Not installable yet; available when the beta opens. (pip install computeengines will work then.) See Status.

Configuration

Client(api_key=None, api_url=None) and AsyncClient use explicit arguments or the CE_API_KEY and CE_API_URL environment variables. They never load dotenv files or credential files. The default control endpoint is https://api.agents.computeengines.com/v1. Use with Client() or async with AsyncClient() to close connections. The async client has the same snake_case names; await calls and use async iteration for streams and events.

from computeengines import Client

with Client() as client:
    print(client.billing.balance())
    computer = client.computers.create(size="ac-2", name="example")
    print(computer.exec("uname -sr").stdout)
    computer.pause()
    computer.resume()
    computer.delete()

Waiting and recovery

create, start, resume and restart wait until the computer is running and ready; pause and stop wait for their final states. The default local waiter budget is 600 seconds including retries, configurable with wait_timeout_seconds. A timeout does not cancel the operation or stop billing. Errors keep the computer ID, operation ID and idempotency key so that you can recover. delete returns when the request is accepted, not when the computer is purged.

Cancellation re-raises the original asyncio.CancelledError with computer_id, operation_id and idempotency_key attributes. The SDK's own deadline raises WaitTimeout with the same attributes. A settled final-state mismatch raises ApiError immediately rather than timing out.

Commands, processes and streams

computer.exec(command) returns an ExecResult even for a non-zero remote exit code. Pass an explicit idempotency_key for deduplication; a replay returns ProcessReplay, not invented output. processes.start(command_or_argv) returns ProcessStarted; processes.get(proc_id) gives status, output, stdin, signal, kill and wait. exec_stream returns a closeable iterator with the process metadata. Closing any stream never kills the process. Save per-stream byte offsets and reattach explicitly after StreamDisconnected; OutputGap and OutputExpired are never skipped silently.

Retries and tokens

Control POST and PATCH requests get an idempotency key generated once per call and kept across retries. Control 429 and 503 responses are retried only with Retry-After. Data API retries need CE-Not-Forwarded, except keyed exec and process requests, which may retry ambiguous network failures using the original key and an identical payload. Data API keys are never generated for you. max_retry_after_seconds (default 60) bounds how long the client will wait. Access tokens are cached per computer and scope and refreshed at least 60 seconds before they expire. Credential fields are omitted from model str and repr; do not log credential model dumps.

Other resources

  • computer.pty() creates a terminal handle; connect() and reconnect on it, close() closes only the socket, delete() ends the session.
  • desktop.viewer() returns a session result, not connected exclusive control. Use desktop.control() and desktop.sessions.delete(id) for explicit handoff.
  • browser.cdp_url() returns the server URL; optional connect_playwright(browser_type) accepts your existing Playwright Chromium object without adding a Playwright dependency.
  • PermissionDenied distinguishes guest Unix access refusals from authentication or key errors. SecretAlreadyReturned.replay keeps the redacted response model.
  • Adapters for model providers are in computeengines.adapters.anthropic and computeengines.adapters.openai; see Computer use with Claude and Computer use with OpenAI models.

Every operation in the API reference has a matching method; the command line is on the CLI page.

Dory is in development; these pages describe the planned service and may change. Questions: support@computeengines.com.