Skip to main content
Modal Computer Use gives Python applications a Linux desktop with screenshots, native input, browser control, commands, and artifacts. The desktop runs in a Modal Sandbox. A colocated Modal Function runs your model loop.

Quickstart

Create a desktop and run your first placed trajectory.

OpenAI

Connect the Responses API to the computer.

Anthropic

Connect the Messages API to the computer.

Write the model loop

Your application owns model calls and conversation state. Borrow the desktop once, then use computer.step() for each ordered action array.
Step validates the complete array before mutation, runs the actions in order, and returns the action results with an immediate screenshot. Your application decides when the target application is ready and whether the task succeeded.

Keep the trajectory close to the desktop

  1. Create the desktop once with an async owner.
  2. Send its session handle to a Function that declares the same supported region selector.
  3. Keep one borrow and one pooled client for the model loop.
  4. Release the borrow before the owner closes the desktop.
The quickstart shows the complete owner, Function, and cleanup flow.

Choose a guide

Install the SDK

Install the package and set up Modal credentials.

Control the browser

Open pages, inspect browser status, and choose an Image.

Deploy the application

Set placement, resources, ownership, and cleanup.

Browse the API

Find SDK entry points, namespaces, models, and daemon routes.
Modal Computer Use is independently maintained and uses Modal as its runtime.