What runs under the hood

Every backend is a native command, nothing more. The registry lives in backends.py — this table is generated from the same data.

region = -r/--region · monitor = -m/--monitor · display = --display · session "any" = works on both X11 and Wayland

From call to PNG

Positional arguments, a region object, and a temp file. That is the whole contract.

How one gets picked

In order, skipping anything that fails a step. A region request skips backends that cannot crop. Forcing --backend skips the search but still validates.

see the decision for yourself
$ screenagents --list-backendsok screencapture macOS built-in screencapture(1)ok grim Wayland grim (wlroots compositors)-- scrot X11 scrot (needs a x11 session (this is wayland))-- flameshot Flameshot (missing executable: flameshot)

Want it to fail loudly instead of fall back? --backend grim errors with the exact reason — see exit codes.