> ## Documentation Index
> Fetch the complete documentation index at: https://modal-computer-use.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Namespace reference

> Find Python methods for Step, input, screenshots, artifacts, and daemon capabilities.

Sync and async clients use the same method names and result models. Add `await` when you use an async client.

## Run an action-to-observation step

Borrowed clients expose the stable model-loop method directly:

```python theme={"system"}
step = await computer.step(
    [
        {"type": "move", "x": 100, "y": 120},
        {"type": "click", "button": "left"},
    ],
    continue_on_error=False,
)
```

`step.actions` contains the ordered batch result. `step.screenshot` contains the immediate post-action frame. `step.timing` contains daemon timing.

## Desktop input and capture

| Namespace | Methods | Purpose |
| - | - | - |
| `mouse` | `click`, `move`, `drag`, `scroll`, `down`, `up`, `position` | Control and inspect the pointer |
| `keyboard` | `type`, `press`, `hotkey`, `hold`, `supported_keys` | Enter text and key input |
| `clipboard` | `get_text`, `set_text`, `clear` | Read and change clipboard text |
| `screenshots` | `full`, `full_bytes`, `region`, `region_bytes`, `zoom`, `zoom_bytes`, `zoom_around` | Capture semantic screenshots or raw bytes |
| `input` | `release_all` | Release held keys and mouse buttons |

The default inline `screenshots.full()` request uses the raw binary route and returns a byte-backed
`Screenshot`. Artifact and automatic storage use the structured JSON route and return a
`Screenshot`. See
[screenshot storage options](/build/screenshots-recordings#choose-screenshot-storage) and
[artifact retrieval](/build/artifacts-storage#read-a-screenshot-artifact).

## Ordered action primitives

| Method | Purpose |
| - | - |
| `actions.apply` | Apply one action |
| `actions.run` | Run one validated ordered batch without a trailing frame |
| `actions.validate` | Validate actions without mutation |
| `actions.run_and_screenshot_bytes` | Compatibility byte result for an action batch and trailing frame |
| `actions.run_and_observe_change_screenshot_bytes` | Experimental first-visual-change observation |

Use `computer.step()` in provider loops. Use `actions.run()` when the next observation is unnecessary.

## Desktop state

| Namespace | Methods | Purpose |
| - | - | - |
| `display` | `info` | Read display geometry and metadata |
| `windows` | `list`, `active`, `activate`, `close`, `wait_for` | Inspect and control X11 windows |
| `browser` | `open_url`, `status`, `render_metrics` | Control the configured browser |
| `apps` | `launch`, `open_artifact` | Start an application or open an artifact |
| `commands` | `run` | Run an explicit command vector |

`commands.run()` does not invoke a shell unless the command vector requests one.

## Artifacts and recordings

| Namespace | Methods | Purpose |
| - | - | - |
| `artifacts` | `list`, `read_bytes`, `write_bytes`, `download`, `upload`, `delete`, `manifest`, `sync` | Store files below the artifact root |
| `recordings` | `start`, `stop`, `list`, `get`, `download`, `delete` | Manage screen recordings |

Artifact paths reject traversal and symlink escapes.

## Runtime and diagnostics

| Namespace | Methods | Purpose |
| - | - | - |
| `lifecycle` | `start`, `stop`, `restart`, `status` | Control the desktop stack |
| `processes` | `status`, `restart`, `logs`, `stderr`, `errors` | Inspect supervised processes |
| `session` | `metadata`, `refresh`, `tunnel_authorize` | Read and refresh session access |
| `debug` | `urls`, `vnc_url` | Request explicit debug URLs |

Treat debug URLs as secrets. See [errors and models](/reference/errors-and-models) for result and recovery types.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.