Computer use
Atomic can work in applications, not just edit code. Computer use can create a Blender scene, build a presentation, edit a video, operate a desktop app, or move work between applications. Browser and terminal automation cover related tasks with more direct controls. This guide explains tool selection, setup, and safe operation. To test a software change and attach the results to a PR, see Verification and evidence. Jump to application scripting, desktop automation, browser automation, terminal automation, or creative workflows. Platform setup: macOS, Linux, Windows.Choose the right tool
Start with the result you need, not the application you could click through. If a library, CLI, or supported API can produce that result directly, a short script is often simpler and more token-efficient than repeated screenshots and UI actions. Use computer use when the task needs visual judgment, a UI-only operation, or verification of the interface itself. Saving tokens is useful, but not at the expense of the requested behavior or output quality.
You can combine tools without driving the whole task through a desktop. Generate a presentation with
python-pptx, then inspect rendered slides for layout problems. Use Blender’s Python API to generate repeated objects, then agent-desktop for adjustments in the visible editor. Use browser DOM controls rather than desktop clicks for a web form. For a supported web-service operation that does not require browser interaction, an authorized API request may be enough.
Atomic’s skills supply operating instructions, not an installed desktop or automatic permission to control one. Load the agent-desktop, herdr, agent-browser, or tmux skill when applicable. Check the installed command’s help before using version-dependent options.
Herdr eligibility: the bundled Herdr skill requires an explicit user mention or request and an agent running inside a Herdr-managed pane with HERDR_ENV=1. Launch Atomic inside Herdr and ask it to use Herdr for terminal work. Do not set the variable manually to bypass the check or control a focused session from outside Herdr. If those conditions are not met, use a suitable fallback.
Prepare the session
For file-only automation, you need the input files, a suitable runtime, and an explicit output path, not a graphical desktop. Keep originals intact and work in a scratch directory. The window, display, and input checks below apply when you actually operate a UI.- Identify the host OS and the environment that owns the application. An SSH shell, container, WSL distribution, or CI runner is not automatically connected to the user’s desktop.
- Check installed tools, cached runtimes, and permissions. Install missing tools, including
agent-desktopand uv, when network access and permissions allow. Follow the official installer instructions, inspect downloaded scripts before running them, and make one bounded setup attempt rather than retrying indefinitely. For a desktop,agent-desktop statusreports the platform, permissions, and readable surfaces in one call. - Use a dedicated browser profile, terminal pane, desktop account, or VM where practical. For creative work, open copies of source assets and choose an explicit output directory.
- Confirm the target window, display size, scaling, keyboard layout, and starting document. Capture or inspect the current state before sending input.
- Define the stopping point. Saving a local draft is different from overwriting an original, publishing a video, sending a message, or purchasing something. Obtain any needed authorization before those actions.
Application scripting and APIs
Prefer direct file automation for structured tasks such as assembling slides, filling a document template, or formatting a spreadsheet. These jobs often need no running Office app, macros, or desktop access. Use application scripting when you need features that a file library does not expose. agent-desktop is useful for the remaining desktop interaction, not a required step in every automation.
Before writing a script, identify the input format, required features, output path, and library or app version. Read the relevant API reference rather than guessing methods. Start with a read-only query or a disposable copy. Save to a new path and reopen the result to check its contents; use a compatible viewer or renderer when appearance matters. Scripts still need the same authorization as UI actions to overwrite, upload, or publish files.
For scripts that operate an application, also identify the target app/version and object names. Read its API reference or scripting dictionary, and record which operations changed the document.
macOS recipe: create a draft with osascript
Open Script Editor and choose File > Open Dictionary to inspect an application’s supported commands, objects, and properties. Apple’s scripting terminology guide explains how to read the dictionary. App scripting addresses document objects directly;System Events UI scripting instead drives accessible interface controls and needs Accessibility permission.
Save this as create-note.applescript:
osascript -l JavaScript script.js; it uses Apple’s automation objects, not a browser DOM or Node.js APIs. Use whichever language fits the app’s documentation and existing scripts.
PowerPoint recipe: create a draft with python-pptx
Use python-pptx to assemble a.pptx directly instead of creating slides through desktop clicks or VBA. It runs on macOS, Linux, and Windows without PowerPoint or a graphical session.
Save this as create_deck.py in a scratch directory:
--no-project keeps this one-off task separate from an unrelated Python project. uv may download Python and dependencies on the first run. The script creates two slides and refuses to overwrite an existing output file. Choose a new filename for another draft.
This example uses the layouts and placeholder IDs in the library’s default template. For a branded deck, load a copy of your .pptx template with Presentation("template.pptx") and inspect its layouts and placeholders before adapting the script. Do not assume their indices match the default template. See working with presentations and using placeholders.
Reopen the saved deck to check slide count and text. Then view it in PowerPoint, LibreOffice Impress, or another compatible renderer to check clipping, fonts, and layout. python-pptx does not render slides or export PDF; use a compatible application for those steps. A successful save is not a visual check. If no renderer is available, hand off the draft and state that its appearance remains unchecked.
For similar file-based tasks, use python-docx for Word documents or openpyxl for Excel workbooks. Check feature support before editing a complex existing file. Use an app’s own API when a library cannot make the required change, rather than forcing a lossy conversion. If an approved task requires macros, inspect the code and follow the organization’s macro policy; never weaken security settings to run it.
Office recipe: format an Excel report with VBA
For a desktop workbook, use VBA to change specific ranges instead of sending a long sequence of clicks. Try this on a trusted copy of a workbook with a worksheet namedSummary and a report in A1:D20:
- Save the copy as an Excel Macro-Enabled Workbook,
.xlsm, if you want to retain the macro. - Open Developer > Visual Basic. In the copied workbook’s project, choose Insert > Module and paste the macro below. If Developer is hidden, enable that tab through Excel’s ribbon settings.
- Review the code and run
FormatSummarythrough Developer > Macros, subject to your organization’s macro policy. - Inspect the header, number formatting, and column widths. Save only the reviewed copy.
ThisWorkbook is the workbook containing the macro, not whichever workbook happens to be active. Put the macro in the copied report’s project, not a personal macro workbook. The example changes formatting only and does not save automatically. Its operations are documented in the Excel VBA reference.
For other jobs, address workbook, worksheet, slide, shape, or document objects explicitly. A recorded macro can help discover operations, but replace dependence on Selection, ActiveSheet, or ActivePresentation with references to the intended objects before reusing it. For presentations, use PowerPoint’s object model rather than treating Excel VBA as a universal Office API.
Never enable all macros, weaken Trust Center settings, or enable programmatic access to the VBA project just to inject code. If policy blocks the macro, use an approved mechanism or report the restriction. VBA in a document can access more than that document, so inspect unfamiliar macros before opening or running them. If a script changes application-wide settings such as events or alerts, restore their previous values on success and error; do not suppress prompts to force a save.
VBA support in desktop Excel, Word, and PowerPoint includes macOS, but Windows COM, ActiveX, and Win32-dependent code is not portable. Consult Microsoft’s Office for Mac guidance for sandbox and file-access differences. Saving as .xlsx cannot retain VBA; choose the output format deliberately.
Office Scripts, app runtimes, and file tools
For Excel on the web or a supported desktop installation with the Automate tab, consider Office Scripts. Record a small action or create a script there, then use theExcelScript workbook API for repeatable edits. These TypeScript scripts are not VBA and do not run as ordinary Node.js scripts. Check Office Scripts versus VBA for platform, licensing, and API differences. Creating a Power Automate flow can introduce scheduled runs and cloud access; do so only when that automation is part of the request.
Use an application’s own scripting runtime when it supplies the API. For example, Blender scripts normally run through Blender’s Python Console, Text Editor, or command line. A plain uv Python environment does not automatically have the running application’s bpy module or scene. With Blender on PATH, an existing input.blend, and a reviewed scene-script.py, a batch invocation is:
--python-exit-code 1 makes a script exception produce a nonzero process exit. The script must explicitly save or export any intended output to a new path; exiting successfully does not imply a saved scene. See the Blender Python quickstart and command-line reference. Use uv for external orchestration or file-processing scripts, and Blender’s runtime for Blender operations.
For file-only work, a library can avoid opening the application at all. Know what it preserves: openpyxl does not calculate Excel formulas, and a deck created with python-pptx still needs a layout check for clipping, fonts, and missing media. For video, FFmpeg can handle batch transforms while an editor’s own scripting API can retain timeline structure. Check installed API/version or edition limits before assuming an editor exposes scripting.
Combine these approaches only where they help. Generate content with a script, inspect it in a viewer, and use agent-desktop if it needs visual adjustments or UI-only export controls. You do not need a desktop interaction just to prove that a file script ran. If the task is specifically to verify a menu, dialog, or user flow, exercise that interface too; an API call is not proof that the GUI path works.
Desktop automation with agent-desktop
agent-desktop reads a desktop app’s accessibility tree as JSON and gives every element you can act on a ref. You act on a ref, read the UI again, and repeat. It is a tool that an agent calls, not an agent: it has no model inside, no GUI, and prints one JSON envelope per command. It runs on macOS, Windows and Linux, and it is Apache-2.0 licensed. A successful action does not prove the UI changed, so every step ends with a read: a fresh snapshot,get, or wait.
The bundled agent-desktop skill is a short guide to that loop and to installing the CLI. The detailed guides are compiled into the CLI, so they always match the version you run:
agent-desktop skills get desktop workflows for worked patterns or agent-desktop skills get linux troubleshooting. Every command prints a JSON envelope; the guide’s Markdown is in data.content.
Atomic uses the CLI in two ways. Choose by who decides the next action:
The rule of thumb: when a model chooses the next action, use the skill and one-shot commands; when TypeScript code owns the sequence and the postcondition, call the CLI from
ctx.tool. agent-desktop has no TypeScript SDK. Its CLI prints one JSON envelope per command, and that envelope is the contract. Before reaching for either, check whether agent-browser covers the target: websites and web apps in Chrome/Chromium, Mobile Safari in the iOS Simulator, Electron and other CDP-exposing apps, Slack, and cloud browsers. It is much cheaper than screenshot-driven computer use there. Use agent-desktop for native desktop apps, menus and menu bars, OS dialogs and permission prompts, work across apps, browser chrome and desktop browsers, and whenever agent-browser hits a limitation. Terminals stay with Herdr, falling back to tmux or psmux.
Atomic bundles the skill. You do not need npx skills add for it, and an installed copy can go stale when you upgrade the CLI. Do not link or copy another skill into ~/.agents/skills, ~/.claude/skills, or other agent directories, and leave any existing user-level skill alone.
Install if missing
Checkagent-desktop version. If the command is missing, make one bounded attempt to install it. It needs Node 18 or later:
-g, the command lands in ./node_modules/.bin and is not on PATH; use npx agent-desktop or install globally. The package carries the native executable and the helper each platform needs: agent-desktop-macos-helper on macOS and agent-desktop-linux-clipboard-owner on Linux. Windows needs none.
Its postinstall script replaces the Node launcher with a link to the native binary. If your package manager blocks install scripts, as npm 12 does by default, the Node launcher runs instead. It works, but every call starts Node first and costs more than 100 ms, and the launcher prints a one-time notice with the fix. Approve the script and reinstall:
agent-desktop version is older than expected, check which executable runs with command -v agent-desktop (PowerShell: Get-Command agent-desktop) and uninstall the old one with the package manager that installed it. Upgrade by running the npm install again.
Report what the install did. Never loop on it. In a workflow stage, a refused or failed install is reported as blocked/needs_human together with the exact command above, not worked around with an alternative tool.
agent-desktop’s documentation describes no telemetry or update check, so Atomic’s guidance sets no opt-out environment variable. Check the release notes when you upgrade.
Check readiness
A version string verifies the binary, not desktop access. Before the first action:data.permissions reports accessibility, automation, and screen_recording, each with a state such as granted, denied, unknown, or not_required. data.supported_surfaces lists the overlay kinds this OS can read (window, sheet, alert, menu, and on some platforms shell surfaces), and data.state_root is where sessions and traces live (~/.agent-desktop; the absolute path in AGENT_DESKTOP_HOME moves it). Then load the platform guide with agent-desktop skills get platform.
- macOS. Accessibility permission must be granted to the app that launches the command (Terminal, iTerm2, Warp, VS Code). Screen Recording is needed only for
screenshotand for session screenshot artifacts. Runagent-desktop permissionsto read the state andagent-desktop permissions --guideto open the right System Settings page with a panel that shows which app to add; the user confirms with Touch ID or a password. A new grant is seen by the next call, so the launching app does not need a restart. - Windows. No permission dialog exists. Run the command in the interactive desktop session of the signed-in user: Session 0 services, the UAC secure desktop, the sign-in screen, a locked desktop, and another user’s session are not supported. Windows blocks input from a non-elevated terminal into an elevated app (UIPI), so stop for the user or use an authorized non-elevated path rather than escalating just to force input through.
- Linux. Run the command inside the graphical session of the user who owns the apps, with a running AT-SPI bus, so the session bus, display, and runtime directory come from its environment. Ubuntu 24.04 or later is the supported base; other distributions need the at-spi2-core bridge fix noted in the platform guide. An empty
supported_surfacesmeans the bus did not answer. A TTY login, an SSH shell without the session variables, or a container without a bus sees no apps. X11 and Wayland sessions both work and differ in input, capture, and window control.
blocked/needs_human finding in a workflow stage. Report the exact fix from the list above and re-run agent-desktop status on resume. Let the user grant permissions; do not script around consent dialogs.
Drive an app from the shell
Load theagent-desktop skill and follow its loop. Map the app with a shallow skeleton, drill into the region you need, act on a ref, and verify. Refs are qualified with the snapshot that produced them and are valid for that snapshot only:
find --app "Notes" --role button --name "Save" --exact is cheaper than a snapshot when you know the role and name.
- Verify with a read. Use
wait, not a sleep, after an asynchronous step. A successful action reportsdata.disposition; retry or substitute an action only whendisposition.retryissafe, because any other delivery value means the action may have landed and a repeat can click or submit twice. Read the live state first. - Stale and ambiguous refs.
STALE_REFmeans the UI changed: snapshot again.AMBIGUOUS_TARGETmeans several elements match: narrow the target withfind --role --name --exactor--root. - Overlays. An action that opens a menu, sheet, or alert lists it in
data.surfaces. Snapshot that surface, not the window behind it. - Headless first. Ref actions use semantic accessibility calls and do not take focus, move the cursor, or use the clipboard. Add the global
--headedflag only when the user permits physical input such as double-click, hover, drag, or focus, and never to recover from a headless failure. Dangerous shortcuts such as quit and lock are refused without--force. - PowerShell. Quote every ref (
'@s8f3k2p9:e12'), because a bare@tokenis the splatting operator. - Sessions. For a multi-command run,
agent-desktop session start --name run-1returns a session id; pass it with--sessionorAGENT_DESKTOP_SESSIONon every command so refs and traces stay in your namespace, and end only your own session withagent-desktop session end <id>.agent-desktop batch '[...]'runs several commands in one process and is not a transaction. - Evidence. Keep the JSON results and save
agent-desktop screenshot --app "Notes" after.png; a session with tracing on can export an HTML timeline withagent-desktop trace export. A screenshot is evidence for you, not proof that an action worked. When the work ends in a PR, attach the before and after PNGs to the PR body (gh pr create --body-file body.md --attach 'before.png#Before' --attach 'after.png#After'on supported GitHub) next to the scenario they prove, and cite the JSON by name as a local artifact; see Verification and evidence.
agent-desktop launch "Obsidian" --cdp starts it fresh with a loopback-only debugging port and prints the port; agent-browser connect <port> then drives its pages (agent-browser skills get electron has the guide). The port exists only for a fresh process, so a running app must be closed first, which loses its state: ask before you do that. Keep the native menu bar, file dialogs and sheets, window management, notifications, screenshots, and any app you did not launch on agent-desktop. While the port is open, any local process of the same user can control the app’s web contents, so request --cdp only for the step that needs it; close-app ends the exposure.
Run a scenario from workflow code
When a custom workflow owns the scenario, call theagent-desktop CLI from inside ctx.tool so the observe, act, verify loop is a durable, replayable node. The workflow authoring guide has the runnable example; the summary is:
- Prerequisite.
agent-desktopon the host, installed by the steps above. The preflight below reports it missing as a limitation rather than installing during the run. - One process per command. Spawn
agent-desktop, parse the one JSON envelope it prints, and branch onok,error.code, anddisposition, never on message text. Forward thesignaland givectx.toola positive finitetimeoutMs. - Readiness preflight. A first
ctx.toolchecksagent-desktop versionandagent-desktop status, and callsctx.exit({ status: "blocked", reason })for a missing macOS permission, an absent Linux accessibility bus, or a missing install. - Loop.
snapshot(checkdata.complete) → resolve exactly one element withfind→ act on the ref →waitfor the postcondition → read it back. Re-drill after any UI change. - Result. Machine-readable
verified/refuted/blocked/unknown; the wrapper maps anything butverifiedto a nonzero outcome. An action whose delivery is notnot_delivered, or that times out before its response, isunknown, resolved by reading the state, never by replaying the mutation.
Coverage and limits
agent-desktop reads accessibility trees and acts through the operating system’s accessibility APIs. State these limits instead of working around them:- No pixel matching. It cannot see a UI that publishes no accessibility tree, such as a custom-drawn canvas, a game, or some remote-desktop windows. For those it can only take a
screenshotyou judge yourself and, with the user’s permission, send coordinate input (--headed mouse-click --xy X,Y). Say what stayed unverified. Prefer a ref whenever one exists. - No native iOS or Android support. agent-desktop has no Simulator or emulator support of its own. It treats the iOS Simulator and Android emulators as ordinary desktop windows and sees only what their accessibility trees expose, which may not include the simulated device’s UI. Use
xcrun simctl(includingsimctl io booted recordVideo), Appium with XCUITest, oradbwith UI Automator for native mobile apps, and report the gap when none is installed. For Mobile Safari, agent-browser’s iOS mode remains the route. - Browsers other than Chromium. Desktop Safari, Firefox, and other browsers expose whatever their accessibility trees publish. Web content there can be thin, so check with a snapshot, and use agent-browser for any page it can reach.
- Reserved input.
key-down,key-up,mouse-down, andmouse-upnever deliver input on any platform. Usepress,mouse-click, ordrag. - Per-platform differences. Which actions need
--headed, and what each OS refuses, is inagent-desktop skills get platform; read it before relying on a command.
Stay safe
One controller owns a desktop at a time. Use a dedicated session or account where practical, keep unrelated windows out of captures, and define an explicit stopping point before destructive or publishing actions such as overwriting an original, sending a message, or purchasing. After a timeout or interruption, inspect the current document and any output files before acting again; a save or export may have completed even if its acknowledgement was lost. Never disable OS security controls to make automation work.Browser automation with agent-browser
Prefer agent-browser for any target it can reach. Itssnapshot returns a compact text accessibility tree with @eN element refs, usually a few hundred tokens, so each step costs far less context than a screenshot-driven computer-use step, and actions land on real controls rather than screen coordinates. Anything outside the scope below, or a limitation you hit inside it, goes to agent-desktop. For data retrieval or batch operations, consider a supported API first when it meets the request and you have permission to use it.
What agent-browser covers
Hand the task to agent-desktop when it needs any of these:
- A native desktop app that exposes no CDP port (AppKit, SwiftUI, Win32/WPF, GTK, Qt), or an Electron app that is already running. For an Electron or Chromium app you can launch fresh,
agent-desktop launch <app> --cdpopens a port thatagent-browser connect <port>drives, and agent-desktop keeps the native menus, dialogs, and windows. - Desktop Safari, Firefox, or another browser that is neither Chromium-based nor iOS Safari. agent-desktop sees what their accessibility trees expose, so check the snapshot.
- Browser chrome outside the page: the toolbar, extension popups, native print or save dialogs, or permission prompts.
- OS dialogs and pickers the page cannot bypass. Try
agent-browser uploadfor file inputs first. - Work across several applications, or a capability the installed agent-browser version rejects.
xcrun simctl, Appium with XCUITest, or adb with UI Automator, and report the gap when none is available.
Check the installed CLI (agent-browser --help, agent-browser skills get core) before relying on a version-dependent command.
Setup and first session
Load theagent-browser skill and check agent-browser --help. If the command is unavailable, install it when permitted:
agent-browser install --with-deps to install system dependencies alongside the browser. Do not add browser automation dependencies to an unrelated project just to run a one-off task.
Create a uniquely named session, replacing desktop-demo if that name is already in use:
agent-browser skills get core for the authoritative workflow, common patterns, and troubleshooting; --full adds the complete command reference.
Best practices
- Keep the same session name on every command (or set
AGENT_BROWSER_SESSION). Close only sessions you created, not every browser on the machine. - Prefer a fresh profile. Attach to an existing personal browser only when authorized; stored sessions can expose private tabs and credentials.
- Use headed mode for visual work. Headless mode can verify DOM behavior, but does not establish that desktop integration or native dialogs work.
- Inspect visible results and relevant console/network output (
agent-browser console,agent-browser errors,agent-browser network requests). Keep semantic locators and assertions in a maintained browser test suite for repeatable regression coverage. - Use the CLI’s file-upload support for supported file inputs rather than driving an OS file picker. Switch to agent-desktop or native tooling only for UI outside the page, and then recheck focus before returning to browser control.
- Treat cookies, saved authentication state, and network logs as sensitive. Do not commit or attach a browser profile as evidence.
- Keep
screenshotPNGs andrecordrecordings from the verified flow; when the work ends in a PR, attach them to the PR body withgh pr create --attachon supported GitHub, each next to the scenario it proves. See Verification and evidence. set deviceemulates a mobile viewport in Chromium;-p iosruns real Mobile Safari. Neither exercises a native Android or iOS app, which needsadb,xcrun simctl, or Appium and XCUITest.
Terminal automation with Herdr
Prefer Herdr for interactive terminal work on macOS, Linux, and Windows, subject to the eligibility requirements. Use ordinary shell execution for builds, scripts, or commands that do not need interactive input. A long-running command alone is not a reason to add a multiplexer.Setup and a dedicated pane
Checkherdr --version and herdr --help. Install missing Herdr using its official installation guide when permitted. macOS supports brew install herdr; macOS/Linux and Windows also have official shell and PowerShell installers. Inspect downloaded scripts before executing them.
Once inside an eligible managed pane, check herdr status for client/server compatibility. Do not stop or replace an active server just to obtain a new feature. Atomic’s automatic status reporting is documented separately in Herdr integration.
Use the Herdr skill to discover the current pane and create a dedicated sibling without changing the user’s focus. For example, in a POSIX shell inside Herdr:
<pane-id> with that returned ID and <command> with the intended command:
pane run sends text and Enter. pane send-text alone does not submit. wait-output can match text already on the screen, so use a fresh pane or a run-specific marker and inspect the result. The appearance of a marker is not a substitute for checking the command’s exit status or the application’s final state.
For ordinary logs, --source recent-unwrapped --lines 120 avoids soft-wrapped lines. For layout, inspect visible at the intended terminal dimensions. Alternate-screen content that has scrolled away may not be recoverable from host scrollback. Capture important states as they occur.
tmux and psmux fallbacks
When Herdr is unavailable, cannot be installed, or has no eligible managed session, use tmux on macOS/Linux or psmux for native Windows terminals. Record the reason when it affects the requested coverage. Do not take over an unrelated pane to satisfy the preference. Load the tmux skill and check the installed help. tmux and psmux share familiar commands, but supported flags and behavior can differ. Herdr has a different CLI entirely. For tmux, create a dedicated session with a unique name, then discover its actual pane ID:<pane-id>:
psmux list-panes and use psmux capture-pane -p -t <pane-id> as documented in its scripting guide. Discover IDs rather than assuming %0 is your pane. Clean up only the session or pane created for the task. Never use a global server-kill command as routine cleanup.
For modified-key setup in Atomic, see tmux setup. For behavioral checks and recordings, see terminal evidence.
macOS
Desktop and native tools
- Install a missing
agent-desktopwithnpm install -g agent-desktop(macOS 13 or later; Intel or Apple Silicon). Install missing uv withbrew install uvwhen Homebrew is available, or use the reviewed macOS installer from uv installation. - Accessibility permission belongs to the app that launches the command (Terminal, iTerm2, Warp, VS Code). Run
agent-desktop permissionsto read it andagent-desktop permissions --guideto open System Settings with a panel that shows the user which app to add; the user confirms with Touch ID or a password. macOS 27 and later name the list Device Control and Data Access. If System Settings also lists theagent-desktopbinary, grant it too. Screen Recording is needed only forscreenshot. - AppleScript automation may also prompt for Automation permission to control another app, and
agent-desktop permissionsreports it asunknownuntil macOS would prompt. Let the user grant permissions; do not script around consent dialogs. - Act by ref where possible. Read
boundsfrom the same snapshot before any coordinate action, and check that they are live (get --property boundsreportsdata.live). A black or incomplete capture usually needs permission or display troubleshooting, not more clicks.
osascript for AppleScript or JavaScript for Automation when an app’s scripting dictionary exposes the operation you need. See application scripting and recipes for a runnable example and Office automation choices. System Events UI scripting and native accessibility APIs can address menus and controls more reliably than coordinates; consult Apple’s UI scripting guide.
screencapture is useful for native screenshots; Screenshot or QuickTime Player can record the screen or a selected area. Check permissions and the selected recording region before capture.
Browser and terminal
agent-browser’s default session is Chrome/Chromium, which is not proof of Safari-specific behavior. For Mobile Safari, useagent-browser -p ios against an iOS Simulator (requires Xcode, Appium, and the XCUITest driver). For desktop Safari, use agent-desktop and check what its accessibility tree exposes.
Herdr is the first choice for interactive terminals when eligible. Homebrew provides Herdr and tmux. Preserve the shell, terminal dimensions, and keyboard behavior relevant to the task rather than silently changing them to make a scenario pass.
Linux
Desktop and native tools
- Install a missing
agent-desktopwithnpm install -g agent-desktop(Ubuntu 24.04 or later on x86_64 or aarch64; other distributions need the at-spi2-core bridge fix named inagent-desktop skills get linux). Install missing uv through the official Linux installer or an available distribution package. - Installing the binary does not create a desktop session. Run
agent-desktop statusin a terminal inside the graphical session that owns the apps, so the session bus, display, and runtime directory come from its environment. An emptysupported_surfacesmeans the AT-SPI bus did not answer; a TTY login, an SSH shell without the session variables, or a container without a bus sees no apps. - Observation and semantic actions work on X11 and Wayland through AT-SPI and need no helper tool. Pointer gestures (
double-click,hover,drag) and wheel scrolling are X11 and--headedonly, and on Wayland they refuse withACTION_NOT_SUPPORTED. Do not weaken session security or claim full Wayland support. - For unattended X11 work, a dedicated virtual display such as Xvfb with a desktop session (for example
xfce4) and a session bus can be useful. It does not prove behavior on a real Wayland desktop, GPU configuration, or physical display. Creative applications may require working graphics acceleration.
xdotool and wmctrl can help with focus and window placement on X11 when agent-desktop’s window commands are not enough; they are not general Wayland replacements. On Wayland, choose tools for the actual compositor and inspect their permission requirements. Use app APIs where custom canvases do not expose useful accessibility controls.
For recordings, use a supported desktop recorder or OBS with the appropriate display or portal source. Confirm the saved file contains the intended window, not a blank capture.
Browser and terminal
agent-browser may need browser binaries and system libraries on a minimal Linux install;agent-browser install --with-deps installs both. A headed browser needs a display. Headless browsing remains useful on SSH or CI hosts but does not grant desktop access.
Herdr is preferred when eligible; tmux is a practical fallback on local or remote POSIX shells. An SSH terminal can run terminal scenarios without access to the remote desktop. Record which host owns the pane and application.
Windows
Desktop and native tools
- Install a missing
agent-desktopwithnpm install -g agent-desktopfrom PowerShell and runagent-desktop version; open a new shell ifPathchanged. Install missing uv withwinget install --id=astral-sh.uv -eor use the reviewed PowerShell installer from uv installation. - Run
agent-desktopin the interactive desktop session of the signed-in user (Windows 10 1809 or later, or Windows Server 2019 or later). Session 0 services, Server Core, the UAC secure desktop, the sign-in screen, a locked desktop, and another user’s session are not supported. No permission dialog exists, andagent-desktop statusreportsautomationasnot_required. - In PowerShell, quote every ref (
'@s8f3k2p9:e1') and use$env:NAME = 'value'instead ofexport. A minimized window is not drivable:agent-desktop restore --app <name>, then snapshot again.typeneeds--headed; preferset-value. - Keep the session unlocked and available during automation. A disconnected or minimized Remote Desktop session can change rendering or input behavior; verify the actual remote-session setup before relying on it.
- Use a consistent display scale and primary monitor. Check coordinates again after moving a window between displays with different DPI settings.
- Windows blocks input from a non-elevated terminal into an elevated app (UIPI) and the UAC secure desktop is out of reach. Stop for the user or choose an authorized non-elevated path rather than escalating just to force input through.
snapshot and acts on it through semantic calls, so prefer refs over pixel matching for accessible Windows apps. For structured document operations, start with file libraries and app scripting. Use agent-desktop for the remaining visual interactions.
Snipping Tool or OBS can capture desktop evidence. Check the selected window and saved recording before sharing it.
Browser and terminal
Use native Windows agent-browser when the task depends on Windows browsers, downloads, or desktop dialogs. Quote paths and URLs for the shell actually in use; do not paste POSIX shell syntax into PowerShell. Prefer native Herdr when eligible. In PowerShell, check$env:HERDR_ENV -eq '1', use (Get-Location).Path for the working directory, and read pane IDs from CLI responses. If Herdr cannot be used, install psmux through its documented Windows installation options and inspect its help. WSL tmux is useful for Linux programs, but is not native Windows ConPTY coverage.
See Windows setup for Atomic’s shell requirements.
Creative work and computer-use workflows
Choose the deliverable first. A library or application API may produce it without computer use at all. Add visual interaction when it helps create or inspect the result.
Do not substitute a screenshot for the editable project or final export the user requested. Reopen saved files, check missing assets and fonts, and inspect the actual export. For video, check audio and timing as well as a still frame. Keep originals intact and use explicit save paths. Rendering, uploading, or exporting through a paid service may need separate authorization.
When the user specifically wants a computer-use workflow, give the stage that operates the desktop the
agent-desktop skill, or put a code-owned scenario in ctx.tool that calls the agent-desktop CLI. For artifact-only requests, keep script-based work outside the desktop session and omit UI stages that add no useful operation or check. A desktop sequence is:
- Prepare assets and confirm the intended application, output formats, and permissions.
- Open the dedicated desktop and inspect its starting state.
- Create or edit with agent-desktop and suitable native/app APIs, saving checkpoints.
- Reopen and inspect the deliverables, then make bounded corrections if needed.
- Hand off local files. Publish or upload only to an authorized target.
data.complete is false), missing permissions, or failed observations. On resume, inspect the app and files before repeating an action.
See workflow authoring for stages and human-input gates. Use durable ctx.tool calls for workflow-owned external operations, with finite timeouts and cancellation; model stages can use the appropriate automation tools to operate the app. If the user asks to work inline, keep the same safety and deliverable checks without creating a workflow.
Troubleshooting
A tool being unavailable is a reason to choose another supported mechanism or report a limitation, not to invent a successful interaction.