Agent Desktop logo

Agent Desktop

CommunityPopular
mvanhorn
agent-desktop

Desktop automation through the real Rust agent-desktop CLI, published in Printing Press through a small bridge. Use when an agent needs to observe, inspect, or control native desktop applications with accessibility trees: snapshots, refs, clicks, typing, scrolling, windows, notifications, screenshots, clipboard, waits, and bundled version-matched skill docs.

Overview

Publishermvanhorn
Repositoryprinting-press-library
Skill nameagent-desktop
Stars
2K
Forks
614
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by mvanhorn on GitHub. Read the source before you install it.

Installation

Install the Agent Desktop AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mvanhorn/printing-press-library.git /tmp/printing-press-library
mkdir -p .claude/skills
cp -r /tmp/printing-press-library/cli-skills/pp-agent-desktop .claude/skills/agent-desktop
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Agent Desktop in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Agent Desktop on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Agent Desktop is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Agent Desktop - Printing Press CLI

agent-desktop is a native desktop automation CLI for AI agents. It is not an agent and does not call an LLM. It exposes the operating system accessibility tree as structured JSON, assigns snapshot-scoped refs such as @e1, and lets the calling agent perform semantic actions against those refs.

This Printing Press package installs agent-desktop-pp-cli, a catalog bridge. The bridge does not reimplement automation. It installs or delegates to the real remote agent-desktop package from https://github.com/lahfir/agent-desktop and the npm package agent-desktop.

Prerequisites: Install the CLI

This skill drives the agent-desktop-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer. It defaults binaries to $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:
    bash
    npx -y @mvanhorn/printing-press-library install agent-desktop --cli-only
  2. Verify: agent-desktop-pp-cli --version
  3. Ensure the reported install directory is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer). This installs into $GOPATH/bin (default $HOME/go/bin), so add that directory to $PATH instead:

bash
go install github.com/mvanhorn/printing-press-library/library/developer-tools/agent-desktop/cmd/agent-desktop-pp-cli@latest

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

Install the Real agent-desktop CLI

After the bridge is installed, install and verify the real remote desktop automation CLI:

bash
agent-desktop-pp-cli install --version latest
agent-desktop-pp-cli doctor

The bridge defaults to agent-desktop@latest, so future upstream releases are pulled from the remote package channel instead of being copied into Printing Press. Use agent-desktop-pp-cli install --version <version> when a task needs a pinned version. Use agent-desktop-pp-cli install --dry-run before mutating a host when you only need to inspect the install command.

Load Version-Matched Docs

The real binary ships its own agent skills inside the executable. Prefer those docs before nontrivial desktop work because they match the installed agent-desktop version exactly:

bash
agent-desktop skills
agent-desktop skills get desktop --full
agent-desktop skills get desktop workflows
agent-desktop skills get desktop commands-observation
agent-desktop skills get desktop commands-interaction
agent-desktop skills get desktop commands-system
agent-desktop skills get desktop macos
agent-desktop skills get ffi --full

After doctor confirms the real binary is installed, call agent-desktop directly for commands that need their own flags.

Core Loop

Every useful automation follows the same loop:

bash
agent-desktop permissions
agent-desktop snapshot --app "App Name" -i
agent-desktop click @e5 --snapshot <snapshot_id>
agent-desktop wait --text "Done" --app "App Name" --timeout 5000
agent-desktop snapshot --app "App Name" -i

Rules for agents:

  • Snapshot before acting. Do not guess UI state.
  • Keep the returned snapshot_id and pass it to every ref-consuming command.
  • Treat refs as ephemeral. Re-snapshot after UI-changing actions.
  • Prefer refs over coordinates. Use click @e5, type @e2, check @e4, or scroll @e1 before mouse-click --xy.
  • Use wait --predicate actionable, wait --text, wait --window, or wait --notification instead of blind sleeps.
  • On STALE_REF or AMBIGUOUS_TARGET, take a fresh snapshot and choose a new ref. Do not retry the same stale ref.
  • Use --session <id> when concurrent agents may share latest-snapshot state.
  • Use --trace /tmp/agent-desktop.jsonl when diagnosing stale refs, ambiguity, policy denial, or actionability failures.
  • Use --headed only when physical input is explicitly required. Ref actions are headless and accessibility-first by default.

JSON Contract

All real agent-desktop commands write a JSON envelope on stdout.

Success:

json
{
  "version": "2.0",
  "ok": true,
  "command": "snapshot",
  "data": {
    "snapshot_id": "s8f3k2p9",
    "ref_count": 14
  }
}

Error:

json
{
  "version": "2.0",
  "ok": false,
  "command": "click",
  "error": {
    "code": "STALE_REF",
    "message": "Element could not be resolved from the requested snapshot",
    "suggestion": "Run snapshot to refresh, then retry with an updated ref"
  }
}

Exit codes are 0 for success, 1 for structured runtime errors, and 2 for argument or parse errors. The bridge run command preserves the real binary's exit code.

Command Surface

The real CLI exposes 54 commands:

CategoryCommands
Observationsnapshot, screenshot, find, get, is, list-surfaces
Interactionclick, double-click, triple-click, right-click, type, set-value, clear, focus, select, toggle, check, uncheck, expand, collapse
Scrollscroll, scroll-to
Keyboardpress, key-down, key-up
Mousehover, drag, mouse-move, mouse-click, mouse-down, mouse-up
App/windowlaunch, close-app, list-windows, list-apps, focus-window, resize-window, move-window, minimize, maximize, restore
Notificationslist-notifications, dismiss-notification, dismiss-all-notifications, notification-action
Clipboardclipboard-get, clipboard-set, clipboard-clear
Waitwait
Systemstatus, permissions, version, skills
Batchbatch

Common examples:

bash
agent-desktop snapshot --app Finder -i --compact
agent-desktop snapshot --skeleton --app Slack -i --compact
agent-desktop snapshot --root @e3 --snapshot <snapshot_id> -i --compact
agent-desktop find --app TextEdit --role button --name Save
agent-desktop get @e3 --snapshot <snapshot_id> --property value
agent-desktop is @e7 --snapshot <snapshot_id> --property checked
agent-desktop click @e5 --snapshot <snapshot_id>
agent-desktop type @e2 --snapshot <snapshot_id> "hello@example.com"
agent-desktop check @e6 --snapshot <snapshot_id>
agent-desktop scroll @e1 --snapshot <snapshot_id> --direction down --amount 3
agent-desktop press cmd+s --app TextEdit
agent-desktop list-windows --app Finder
agent-desktop focus-window --app Finder
agent-desktop clipboard-get
agent-desktop wait --element @e5 --snapshot <snapshot_id> --predicate actionable --timeout 5000
agent-desktop batch '[{"command":"status","args":{}}]' --stop-on-error

Printing Press Bridge Commands

Use these only for catalog, install, diagnosis, and delegation:

bash
agent-desktop-pp-cli info
agent-desktop-pp-cli install --version latest
agent-desktop-pp-cli install --version latest --dry-run
agent-desktop-pp-cli install --manager bun
agent-desktop-pp-cli doctor
agent-desktop-pp-cli doctor --json
agent-desktop-pp-cli run version
agent-desktop-pp-cli run status

After doctor confirms the real binary is on PATH, agents may call agent-desktop directly. Keep using agent-desktop-pp-cli run when the caller needs a stable Printing Press entry point.

Platform Notes

macOS is the Phase 1 fully implemented adapter. The launching app, such as Terminal, iTerm, Codex, or another agent runtime, needs Accessibility permission for UI automation. Screenshots need Screen Recording permission. Some automation surfaces may also require Automation permission.

Check and request permissions with:

bash
agent-desktop permissions
agent-desktop permissions --request

If permissions are denied, stop and surface the returned error.suggestion. Do not work around TCC failures with coordinate clicking.

Frequently asked questions

What does the Agent Desktop AI skill do?

Desktop automation through the real Rust agent-desktop CLI, published in Printing Press through a small bridge. Use when an agent needs to observe, inspect, or control native desktop applications with accessibility trees: snapshots, refs, clicks, typing, scrolling, windows, notifications, screenshots, clipboard, waits, and bundled version-matched skill docs.

Why use Agent Desktop on TypingMind?

Because you install it once and use it with any model. Agent Desktop is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Agent Desktop in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mvanhorn/printing-press-library/tree/main/cli-skills/pp-agent-desktop. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Agent Desktop?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Agent Desktop?

As many as you like. As long as a model supports skills, you can use Agent Desktop with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Agent Desktop AI skill free?

Yes. It is published on GitHub by mvanhorn under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇