Skip to content

Computer use CLI for AI agents

docs: add the diagram component and the getting started pages (1/4) (#337)

Lahfir63b5db357119
diff --git a/.agents/skills/architecture-diagram/SKILL.md b/.agents/skills/architecture-diagram/SKILL.md
index 6945e8668..8b179f7a5 100644
--- a/.agents/skills/architecture-diagram/SKILL.md
+++ b/.agents/skills/architecture-diagram/SKILL.md
@@ -24,8 +24,10 @@ Diagrams are standalone HTML files that the docs embed with the `Diagram` compon
2. Use the identifiers from the code as labels (`PlatformAdapter`, `RefStore`) and put the mechanism in the gray second line (`AX API`, `UI Automation`).
3. Draw one arrow per real data path. Label arrows that cross a boundary with the command, flag, or call (`snapshot --root`).
4. Group components by where they run: an outer dashed container for a machine, a nested panel for a process. Put the calling agent outside.
-5. Mark the entry point of the flow with the highlighted circle node. Use it once.
-6. Lay it out for the 720px docs column at 1:1 scale (see style.md) and keep it to 12 nodes or fewer. Move detail to the page text.
+5. Lay the flow out top to bottom: the entry point at the top, then each layer or step on its own row below the one that calls it, so arrows point down. Put branches side by side on one row (the three platform crates, the error outcomes of a step) and route loops back up along the right side. Use left-to-right only for a before-and-after comparison of state, such as the re-drill panels.
+6. Mark the entry point of the flow with the highlighted circle node, at the top. Use it once, and give it the icon of what starts the flow (`robot` for the calling agent, `link` for a ref, `refresh-counter-clockwise` for a re-drill), never a generic globe.
+7. Give every node and container header an icon that names what it is. Use the Geist icon set and the OS marks listed in [references/style.md](references/style.md#icons). Do not draw your own icons or reuse one icon for unrelated nodes.
+8. Lay it out for the 720px docs column at 1:1 scale (see style.md) and keep it to 12 nodes or fewer. Move detail to the page text.
## Embed it
@@ -44,7 +46,7 @@ Keep a text version of the flow next to the diagram on the page, such as a short
## Check it
1. In `apps/docs`, run `pnpm dev` and, in a second terminal, `pnpm exec microfrontends proxy microfrontends.json --local-apps agent-desktop`.
-2. Open `http://localhost:3024/desktop/diagrams/<name>/index.html` and the same URL with `?theme=light` at 1440x900. Look for clipped text, overlapping labels, arrows that miss their node, and unreadable gray text.
+2. Open `http://localhost:3024/desktop/diagrams/<name>/index.html` and the same URL with `?theme=light` at 1440x900. Look for clipped text, labels that run past their node, overlapping labels, arrows that miss their node, icons that do not match their node, and unreadable gray text. Labels that fit in Geist can overflow in a fallback font, so leave at least 20 of room after the longest label.
3. Open the docs page and check the diagram in both site themes.
4. Run `pnpm build` in `apps/docs`.
5. Stop the dev server and the proxy, and close the browser session.
diff --git a/.agents/skills/architecture-diagram/references/style.md b/.agents/skills/architecture-diagram/references/style.md
index 9dfa31e38..90e612249 100644
--- a/.agents/skills/architecture-diagram/references/style.md
+++ b/.agents/skills/architecture-diagram/references/style.md
@@ -1,6 +1,6 @@
# Diagram style tokens
-The style follows Vercel architecture diagrams: dashed containers, thin gray connectors, small open arrowheads, one highlighted entry node. All tokens are CSS custom properties on `:root` in the template.
+The style follows Vercel architecture diagrams: a top-to-bottom flow, dashed containers, nodes with a Geist icon, thin gray connectors, small open arrowheads, one highlighted entry node. All tokens are CSS custom properties on `:root` in the template.
## Colors
@@ -11,7 +11,7 @@ The style follows Vercel architecture diagrams: dashed containers, thin gray con
| `--node` | `#111` | `#fff` | Node fill |
| `--border` | `#5c5c5c` | `#b8b8b8` | Dashed borders |
| `--fg` | `#ededed` | `#171717` | Labels and headers |
-| `--muted` | `#8f8f8f` | `#666` | Second line, route labels, icons |
+| `--muted` | `#8f8f8f` | `#666` | Second line, route labels, node icons |
| `--line` | `#8f8f8f` | `#7a7a7a` | Connectors and arrowheads |
| `--line-strong` | `#ededed` | `#171717` | Main flow connectors |
| `--hl-fill` | `#0a2a5e` | `#dbe8ff` | Highlighted node fill |
@@ -27,8 +27,9 @@ The `html` and `body` background and the outer container fill are transparent, s
- Stroke width 1 with `vector-effect: non-scaling-stroke`, so lines stay 1px at any scale.
- Dash pattern `4 4`.
- Outer container radius 8, nested panel radius 8, node radius 6.
-- Nodes are 120 x 64 (152 wide for wider labels). Gap between nodes in a row is 40, row gap 44 between a node bottom and the next row.
-- Container padding is 20 to 28 from its border to the nearest node. A container header sits 20 from the top, icon first, label 8 to 10 to its right.
+- Nodes are 56 high and as wide as their longest line needs, usually 180 to 280. Size each node from the label: 44 for the icon and padding, then the text, then at least 20 to spare. Nodes on one row share a width and a gap of 20 to 40; the gap between rows is 34 to 44, enough for an arrow and its route label.
+- Center a single node in the column. Center each row of branches under the node that fans out to it.
+- Container padding is 20 to 28 from its border to the nearest node. A container header sits 28 to 32 from the top: a 20px icon in `--fg`, then the label 30 to the right of the icon's left edge.
## Typography
@@ -41,7 +42,7 @@ Font stack `Geist, "Geist Sans", system-ui, -apple-system, "Segoe UI", sans-seri
| Node second line | 11.5 | 400 | `--muted` |
| Route label on an arrow | 12.5 | 400 | `--muted` |
-Node text is centered, label at the vertical middle minus 6, second line at the middle plus 11. Route labels sit 8 above their connector.
+Node text is left-aligned after the icon: label at `x + 44` and the vertical middle minus 4, second line at `x + 44` and the middle plus 13. Route labels sit beside a vertical connector, 10 to its right, or 8 above a horizontal one.
## Connectors
@@ -52,16 +53,47 @@ Node text is centered, label at the vertical middle minus 6, second line at the
## Icons
-- Stroke only, `--muted` for node icons and `--fg` for the outer container header icon.
-- Stroke width 1.5, round caps and joins, 18 to 28 px.
-- Server icon (container header): two stacked rounded rectangles with a dot each. Person icon: a circle, a head circle, and a shoulder arc. Globe: a circle, a vertical ellipse, and a horizontal line.
+Icons come from the [Geist icon set](https://vercel.com/geist/icons). The docs app already ships the ones below: copy the `d` attribute (and `fill-rule="evenodd"` when the source sets `fillRule`) from `apps/docs/node_modules/@vercel/geistdocs/dist/assets/icons/icon-<name>.js`. Geist icons are 16 x 16 filled shapes, so embed each one as a nested SVG and color it with `fill`, never `stroke`:
+
+```html
+<svg class="ico" x="126" y="169" width="18" height="18" viewBox="0 0 16 16"><path d="..." fill-rule="evenodd" clip-rule="evenodd"/></svg>
+```
+
+- Node icons: 18px, `fill: var(--muted)`, at `x + 16` and centered on the node's vertical middle.
+- Container header icons: 20px, `fill: var(--fg)`.
+- The highlighted entry icon: 22px, `fill: var(--hl-icon)`, centered in the circle.
+
+Pick the icon for what the node is, and keep the same icon for the same thing across diagrams:
+
+| Thing | Icon |
+| --- | --- |
+| Calling agent | `robot` |
+| A machine, the desktop | `device-desktop` |
+| The `agent-desktop` CLI | `terminal` |
+| The C library | `api` |
+| `agent-desktop-core`, a crate or package | `box` |
+| A trait or router that picks one implementation (`PlatformAdapter`) | `route` |
+| The target app or a window | `display` |
+| A snapshot or tree listing (`--skeleton`) | `logs` |
+| A drilled region (`--root`) | `folder-open` |
+| A ref, a ref action | `link` |
+| Stored state (`RefStore`, a refmap) | `archive` |
+| A record (`RefEntry`) | `file-text` |
+| Strict resolution or a check | `shield-check` |
+| Success or verification | `check-circle-fill` |
+| An error outcome | `cross` |
+| A refresh, re-read, or retry | `refresh-counter-clockwise` |
+
+For operating systems, use the brand marks instead of a Geist icon: Apple and Linux (Tux) from [Simple Icons](https://simpleicons.org) (CC0, `viewBox="0 0 24 24"`), and the four-square Windows mark (`M0 0h7.5v7.5H0zM8.5 0H16v7.5H8.5zM0 8.5h7.5V16H0zM8.5 8.5H16V16H8.5z` in a 16 x 16 box). Color them like any node icon.
+
+When a node needs an icon this table does not cover, choose the closest Geist icon by meaning and add it to the table in the same change.
## Highlighted node
-A circle of radius 30 filled with `--hl-fill`, ringed with a 1px `--hl-ring` stroke, with a globe icon drawn at 24 px in `--hl-icon` (1.2 stroke). Place it directly in front of the node it enters. Use it once per diagram.
+A circle of radius 28 filled with `--hl-fill`, ringed with a 1px `--hl-ring` stroke, with the entry's icon at 22px in `--hl-icon`. Place it at the top of the diagram, above the node it enters, with its label and second line to its right (`cx + 42`). Use it once per diagram.
## Size and scaling
-Lay diagrams out for the docs content column, not for a wide canvas. The column is about 720px wide at a 1440px viewport, so the target `viewBox` width is 720 and the height is whatever the layout needs (the architecture diagram is 720 x 448). The font sizes above are in `viewBox` units, so at 720 wide they render at 1:1. Do not design a wider canvas and let it scale down: a 1124 wide diagram renders at 0.64 and its labels shrink to about 8px. When the content does not fit in 720, wrap it onto more rows or place clients below the container instead.
+Lay diagrams out for the docs content column, not for a wide canvas. The column is about 720px wide at a 1440px viewport, so the target `viewBox` width is 720 and the height is whatever the top-to-bottom layout needs (the architecture diagram is 720 x 672). The font sizes above are in `viewBox` units, so at 720 wide they render at 1:1. Do not design a wider canvas and let it scale down: a 1124 wide diagram renders at 0.64 and its labels shrink to about 8px. When the content does not fit in 720, add a row instead of widening the canvas.
One SVG with a `viewBox`, `width: 100%`, `height: auto`. Keep the `viewBox` size and the `aspectRatio` prop of `<Diagram>` equal. On a phone the diagram scales down with the column; keep node text short so it stays readable.
diff --git a/.agents/skills/architecture-diagram/references/template.html b/.agents/skills/architecture-diagram/references/template.html
index 426f0e69a..3878c9447 100644
--- a/.agents/skills/architecture-diagram/references/template.html
+++ b/.agents/skills/architecture-diagram/references/template.html
@@ -46,41 +46,43 @@
.hl { fill: var(--hl-fill); stroke: var(--hl-ring); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hl-icon { fill: none; stroke: var(--hl-icon); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
#arrow path { fill: none; stroke: var(--line); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
+ .label, .sub { text-anchor: start; }
+ .tag.start { text-anchor: start; }
+ .ico { fill: var(--muted); }
+ .ico.fg { fill: var(--fg); }
+ .hl-ico { fill: var(--hl-icon); }
+ .label.dim { fill: var(--muted); }
</style>
</head>
<body>
-<svg viewBox="0 0 720 240" role="img" aria-labelledby="t d">
+<svg viewBox="0 0 720 380" role="img" aria-labelledby="t d">
<title id="t">Diagram name</title>
- <desc id="d">Describe the whole flow in one or two sentences.</desc>
+ <desc id="d">Describe the whole flow, top to bottom, in one or two sentences.</desc>
<defs>
<marker id="arrow" viewBox="0 0 8 8" refX="6" refY="4" markerWidth="8" markerHeight="8" markerUnits="userSpaceOnUse" orient="auto">
<path d="M1.5 1.5 L5.5 4 L1.5 6.5"/>
</marker>
</defs>
-
- <rect class="box" x="8" y="8" width="704" height="224" rx="8" style="fill:none"/>
- <text class="head" x="28" y="40">Container</text>
-
- <rect class="box node" x="40" y="80" width="120" height="64" rx="6"/>
- <text class="label" x="100" y="110">First</text>
- <text class="sub" x="100" y="127">detail</text>
-
- <rect class="box node" x="280" y="80" width="120" height="64" rx="6"/>
- <text class="label" x="340" y="110">Second</text>
- <text class="sub" x="340" y="127">detail</text>
-
- <path class="wire strong" d="M166 112H274"/>
- <text class="tag" x="220" y="104">/route</text>
-
- <path class="wire" d="M340 150V170a14 14 0 0 1-14 14H114a14 14 0 0 1-14-14V150"/>
-
- <path class="wire" d="M406 112H494"/>
- <circle class="hl" cx="530" cy="112" r="30"/>
- <g transform="translate(518 100)">
- <circle class="hl-icon" cx="12" cy="12" r="9"/>
- <ellipse class="hl-icon" cx="12" cy="12" rx="4" ry="9"/>
- <path class="hl-icon" d="M3 12h18"/>
- </g>
+ <circle class="hl" cx="360" cy="40" r="28"/>
+ <svg class="hl-ico" x="349" y="29" width="22" height="22" viewBox="0 0 16 16"><path d="M8.75 2.8a1.5 1.5 0 1 0-1.5 0V5H7a6 6 0 0 0-5.92 5H0v3h1v3h14v-3h1v-3h-1.08A6 6 0 0 0 9 5h-.25zM7 6.5A4.5 4.5 0 0 0 2.5 11v3.5h11V11A4.5 4.5 0 0 0 9 6.5zm.25 4.75a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0M10.5 13a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5" fill-rule="evenodd" clip-rule="evenodd"/></svg>
+ <text class="label" x="402" y="36">Entry</text>
+ <text class="sub" x="402" y="53">what starts the flow</text>
+ <path class="wire strong" d="M360 74V122"/>
+ <text class="tag start" x="370" y="104">command or call</text>
+ <rect class="box" x="40" y="96" width="640" height="264" rx="8" style="fill:none"/>
+ <svg class="ico fg" x="60" y="113" width="20" height="20" viewBox="0 0 16 16"><path d="M0 2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v8.5a1 1 0 0 1-1 1H8.75v3h1.75V16h-5v-1.5h1.75v-3H1a1 1 0 0 1-1-1zm1.5.5V10h13V2.5z" fill-rule="evenodd" clip-rule="evenodd"/></svg>
+ <text class="head" x="90" y="128">Container</text>
+ <rect class="box node" x="230" y="150" width="260" height="56" rx="6"/>
+ <svg class="ico" x="246" y="169.0" width="18" height="18" viewBox="0 0 16 16"><path d="m1.53 12.78-.53.53-1.06-1.06.53-.53L4.19 8 .47 4.28l-.53-.53L1 2.69l.53.53L5.6 7.29a1 1 0 0 1 0 1.42zm7.22-.28H8V14h8v-1.5H8.75" fill-rule="evenodd" clip-rule="evenodd"/></svg>
+ <text class="label" x="274" y="174.0">First node</text>
+ <text class="sub" x="274" y="191.0">second line: mechanism</text>
+ <path class="wire strong" d="M360 212V240"/>
+ <rect class="box node" x="230" y="246" width="260" height="56" rx="6"/>
+ <svg class="ico" x="246" y="265.0" width="18" height="18" viewBox="0 0 16 16"><path d="m8.35.34 6.25 3.25.4.2v8.42l-.4.2-6.25 3.26-.35.18-.35-.18-6.25-3.25-.4-.21V3.8l.4-.21L7.65.34 8 .15zM2.5 11.3l4.75 2.46V7.81L2.5 5.44zM8.75 7.8v5.95l4.75-2.46V5.44zM3.42 4.22 8 6.52l4.58-2.3L8 1.85z"/></svg>
+ <text class="label" x="274" y="270.0">Second node</text>
+ <text class="sub" x="274" y="287.0">second line: mechanism</text>
+ <path class="wire" d="M496 274H516a14 14 0 0 0 14-14V192a14 14 0 0 0-14-14H496"/>
+ <text class="tag start" x="540" y="230">loop back up</text>
</svg>
</body>
</html>
diff --git a/apps/docs/components/geistdocs/diagram.tsx b/apps/docs/components/geistdocs/diagram.tsx
new file mode 100644
index 000000000..e46e06383
--- /dev/null
+++ b/apps/docs/components/geistdocs/diagram.tsx
@@ -0,0 +1,33 @@
+"use client";
+
+import { useTheme } from "next-themes";
+import { useEffect, useState } from "react";
+
+interface DiagramProps {
+ name: string;
+ title: string;
+ aspectRatio: string;
+}
+
+export const Diagram = ({ name, title, aspectRatio }: DiagramProps) => {
+ const { resolvedTheme } = useTheme();
+ const [theme, setTheme] = useState<string | undefined>(undefined);
+
+ useEffect(() => {
+ setTheme(resolvedTheme === "light" ? "light" : "dark");
+ }, [resolvedTheme]);
+
+ const src = `/desktop/diagrams/${name}/index.html${theme ? `?theme=${theme}` : ""}`;
+
+ return (
+ <figure className="not-prose my-6">
+ <iframe
+ className="block w-full border-0 bg-transparent"
+ loading="lazy"
+ src={src}
+ style={{ aspectRatio, colorScheme: theme ?? "normal" }}
+ title={title}
+ />
+ </figure>
+ );
+};
diff --git a/apps/docs/components/geistdocs/mdx-components.tsx b/apps/docs/components/geistdocs/mdx-components.tsx
index f5c0fdf6a..b5534ae6d 100644
--- a/apps/docs/components/geistdocs/mdx-components.tsx
+++ b/apps/docs/components/geistdocs/mdx-components.tsx
@@ -1,5 +1,6 @@
import { createMdxComponents } from "@vercel/geistdocs/mdx";
import type { MDXComponents } from "mdx/types";
+import { Diagram } from "./diagram";
export const getMDXComponents = (components?: MDXComponents): MDXComponents =>
- createMdxComponents(components);
+ createMdxComponents({ Diagram, ...components });
diff --git a/apps/docs/content/docs/index.mdx b/apps/docs/content/docs/index.mdx
index c059e9355..3f4939414 100644
--- a/apps/docs/content/docs/index.mdx
+++ b/apps/docs/content/docs/index.mdx
@@ -1,18 +1,71 @@
---
title: agent-desktop
navTitle: Introduction
-description: Desktop automation CLI for AI agents, using native accessibility trees and structured JSON.
+description: A CLI and C library that lets AI agents read and operate desktop apps on macOS, Windows, and Linux through the OS accessibility tree.
---
-Desktop automation CLI for AI agents, using native accessibility trees and structured JSON.
+agent-desktop reads the accessibility tree of a desktop app and returns it as JSON. Every element an agent can act on gets a ref. The agent acts on a ref, reads the UI again to check the result, and repeats. It ships as a CLI and as a C library for macOS, Windows, and Linux.
```bash
-npm install -g agent-desktop # macOS, Windows, and Linux
-agent-desktop permissions --guide # Grant Accessibility permission (macOS)
+npm install -g agent-desktop # macOS, Windows, and Linux
+agent-desktop status # platform, permissions, supported surfaces
+agent-desktop skills get desktop # the guide your agent should load first
```
-## Features
+## What agent-desktop is and is not
-- **Ref-based**: Snapshot an accessibility tree and act on its elements.
-- **Cross-platform**: Native binaries and helpers for macOS, Windows, and Linux on x64 and ARM64.
-- **Agent-first**: The calling agent observes, acts, and verifies the result.
+- **A tool that agents call.** It is not an agent. The observe, act, and verify loop lives in the calling agent or script.
+- **No model inside.** It never embeds an LLM, has no GUI, and has no interactive prompt. Every command prints one JSON envelope and exits.
+- **Desktop apps only.** It does not automate web pages. Use [agent-browser](https://agent-browser.dev) for those.
+- **Limited to what apps expose.** It reads accessibility trees and does not match pixels, so it cannot see a UI that publishes no accessibility tree.
+
+## The loop in four commands
+
+An agent maps an app, drills into the region it needs, acts on a ref, and checks the result.
+
+```bash
+agent-desktop snapshot --app gnome-calculator --skeleton -i --compact # 1. map: a shallow skeleton
+agent-desktop snapshot --root @s2txcl95uvubmn:e1 -i --compact # 2. drill: expand one region
+agent-desktop click @s2txcl95uvubmn:e11 # 3. act: press the 7 button
+agent-desktop wait --element @s2txcl95uvubmn:e6 --predicate value --value 7 # 4. verify: the display reads 7
+```
+
+Refs carry the id of the snapshot that produced them (`@s2txcl95uvubmn:e11`). [Snapshots and refs](/desktop/snapshots-and-refs) defines them, and [Skeleton and drill-down](/desktop/skeleton-and-drill-down) explains the first two commands. A successful action does not prove the UI changed, so the loop ends with a read. The [quick start](/desktop/quick-start) runs these commands with their output.
+
+## How it works
+
+<Diagram name="architecture" title="agent-desktop architecture" aspectRatio="720 / 672" />
+
+The same chain in text, from the caller to the app:
+
+1. The calling agent: your code or an LLM loop. It runs a command and reads the JSON envelope it prints.
+2. The `agent-desktop` CLI, or the [C library](/desktop/ffi) when you call it in process.
+3. `agent-desktop-core`: the commands, `RefStore`, and snapshot building. Core defines the `PlatformAdapter` trait and every shared type.
+4. `PlatformAdapter`, the only way core reaches an operating system.
+5. One platform crate: `agent-desktop-macos`, `agent-desktop-windows`, or `agent-desktop-linux`.
+6. The OS accessibility API: the AX API on macOS, UI Automation on Windows, AT-SPI on Linux.
+7. The app, which exposes its UI through that API.
+
+Core never imports a platform crate, and platform crates never import each other. Only the CLI and the C library connect a platform crate to core, and each picks it at compile time, so a binary drives the OS it was built for.
+
+## Platform support
+
+<table>
+ <thead>
+ <tr><th>Platform</th><th>Requirement</th><th>Accessibility API</th></tr>
+ </thead>
+ <tbody>
+ <tr><td><a href="/desktop/platforms/macos">macOS</a></td><td>macOS 13 or later, Intel or Apple Silicon. Accessibility permission for the app that runs agent-desktop.</td><td>AX API</td></tr>
+ <tr><td><a href="/desktop/platforms/windows">Windows</a></td><td>Windows 10 1809 or later, or Windows Server 2019 or later, on x64 or ARM64, in the signed-in user's interactive desktop.</td><td>UI Automation</td></tr>
+ <tr><td><a href="/desktop/platforms/linux">Linux</a></td><td>Ubuntu 24.04 or later on x86_64 or aarch64 (glibc 2.35 floor), in the user's graphical session with a running AT-SPI bus.</td><td>AT-SPI</td></tr>
+ </tbody>
+</table>
+
+The CLI has the same 60 command names on every platform. Four of them (`key-down`, `key-up`, `mouse-down`, `mouse-up`) fail closed everywhere. Each platform page lists what works headless, what needs `--headed`, and what refuses.
+
+## Next steps
+
+- [Installation](/desktop/installation): install the CLI, verify it, and grant permissions.
+- [Quick start](/desktop/quick-start): one complete run against a real app.
+- [Skills](/desktop/skills): the guides your agent reads before it acts.
+- [Commands](/desktop/commands): all 60 commands.
diff --git a/apps/docs/content/docs/installation.mdx b/apps/docs/content/docs/installation.mdx
index 7a9904549..634451e3c 100644
--- a/apps/docs/content/docs/installation.mdx
+++ b/apps/docs/content/docs/installation.mdx
@@ -1,20 +1,125 @@
---
title: Installation
navTitle: Installation
-description: Install agent-desktop with npm, pnpm, Yarn, or Bun on macOS, Windows, and Linux.
+description: Install agent-desktop with npm, pnpm, Yarn, or Bun, from a release archive, or from source, and verify the install on macOS, Windows, or Linux.
---
-Install the package with npm, pnpm, Yarn, or Bun. It includes native binaries and platform helpers for macOS, Windows, and Linux on x64 and ARM64.
+Install the `agent-desktop` npm package globally with npm, pnpm, Yarn, or Bun. It needs Node 18 or later and runs on macOS, Windows, and Linux.
```bash
-npm install -g agent-desktop # Install the CLI
-agent-desktop permissions --guide # Grant Accessibility permission (macOS)
+npm install -g agent-desktop # or: pnpm add -g, yarn global add, bun add -g
+agent-desktop version # confirm the command resolves
```
-For a native executable without a JavaScript launcher, download the archive for your OS and architecture from [GitHub Releases](https://github.com/vercel-labs/agent-desktop/releases). Keep the executable and its platform helper together in a directory on PATH.
+Without `-g`, the command lands in `./node_modules/.bin` instead of on your PATH. Run it with `npx agent-desktop`, or install globally.
-## Platform requirements
+## What the package contains
-- **macOS**: Grant Accessibility permission with `agent-desktop permissions --guide`.
-- **Windows**: No grant is needed for apps at the terminal's integrity level.
-- **Linux**: Use the user's graphical session with `at-spi2-core`.
+The package carries native CLI executables for six targets, plus the helper each platform needs:
+
+<table>
+ <thead>
+ <tr><th>Platform</th><th>Targets</th><th>Helper installed beside the CLI</th></tr>
+ </thead>
+ <tbody>
+ <tr><td>macOS</td><td>arm64, x64</td><td><code>agent-desktop-macos-helper</code></td></tr>
+ <tr><td>Linux (glibc)</td><td>x64, arm64</td><td><code>agent-desktop-linux-clipboard-owner</code></td></tr>
+ <tr><td>Windows</td><td>x64, arm64</td><td>none</td></tr>
+ </tbody>
+</table>
+
+The [C library](/desktop/ffi) is not in the npm package. It ships as a separate archive on each release.
+
+## Release archives
+
+For a native executable without a JavaScript launcher, download the archive for your OS and architecture from [GitHub Releases](https://github.com/vercel-labs/agent-desktop/releases). Extract the executable and its helper together into a directory on your PATH. To upgrade, replace both with files from the same release.
+
+Checksums catch corruption. Verify origin with the build attestation:
+
+```bash
+gh attestation verify <downloaded-archive> --repo vercel-labs/agent-desktop
+```
+
+## Blocked install scripts
+
+The package's `postinstall` script replaces the Node launcher with a link to the native binary. If your package manager blocks install scripts, the Node launcher runs instead. It works, but every call starts Node first, which adds more than 100 ms. The launcher prints a one-time notice to stderr with the fix. Approve the script and reinstall:
+
+```bash
+npm install-scripts approve agent-desktop # npm 12
+npm install -g agent-desktop --allow-scripts=agent-desktop # npm 11
+```
+
+## Homebrew and Scoop
+
+There is no Homebrew or Scoop package. The custom Homebrew tap and Scoop bucket were removed in 1.0.1 (see the [changelog](/desktop/changelog)). An older tap or bucket install stays pinned to its version and can shadow the npm command. Check which executable runs, and uninstall the old one with the package manager that installed it:
+
+```bash
+command -v agent-desktop # macOS and Linux; in PowerShell: Get-Command agent-desktop
+```
+
+## Build from source
+
+You need the Rust toolchain pinned in `rust-toolchain.toml` (1.89.0), which `rustup` installs on first use, and a C toolchain: the Xcode command-line tools on macOS, the MSVC build tools on Windows, or `build-essential` on Linux.
+
+```bash
+git clone https://github.com/vercel-labs/agent-desktop && cd agent-desktop
+cargo build --release -p agent-desktop # writes target/release/agent-desktop
+```
+
+Build the helper for your platform and keep it beside the CLI. A platform crate compiles only on its own OS:
+
+```bash
+cargo build --release -p agent-desktop-macos --bin agent-desktop-macos-helper # macOS
+cargo build --release -p agent-desktop-linux --bins # Linux
+```
+
+## Verify the install
+
+```bash
+agent-desktop version
+agent-desktop status
+```
+
+`version` prints the CLI version, the architecture, and the OS:
+
+```json
+{
+ "version": "2.5",
+ "ok": true,
+ "command": "version",
+ "data": { "os": "linux", "target": "x86_64", "version": "1.0.1" }
+}
+```
+
+`status` reports the platform, the permission state, the surfaces this OS can read, and the [state root](/desktop/configuration#state-root):
+
+```json
+{
+ "version": "2.5",
+ "ok": true,
+ "command": "status",
+ "data": {
+ "permissions": {
+ "accessibility": { "state": "granted" },
+ "automation": { "state": "not_required" },
+ "screen_recording": { "state": "not_required" }
+ },
+ "platform": "linux",
+ "ref_count": null,
+ "session_id": null,
+ "snapshot_id": null,
+ "state_root": "/home/user/.agent-desktop",
+ "supported_surfaces": ["window", "sheet", "alert", "menu"],
+ "tracing": false,
+ "version": "1.0.1"
+ }
+}
+```
+
+## Grant permissions
+
+- **macOS:** grant Accessibility permission with `agent-desktop permissions --guide`. See [macOS](/desktop/platforms/macos).
+- **Windows:** no grant is needed for apps at your terminal's integrity level. See [Windows](/desktop/platforms/windows).
+- **Linux:** run inside the user's graphical session with a running AT-SPI bus, then check `agent-desktop status`. An empty `supported_surfaces` means the bus did not answer. See [Linux](/desktop/platforms/linux).
+
+Next, run the [quick start](/desktop/quick-start).
diff --git a/apps/docs/content/docs/meta.json b/apps/docs/content/docs/meta.json
index f0fbb5bbd..229ff0f53 100644
--- a/apps/docs/content/docs/meta.json
+++ b/apps/docs/content/docs/meta.json
@@ -1,3 +1,8 @@
{
- "pages": ["index", "installation"]
+ "pages": [
+ "index",
+ "installation",
+ "quick-start",
+ "skills"
+ ]
}
diff --git a/apps/docs/content/docs/quick-start.mdx b/apps/docs/content/docs/quick-start.mdx
new file mode 100644
index 000000000..95c657786
--- /dev/null
+++ b/apps/docs/content/docs/quick-start.mdx
@@ -0,0 +1,138 @@
+---
+title: Quick start
+navTitle: Quick start
+description: Run the observe, act, verify loop against a real desktop app. Check the install, map the app, drill into a region, click a ref, and verify the result.
+---
+
+This run drives GNOME Calculator on Linux: check the install, map the app, drill into one region, press a button, confirm the display changed, and put the app back. Every output below is real, trimmed where noted.
+
+Start GNOME Calculator in your graphical session, and run the commands from a terminal in the same session. On macOS or Windows, use an app name that `list-apps` prints (for example `"Calculator"`) and expect different refs. In PowerShell, quote every ref (`'@s2txcl95uvubmn:e1'`); see [Windows](/desktop/platforms/windows#use-powershell).
+
+## 1. Check the install
+
+```bash
+agent-desktop status # permissions, supported_surfaces, state_root
+agent-desktop skills get platform # the guide for this OS, in data.content
+```
+
+`data.permissions.accessibility.state` should be `granted`, and `data.supported_surfaces` should not be empty. Agents load the platform skill before their first action; see [Skills](/desktop/skills).
+
+## 2. Map the app
+
+A skeleton snapshot reads three levels and marks each cut branch with `children_count`:
+
+```bash
+agent-desktop snapshot --app gnome-calculator --skeleton -i --compact
+```
+
+```json
+{
+ "version": "2.5",
+ "ok": true,
+ "command": "snapshot",
+ "data": {
+ "app": "gnome-calculator",
+ "complete": true,
+ "ref_count": 2,
+ "snapshot_id": "s2txcl95uvubmn",
+ "tree": {
+ "role": "window",
+ "name": "Calculator",
+ "children": [
+ { "children_count": 2, "ref_id": "@s2txcl95uvubmn:e1", "role": "group" },
+ { "children_count": 1, "ref_id": "@s2txcl95uvubmn:e2", "role": "group" }
+ ]
+ }
+ }
+}
+```
+
+The tree is trimmed: wrapper groups and `native_id` fields are removed. `e1` is the calculator body and `e2` is the header bar. Every ref carries its snapshot id; pass it to later commands exactly as printed.
+
+## 3. Drill into a region
+
+```bash
+agent-desktop snapshot --root @s2txcl95uvubmn:e1 -i --compact
+```
+
+The drill reads `e1`'s subtree and adds 31 refs (`e3` to `e33`) to the same snapshot. Two of them:
+
+```json
+[
+ { "ref_id": "@s2txcl95uvubmn:e6", "role": "textfield", "available_actions": ["RightClick", "SetValue", "TypeText", "SetFocus"] },
+ { "ref_id": "@s2txcl95uvubmn:e11", "role": "button", "name": "7", "available_actions": ["Click", "SetFocus"] }
+]
+```
+
+`e6` is the display and `e11` is the 7 button. How drill targets and re-drills work is in [Skeleton and drill-down](/desktop/skeleton-and-drill-down).
+
+## 4. Act on a ref
+
+```bash
+agent-desktop click @s2txcl95uvubmn:e11
+```
+
+```json
+{
+ "version": "2.5",
+ "ok": true,
+ "command": "click",
+ "data": {
+ "action": "click",
+ "details": {
+ "auto_wait": {
+ "lease_contention_count": 0,
+ "lease_hold_ms": 114,
+ "read_only_preflight_attempts": 1,
+ "read_only_resolve_attempts": 1
+ }
+ },
+ "disposition": { "delivery": "delivered_unverified", "retry": "unsafe" },
+ "steps": [{ "label": "Action.DoAction", "mechanism": "semantic_api", "outcome": "succeeded" }],
+ "surfaces": [
+ { "id": "w-1.11-org-gnome-Calculator-a11y-948fd89a_9bda_453b_9c10_4a9e9eed3feb", "title": "Calculator", "type": "window" }
+ ]
+ }
+}
+```
+
+The click went through the accessibility API (`semantic_api`), without moving the cursor. `delivered_unverified` means it was dispatched but nothing confirmed the effect yet, and `retry: unsafe` means a repeat could press 7 twice. See [JSON output](/desktop/json-output#action-results-and-disposition).
+
+## 5. Verify
+
+The app updates its display asynchronously, so wait for the value instead of reading once or sleeping:
+
+```bash
+agent-desktop wait --element @s2txcl95uvubmn:e6 --predicate value --value 7 --timeout 5000
+```
+
+```json
+{
+ "version": "2.5",
+ "ok": true,
+ "command": "wait",
+ "data": {
+ "elapsed_ms": 286,
+ "found": true,
+ "observed": { "expected_chars": 1, "matched": true, "value_chars": 1, "value_present": true },
+ "predicate": "value",
+ "ref": "@s2txcl95uvubmn:e6"
+ }
+}
+```
+
+`get @s2txcl95uvubmn:e6 --property value` now returns `"7"`. A read taken immediately after the click can still show the old value, which is why the verify step waits. See [Waiting without sleeps](/desktop/guides/waiting).
+
+## 6. Restore the state
+
+Press **C** (`e8` in the same drill) so the app is as you found it:
+
+```bash
+agent-desktop click @s2txcl95uvubmn:e8
+```
+
+## Next steps
+
+- [The observe, act, verify loop](/desktop/guides/observe-act-verify): the loop as practice.
+- [Errors and recovery](/desktop/errors-and-recovery): what to do when a ref is stale or ambiguous.
+- [Commands](/desktop/commands): every command and flag.
diff --git a/apps/docs/content/docs/skills.mdx b/apps/docs/content/docs/skills.mdx
new file mode 100644
index 000000000..0a1d77ab6
--- /dev/null
+++ b/apps/docs/content/docs/skills.mdx
@@ -0,0 +1,143 @@
+---
+title: Skills
+navTitle: Skills
+description: Load agent-desktop's skills with the skills command. They are compiled into the binary, so they always match the installed version.
+---
+
+agent-desktop ships guides written for AI agents: the observe, act, and verify loop, the retry rules, and what differs on each OS. They are compiled into the binary, so the instructions an agent reads always match the version it runs. The `skills` command prints them. It needs no permission and no desktop session.
+
+## Bootstrap an agent
+
+Run these three commands before the first action:
+
+```bash
+agent-desktop status # platform, permissions, supported surfaces
+agent-desktop skills get desktop # the loop, refs, verification, and retry rules
+agent-desktop skills get platform # what differs on the OS the binary runs on
+```
+
+To make this automatic, put the bootstrap in your agent's instructions file (`AGENTS.md` or equivalent):
+
+```markdown
+Use `agent-desktop` to see and operate desktop apps. Before the first use, run
+`agent-desktop skills get desktop` and `agent-desktop skills get platform`, and follow them.
+```
+
+## The skills command
+
+Every form prints the JSON envelope. A skill's Markdown is in `data.content`.
+
+<table>
+ <thead>
+ <tr><th>Command</th><th>Description</th></tr>
+ </thead>
+ <tbody>
+ <tr><td><code>agent-desktop skills</code></td><td>List skills, the same as <code>skills list</code></td></tr>
+ <tr><td><code>agent-desktop skills list</code></td><td>List every bundled skill with its aliases and references</td></tr>
+ <tr><td><code>agent-desktop skills get &lt;name&gt;</code></td><td>Print one skill's main guide</td></tr>
+ <tr><td><code>agent-desktop skills get &lt;name&gt; &lt;reference&gt;</code></td><td>Print one reference file of that skill</td></tr>
+ <tr><td><code>agent-desktop skills get &lt;name&gt; --full</code></td><td>Print the main guide followed by every reference, each introduced by a <code>--- references/&lt;file&gt;.md ---</code> line</td></tr>
+ <tr><td><code>agent-desktop skills path</code></td><td>Report that skills are embedded, and list the available names</td></tr>
+ </tbody>
+</table>
+
+`--full` is the only flag the command adds, and it has no effect when you pass a reference. To read a skill as plain Markdown, extract `data.content`:
+
+```bash
+agent-desktop skills get desktop | jq -r '.data.content'
+```
+
+`skills path` confirms there is no skills directory on disk:
+
+```json
+{
+ "version": "2.5",
+ "ok": true,
+ "command": "skills",
+ "data": {
+ "available": ["agent-desktop", "agent-desktop-macos", "agent-desktop-windows", "agent-desktop-linux", "agent-desktop-ffi", "jev-desktop"],
+ "location": "embedded",
+ "note": "Skills are compiled into this binary and are always version-matched. Run `agent-desktop skills get <name>` to print a skill, or redirect into a file to extract a copy."
+ }
+}
+```
+
+## Available skills
+
+`<name>` accepts the canonical name or an alias.
+
+<table>
+ <thead>
+ <tr><th>Name</th><th>Alias</th><th>Covers</th></tr>
+ </thead>
+ <tbody>
+ <tr><td><code>agent-desktop</code></td><td><code>desktop</code></td><td>The core guide for every OS: the snapshot and ref loop, verification and retry rules, and when to open each reference. Load it first.</td></tr>
+ <tr><td><code>agent-desktop-macos</code></td><td><code>macos</code></td><td>What differs on macOS: permissions, Notification Center, troubleshooting.</td></tr>
+ <tr><td><code>agent-desktop-windows</code></td><td><code>windows</code></td><td>What differs on Windows: PowerShell quoting, elevation, shell surfaces, Chromium and Electron, troubleshooting.</td></tr>
+ <tr><td><code>agent-desktop-linux</code></td><td><code>linux</code></td><td>What differs on Linux: the AT-SPI bus, X11 and Wayland, window lifecycle, capture and clipboard, shell and notifications, troubleshooting.</td></tr>
+ <tr><td><code>agent-desktop-ffi</code></td><td><code>ffi</code></td><td>Embedding agent-desktop through the <a href="/desktop/ffi">C library</a>: build and link, errors, ownership, threading.</td></tr>
+ <tr><td><code>jev-desktop</code></td><td><code>jev</code></td><td>An optional helper that drives an app from a plain-language goal. It needs a clone of the repository and an API key, and it is not part of the native CLI.</td></tr>
+ </tbody>
+</table>
+
+`platform` resolves to the skill for the OS the binary runs on. `skills list` marks platform skills with `platform` and `current`; this is the Linux entry on a Linux machine:
+
+```json
+{
+ "aliases": ["linux", "agent-desktop-linux"],
+ "current": true,
+ "name": "agent-desktop-linux",
+ "platform": "linux",
+ "references": [
+ "references/bus-and-permissions.md",
+ "references/display-servers-and-input.md",
+ "references/windows-and-lifecycle.md",
+ "references/capture-and-clipboard.md",
+ "references/shell-tray-and-notifications.md",
+ "references/troubleshooting.md"
+ ]
+}
+```
+
+An unknown name returns `INVALID_ARGS` and lists every alias:
+
+```json
+{
+ "code": "INVALID_ARGS",
+ "message": "Unknown skill 'nope'. Known: desktop, agent-desktop, macos, agent-desktop-macos, windows, agent-desktop-windows, linux, agent-desktop-linux, ffi, agent-desktop-ffi, jev, jev-desktop"
+}
+```
+
+## References
+
+Load a reference only when you need it. Name it by path (`references/workflows.md`), file name (`workflows.md`), or stem (`workflows`):
+
+```bash
+agent-desktop skills get desktop workflows
+agent-desktop skills get linux troubleshooting
+```
+
+<table>
+ <thead>
+ <tr><th>Skill</th><th>References</th></tr>
+ </thead>
+ <tbody>
+ <tr><td><code>desktop</code></td><td><code>commands-observation</code>, <code>commands-interaction</code>, <code>commands-system</code>, <code>workflows</code></td></tr>
+ <tr><td><code>macos</code></td><td><code>troubleshooting</code></td></tr>
+ <tr><td><code>windows</code></td><td><code>permissions-and-elevation</code>, <code>chromium-and-electron</code>, <code>troubleshooting</code>, <code>shell-and-overlay</code></td></tr>
+ <tr><td><code>linux</code></td><td><code>bus-and-permissions</code>, <code>display-servers-and-input</code>, <code>windows-and-lifecycle</code>, <code>capture-and-clipboard</code>, <code>shell-tray-and-notifications</code>, <code>troubleshooting</code></td></tr>
+ <tr><td><code>ffi</code></td><td><code>build-and-link</code>, <code>error-handling</code>, <code>ownership</code>, <code>threading</code></td></tr>
+ </tbody>
+</table>
+
+An unknown reference returns `INVALID_ARGS` and lists the available ones.
+
+## Install a skill in an agent harness
+
+A harness that supports skills can also install a static copy with `npx skills add`:
+
+```bash
+npx skills add https://github.com/vercel-labs/agent-desktop --skill agent-desktop
+```
+
+You can also add `--skill agent-desktop-ffi` or the platform skill for your OS (`agent-desktop-macos`, `agent-desktop-windows`, or `agent-desktop-linux`). An installed copy can go stale when you upgrade the CLI, so prefer `agent-desktop skills get`, which always matches the binary you run.
diff --git a/apps/docs/proxy.ts b/apps/docs/proxy.ts
index 4942d87c6..905f2fb3d 100644
--- a/apps/docs/proxy.ts
+++ b/apps/docs/proxy.ts
@@ -52,7 +52,7 @@ const proxy = createProxy({
export const config = {
matcher: [
- "/((?!vc-ap-[^/]+/|desktop/api(?:/|$)|desktop/favicon.ico|api(?:/|$)|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
+ "/((?!vc-ap-[^/]+/|desktop/api(?:/|$)|desktop/favicon.ico|desktop/diagrams/|api(?:/|$)|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
],
};
diff --git a/apps/docs/public/desktop/diagrams/architecture/index.html b/apps/docs/public/desktop/diagrams/architecture/index.html
new file mode 100644
index 000000000..de7fd9d53
--- /dev/null
+++ b/apps/docs/public/desktop/diagrams/architecture/index.html
@@ -0,0 +1,122 @@
+<!doctype html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>agent-desktop architecture</title>
+<script>
+ var t = new URLSearchParams(location.search).get("theme");
+ if (t === "light" || t === "dark") document.documentElement.setAttribute("data-theme", t);
+ if (window.self === window.top) document.documentElement.setAttribute("data-top", "");
+</script>
+<style>
+ :root {
+ color-scheme: dark;
+ --bg: #000; --panel: #0a0a0a; --node: #111; --border: #5c5c5c;
+ --fg: #ededed; --muted: #8f8f8f; --line: #8f8f8f; --line-strong: #ededed;
+ --hl-fill: #0a2a5e; --hl-ring: #1e5fd6; --hl-icon: #cfe0ff;
+ }
+ @media (prefers-color-scheme: light) {
+ :root:not([data-theme]) {
+ color-scheme: light;
+ --bg: #fff; --panel: #fafafa; --node: #fff; --border: #b8b8b8;
+ --fg: #171717; --muted: #666; --line: #7a7a7a; --line-strong: #171717;
+ --hl-fill: #dbe8ff; --hl-ring: #2563eb; --hl-icon: #1d4ed8;
+ }
+ }
+ :root[data-theme="light"] {
+ color-scheme: light;
+ --bg: #fff; --panel: #fafafa; --node: #fff; --border: #b8b8b8;
+ --fg: #171717; --muted: #666; --line: #7a7a7a; --line-strong: #171717;
+ --hl-fill: #dbe8ff; --hl-ring: #2563eb; --hl-icon: #1d4ed8;
+ }
+ html, body { margin: 0; background: transparent; }
+ :root[data-top], :root[data-top] body { background: var(--bg); }
+ svg { display: block; width: 100%; height: auto; font-family: Geist, "Geist Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
+ .box { fill: var(--panel); stroke: var(--border); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
+ .node { fill: var(--node); }
+ .label { fill: var(--fg); font-size: 15px; text-anchor: middle; }
+ .sub { fill: var(--muted); font-size: 11.5px; text-anchor: middle; }
+ .head { fill: var(--fg); font-size: 16px; font-weight: 500; }
+ .tag { fill: var(--muted); font-size: 12.5px; text-anchor: middle; }
+ .wire { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; marker-end: url(#arrow); }
+ .wire.strong { stroke: var(--line-strong); }
+ .icon { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
+ .icon.fg { stroke: var(--fg); }
+ .hl { fill: var(--hl-fill); stroke: var(--hl-ring); stroke-width: 1; vector-effect: non-scaling-stroke; }
+ .hl-icon { fill: none; stroke: var(--hl-icon); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
+ #arrow path { fill: none; stroke: var(--line); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
+ .label, .sub { text-anchor: start; }
+ .tag.start { text-anchor: start; }
+ .ico { fill: var(--muted); }
+ .ico.fg { fill: var(--fg); }
+ .hl-ico { fill: var(--hl-icon); }
+ .label.dim { fill: var(--muted); }
+</style>
+</head>
+<body>
+<svg viewBox="0 0 720 672" role="img" aria-labelledby="t d">
+ <title id="t">agent-desktop architecture</title>
+ <desc id="d">From top to bottom: the calling agent runs the agent-desktop CLI or links the agent-desktop-ffi C library. Both call agent-desktop-core, which holds the commands, snapshot building, and the RefStore. Core calls the PlatformAdapter trait, and one platform crate implements it, chosen at compile time: agent-desktop-macos over the AX API, agent-desktop-windows over UI Automation, or agent-desktop-linux over AT-SPI. The platform crate reads the target app's accessibility tree.</desc>
+ <defs>
+ <marker id="arrow" viewBox="0 0 8 8" refX="6" refY="4" markerWidth="8" markerHeight="8" markerUnits="userSpaceOnUse" orient="auto">
+ <path d="M1.5 1.5 L5.5 4 L1.5 6.5"/>
+ </marker>
+ </defs>
+ <circle class="hl" cx="360" cy="40" r="28"/>
+ <svg class="hl-ico" x="349" y="29" width="22" height="22" viewBox="0 0 16 16"><path d="M8.75 2.8a1.5 1.5 0 1 0-1.5 0V5H7a6 6 0 0 0-5.92 5H0v3h1v3h14v-3h1v-3h-1.08A6 6 0 0 0 9 5h-.25zM7 6.5A4.5 4.5 0 0 0 2.5 11v3.5h11V11A4.5 4.5 0 0 0 9 6.5zm.25 4.75a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0M10.5 13a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5" fill-rule="evenodd" clip-rule="evenodd"/></svg>
+ <text class="label" x="402" y="36">calling agent</text>
+ <text class="sub" x="402" y="53">your code or an LLM loop</text>
+ <path class="wire strong" d="M352 74V112a14 14 0 0 1-14 14H239a14 14 0 0 0-14 14V144"/>
+ <path class="wire strong" d="M368 74V112a14 14 0 0 0 14 14H481a14 14 0 0 1 14 14V144"/>
+ <rect class="box" x="40" y="96" width="640" height="560" rx="8" style="fill:none"/>
+ <svg class="ico fg" x="60" y="113" width="20" height="20" viewBox="0 0 16 16"><path d="M0 2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v8.5a1 1 0 0 1-1 1H8.75v3h1.75V16h-5v-1.5h1.75v-3H1a1 1 0 0 1-1-1zm1.5.5V10h13V2.5z" fill-rule="evenodd" clip-rule="evenodd"/></svg>
+ <text class="head" x="90" y="128">Your machine</text>
+ <rect class="box node" x="110" y="150" width="230" height="56" rx="6"/>
+ <svg class="ico" x="126" y="169.0" width="18" height="18" viewBox="0 0 16 16"><path d="m1.53 12.78-.53.53-1.06-1.06.53-.53L4.19 8 .47 4.28l-.53-.53L1 2.69l.53.53L5.6 7.29a1 1 0 0 1 0 1.42zm7.22-.28H8V14h8v-1.5H8.75" fill-rule="evenodd" clip-rule="evenodd"/></svg>
+ <text class="label" x="154" y="174.0">agent-desktop</text>
+ <text class="sub" x="154" y="191.0">CLI: one JSON envelope per call</text>
+ <rect class="box node" x="380" y="150" width="230" height="56" rx="6"/>
+ <svg class="ico" x="396" y="169.0" width="18" height="18" viewBox="0 0 16 16"><path d="M0.75 1H0V1.75V13.25V14H0.75H5.5V12.5H1.5V2.5H5C6.24264 2.5 7.25 3.50736 7.25 4.75V6.5H8.75V4.75C8.75 3.50736 9.75736 2.5 11 2.5H14.5V6.5H16V1.75V1H15.25H11C9.7733 1 8.68417 1.58901 8 2.49963C7.31583 1.58901 6.2267 1 5 1H0.75ZM11.0915 10.2175C11.4564 10.0309 11.7944 9.70265 11.9642 9.25H12.0358C12.2056 9.70265 12.5436 10.0309 12.9085 10.2175C12.9698 10.2488 13.0294 10.2833 13.0871 10.3208C13.4317 10.5446 13.886 10.6736 14.3637 10.5941L14.3994 10.6559C14.0923 11.0289 13.9765 11.4857 13.9973 11.8955C13.9991 11.93 14 11.9649 14 12C14 12.0351 13.9991 12.07 13.9973 12.1044C13.9765 12.5143 14.0923 12.9711 14.3994 13.3441L14.3637 13.4059C13.886 13.3264 13.4317 13.4554 13.0871 13.6792C13.0294 13.7167 12.9698 13.7512 12.9085 13.7825C12.5436 13.9691 12.2056 14.2973 12.0358 14.75H11.9642C11.7944 14.2973 11.4564 13.9691 11.0915 13.7825C11.0302 13.7512 10.9706 13.7167 10.9129 13.6792C10.5683 13.4554 10.114 13.3264 9.63627 13.4059L9.60059 13.3441C9.90769 12.9711 10.0235 12.5144 10.0027 12.1045C10.0009 12.07 10 12.0351 10 12C10 11.9649 10.0009 11.93 10.0027 11.8955C10.0235 11.4856 9.9077 11.0289 9.60061 10.6559L9.63629 10.5941C10.114 10.6736 10.5683 10.5446 10.9129 10.3208C10.9706 10.2833 11.0302 10.2488 11.0915 10.2175ZM15.4037 11.4079L15.9641 10.866L14.9641 9.13398L14.215 9.34827C14.0629 9.39177 13.9006 9.35863 13.7679 9.27247C13.6743 9.21169 13.5774 9.15559 13.4775 9.1045C13.3369 9.03257 13.2272 8.90865 13.1888 8.75537L13 8H11L10.8112 8.75537C10.7728 8.90865 10.6631 9.03257 10.5225 9.1045C10.4226 9.15558 10.3257 9.21168 10.2321 9.27247C10.0994 9.35862 9.93709 9.39176 9.78502 9.34826L9.03591 9.13397L8.03591 10.866L8.5963 11.4079C8.70977 11.5176 8.7623 11.6743 8.75427 11.8319C8.75143 11.8876 8.75 11.9436 8.75 12C8.75 12.0564 8.75143 12.1124 8.75427 12.168C8.7623 12.3257 8.70977 12.4824 8.5963 12.5921L8.03589 13.134L9.03589 14.866L9.78501 14.6517C9.93708 14.6082 10.0994 14.6414 10.2321 14.7275C10.3257 14.7883 10.4226 14.8444 10.5225 14.8955C10.6631 14.9674 10.7728 15.0913 10.8112 15.2446L11 16H13L13.1888 15.2446C13.2272 15.0913 13.3369 14.9674 13.4775 14.8955C13.5774 14.8444 13.6743 14.7883 13.7679 14.7275C13.9006 14.6414 14.0629 14.6082 14.215 14.6517L14.9641 14.866L15.9641 13.134L15.4037 12.5921C15.2902 12.4824 15.2377 12.3257 15.2457 12.168C15.2486 12.1124 15.25 12.0564 15.25 12C15.25 11.9436 15.2486 11.8876 15.2457 11.832C15.2377 11.6743 15.2902 11.5176 15.4037 11.4079Z" fill-rule="evenodd" clip-rule="evenodd"/></svg>
+ <text class="label" x="424" y="174.0">agent-desktop-ffi</text>
+ <text class="sub" x="424" y="191.0">C library: ad_* functions</text>
+ <path class="wire strong" d="M225 212V214a14 14 0 0 0 14 14H316a14 14 0 0 1 14 14V244"/>
+ <path class="wire strong" d="M495 212V214a14 14 0 0 1-14 14H404a14 14 0 0 0-14 14V244"/>
+ <rect class="box node" x="230" y="250" width="260" height="56" rx="6"/>
+ <svg class="ico" x="246" y="269.0" width="18" height="18" viewBox="0 0 16 16"><path d="m8.35.34 6.25 3.25.4.2v8.42l-.4.2-6.25 3.26-.35.18-.35-.18-6.25-3.25-.4-.21V3.8l.4-.21L7.65.34 8 .15zM2.5 11.3l4.75 2.46V7.81L2.5 5.44zM8.75 7.8v5.95l4.75-2.46V5.44zM3.42 4.22 8 6.52l4.58-2.3L8 1.85z"/></svg>
+ <text class="label" x="274" y="274.0">agent-desktop-core</text>
+ <text class="sub" x="274" y="291.0">commands, snapshot, RefStore</text>
+ <path class="wire strong" d="M360 312V340"/>
+ <rect class="box node" x="250" y="346" width="220" height="56" rx="6"/>
+ <svg class="ico" x="266" y="365.0" width="18" height="18" viewBox="0 0 16 16"><path d="M7.53.72 7 .19 5.94 1.25l.53.53.22.22H3.37a3.38 3.38 0 0 0 0 6.75h9.25a1.88 1.88 0 0 1 0 3.75H4.9a2.5 2.5 0 1 0 0 1.5h7.74a3.37 3.37 0 1 0 0-6.75H3.37a1.88 1.88 0 0 1 0-3.75H6.7l-.22.22-.53.53L7 5.31l.53-.53 1.32-1.32a1 1 0 0 0 0-1.42zM2.5 14.25a1 1 0 1 0 0-2 1 1 0 0 0 0 2m12-11.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m1.5 0a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0" fill-rule="evenodd" clip-rule="evenodd"/></svg>
+ <text class="label" x="294" y="370.0">PlatformAdapter</text>
+ <text class="sub" x="294" y="387.0">trait in core/adapter</text>
+ <text class="tag start" x="484" y="388">one chosen at compile time</text>
+ <path class="wire" d="M360 408V456"/>
+ <path class="wire" d="M352 408V420a14 14 0 0 1-14 14H174a14 14 0 0 0-14 14V456"/>
+ <path class="wire" d="M368 408V420a14 14 0 0 0 14 14H546a14 14 0 0 1 14 14V456"/>
+ <rect class="box node" x="70" y="462" width="180" height="56" rx="6"/>
+ <svg class="ico" x="86" y="481.0" width="18" height="18" viewBox="0 0 24 24"><path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"/></svg>
+ <text class="label" x="114" y="486.0">macOS</text>
+ <text class="sub" x="114" y="503.0">agent-desktop-macos</text>
+ <rect class="box node" x="270" y="462" width="180" height="56" rx="6"/>
+ <svg class="ico" x="286" y="481.0" width="18" height="18" viewBox="0 0 16 16"><path d="M0 0h7.5v7.5H0zM8.5 0H16v7.5H8.5zM0 8.5h7.5V16H0zM8.5 8.5H16V16H8.5z"/></svg>
+ <text class="label" x="314" y="486.0">Windows</text>
+ <text class="sub" x="314" y="503.0">agent-desktop-windows</text>
+ <rect class="box node" x="470" y="462" width="180" height="56" rx="6"/>
+ <svg class="ico" x="486" y="481.0" width="18" height="18" viewBox="0 0 24 24"><path d="M12.504 0c-.155 0-.315.008-.48.021-4.226.333-3.105 4.807-3.17 6.298-.076 1.092-.3 1.953-1.05 3.02-.885 1.051-2.127 2.75-2.716 4.521-.278.832-.41 1.684-.287 2.489a.424.424 0 00-.11.135c-.26.268-.45.6-.663.839-.199.199-.485.267-.797.4-.313.136-.658.269-.864.68-.09.189-.136.394-.132.602 0 .199.027.4.055.536.058.399.116.728.04.97-.249.68-.28 1.145-.106 1.484.174.334.535.47.94.601.81.2 1.91.135 2.774.6.926.466 1.866.67 2.616.47.526-.116.97-.464 1.208-.946.587-.003 1.23-.269 2.26-.334.699-.058 1.574.267 2.577.2.025.134.063.198.114.333l.003.003c.391.778 1.113 1.132 1.884 1.071.771-.06 1.592-.536 2.257-1.306.631-.765 1.683-1.084 2.378-1.503.348-.199.629-.469.649-.853.023-.4-.2-.811-.714-1.376v-.097l-.003-.003c-.17-.2-.25-.535-.338-.926-.085-.401-.182-.786-.492-1.046h-.003c-.059-.054-.123-.067-.188-.135a.357.357 0 00-.19-.064c.431-1.278.264-2.55-.173-3.694-.533-1.41-1.465-2.638-2.175-3.483-.796-1.005-1.576-1.957-1.56-3.368.026-2.152.236-6.133-3.544-6.139zm.529 3.405h.013c.213 0 .396.062.584.198.19.135.33.332.438.533.105.259.158.459.166.724 0-.02.006-.04.006-.06v.105a.086.086 0 01-.004-.021l-.004-.024a1.807 1.807 0 01-.15.706.953.953 0 01-.213.335.71.71 0 00-.088-.042c-.104-.045-.198-.064-.284-.133a1.312 1.312 0 00-.22-.066c.05-.06.146-.133.183-.198.053-.128.082-.264.088-.402v-.02a1.21 1.21 0 00-.061-.4c-.045-.134-.101-.2-.183-.333-.084-.066-.167-.132-.267-.132h-.016c-.093 0-.176.03-.262.132a.8.8 0 00-.205.334 1.18 1.18 0 00-.09.4v.019c.002.089.008.179.02.267-.193-.067-.438-.135-.607-.202a1.635 1.635 0 01-.018-.2v-.02a1.772 1.772 0 01.15-.768c.082-.22.232-.406.43-.533a.985.985 0 01.594-.2zm-2.962.059h.036c.142 0 .27.048.399.135.146.129.264.288.344.465.09.199.14.4.153.667v.004c.007.134.006.2-.002.266v.08c-.03.007-.056.018-.083.024-.152.055-.274.135-.393.2.012-.09.013-.18.003-.267v-.015c-.012-.133-.04-.2-.082-.333a.613.613 0 00-.166-.267.248.248 0 00-.183-.064h-.021c-.071.006-.13.04-.186.132a.552.552 0 00-.12.27.944.944 0 00-.023.33v.015c.012.135.037.2.08.334.046.134.098.2.166.268.01.009.02.018.034.024-.07.057-.117.07-.176.136a.304.304 0 01-.131.068 2.62 2.62 0 01-.275-.402 1.772 1.772 0 01-.155-.667 1.759 1.759 0 01.08-.668 1.43 1.43 0 01.283-.535c.128-.133.26-.2.418-.2zm1.37 1.706c.332 0 .733.065 1.216.399.293.2.523.269 1.052.468h.003c.255.136.405.266.478.399v-.131a.571.571 0 01.016.47c-.123.31-.516.643-1.063.842v.002c-.268.135-.501.333-.775.465-.276.135-.588.292-1.012.267a1.139 1.139 0 01-.448-.067 3.566 3.566 0 01-.322-.198c-.195-.135-.363-.332-.612-.465v-.005h-.005c-.4-.246-.616-.512-.686-.71-.07-.268-.005-.47.193-.6.224-.135.38-.271.483-.336.104-.074.143-.102.176-.131h.002v-.003c.169-.202.436-.47.839-.601.139-.036.294-.065.466-.065zm2.8 2.142c.358 1.417 1.196 3.475 1.735 4.473.286.534.855 1.659 1.102 3.024.156-.005.33.018.513.064.646-1.671-.546-3.467-1.089-3.966-.22-.2-.232-.335-.123-.335.59.534 1.365 1.572 1.646 2.757.13.535.16 1.104.021 1.67.067.028.135.06.205.067 1.032.534 1.413.938 1.23 1.537v-.043c-.06-.003-.12 0-.18 0h-.016c.151-.467-.182-.825-1.065-1.224-.915-.4-1.646-.336-1.77.465-.008.043-.013.066-.018.135-.068.023-.139.053-.209.064-.43.268-.662.669-.793 1.187-.13.533-.17 1.156-.205 1.869v.003c-.02.334-.17.838-.319 1.35-1.5 1.072-3.58 1.538-5.348.334a2.645 2.645 0 00-.402-.533 1.45 1.45 0 00-.275-.333c.182 0 .338-.03.465-.067a.615.615 0 00.314-.334c.108-.267 0-.697-.345-1.163-.345-.467-.931-.995-1.788-1.521-.63-.4-.986-.87-1.15-1.396-.165-.534-.143-1.085-.015-1.645.245-1.07.873-2.11 1.274-2.763.107-.065.037.135-.408.974-.396.751-1.14 2.497-.122 3.854a8.123 8.123 0 01.647-2.876c.564-1.278 1.743-3.504 1.836-5.268.048.036.217.135.289.202.218.133.38.333.59.465.21.201.477.335.876.335.039.003.075.006.11.006.412 0 .73-.134.997-.268.29-.134.52-.334.74-.4h.005c.467-.135.835-.402 1.044-.7zm2.185 8.958c.037.6.343 1.245.882 1.377.588.134 1.434-.333 1.791-.765l.211-.01c.315-.007.577.01.847.268l.003.003c.208.199.305.53.391.876.085.4.154.78.409 1.066.486.527.645.906.636 1.14l.003-.007v.018l-.003-.012c-.015.262-.185.396-.498.595-.63.401-1.746.712-2.457 1.57-.618.737-1.37 1.14-2.036 1.191-.664.053-1.237-.2-1.574-.898l-.005-.003c-.21-.4-.12-1.025.056-1.69.176-.668.428-1.344.463-1.897.037-.714.076-1.335.195-1.814.12-.465.308-.797.641-.984l.045-.022zm-10.814.049h.01c.053 0 .105.005.157.014.376.055.706.333 1.023.752l.91 1.664.003.003c.243.533.754 1.064 1.189 1.637.434.598.77 1.131.729 1.57v.006c-.057.744-.48 1.148-1.125 1.294-.645.135-1.52.002-2.395-.464-.968-.536-2.118-.469-2.857-.602-.369-.066-.61-.2-.723-.4-.11-.2-.113-.602.123-1.23v-.004l.002-.003c.117-.334.03-.752-.027-1.118-.055-.401-.083-.71.043-.94.16-.334.396-.4.69-.533.294-.135.64-.202.915-.47h.002v-.002c.256-.268.445-.601.668-.838.19-.201.38-.336.663-.336zm7.159-9.074c-.435.201-.945.535-1.488.535-.542 0-.97-.267-1.28-.466-.154-.134-.28-.268-.373-.335-.164-.134-.144-.333-.074-.333.109.016.129.134.199.2.096.066.215.2.36.333.292.2.68.467 1.167.467.485 0 1.053-.267 1.398-.466.195-.135.445-.334.648-.467.156-.136.149-.267.279-.267.128.016.034.134-.147.332a8.097 8.097 0 01-.69.468zm-1.082-1.583V5.64c-.006-.02.013-.042.029-.05.074-.043.18-.027.26.004.063 0 .16.067.15.135-.006.049-.085.066-.135.066-.055 0-.092-.043-.141-.068-.052-.018-.146-.008-.163-.065zm-.551 0c-.02.058-.113.049-.166.066-.047.025-.086.068-.14.068-.05 0-.13-.02-.136-.068-.01-.066.088-.133.15-.133.08-.031.184-.047.259-.005.019.009.036.03.03.05v.02h.003z"/></svg>
+ <text class="label" x="514" y="486.0">Linux</text>
+ <text class="sub" x="514" y="503.0">agent-desktop-linux</text>
+ <path class="wire" d="M160 524V572"/>
+ <text class="tag start" x="170" y="552">AX API</text>
+ <path class="wire" d="M360 524V572"/>
+ <text class="tag start" x="370" y="552">UI Automation</text>
+ <path class="wire" d="M560 524V572"/>
+ <text class="tag start" x="570" y="552">AT-SPI</text>
+ <rect class="box node" x="70" y="578" width="580" height="56" rx="6"/>
+ <svg class="ico" x="86" y="597.0" width="18" height="18" viewBox="0 0 16 16"><path d="M1 3.25C1 1.45 2.46 0 4.25 0h7.5C13.55 0 15 1.46 15 3.25V16H1V3.25M4.25 1.5c-.97 0-1.75.78-1.75 1.75V14.5h11V3.25c0-.97-.78-1.75-1.75-1.75zM4 4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6H4zm5 9h3v-1.5H9z" fill-rule="evenodd" clip-rule="evenodd"/></svg>
+ <text class="label" x="114" y="602.0">Target app</text>
+ <text class="sub" x="114" y="619.0">its accessibility tree</text>
+</svg>
+</body>
+</html>