The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
docs(computer-use): skill matches the driver's current vocabulary
teknium142602bd12a49
diff --git a/skills/autonomous-ai-agents/computer-use/SKILL.md b/skills/autonomous-ai-agents/computer-use/SKILL.mdindex 9a8e7e98d44..7e891d38498 100644--- a/skills/autonomous-ai-agents/computer-use/SKILL.md+++ b/skills/autonomous-ai-agents/computer-use/SKILL.md@@ -1,7 +1,7 @@---name: computer-usedescription: "Drive the desktop background-first; escalate on signal."-version: 2.0.0+version: 2.1.0author: Francesco Bonacci (f-trycua), Hermes Agentlicense: MITplatforms: [macos, windows, linux]@@ -25,12 +25,14 @@ or an open model on a local OpenAI-compatible endpoint. There is noAnthropic-native schema to learn.Hermes drives [cua-driver](https://github.com/trycua/cua) under the hood.-This wrapper skill teaches the Hermes `computer_use` workflow and action-vocabulary. Call the actions documented below instead of raw cua-driver MCP-tools. For driver internals and platform-specific behavior, follow the Cua-skill installed by `cua-driver skills install`. Hermes autodetection is a-planned cua-driver follow-up, so currently point Hermes at the resulting-`~/.cua-driver/skills/cua-driver` directory or symlink it into your skill space.+This skill teaches the Hermes `computer_use` **action vocabulary**, which is+NOT the driver's raw MCP vocabulary. Call the actions documented below and+never the driver's tools by name: `capture` is a Hermes action that maps to+the driver's `get_window_state`; `element=N` is a Hermes argument that the+wrapper translates into the driver's `element_token` handle. If you see a+driver-side error mentioning `snapshot_id`, `element_token`, or "no reviewed+risk classification", you (or a stale description) called the raw driver+vocabulary — go back to the actions below.## The canonical workflow@@ -40,8 +42,7 @@ planned cua-driver follow-up, so currently point Hermes at the resultingcomputer_use(action="capture", mode="som", app="<the app you're driving>")```-Returns a screenshot with numbered overlays on every interactable-element AND an AX-tree index like:+Returns a screenshot plus an indexed element list like:```#1 AXButton 'Back' @ (12, 80, 28, 28) [Chrome]@@ -50,6 +51,12 @@ element AND an AX-tree index like:...```+The `#N` index is the ONLY element handle you use. Behind it the wrapper+keeps this snapshot's opaque per-element token and sends it with every+`element=N` action, so a click on an index from a superseded snapshot is+refused explicitly (`stale`) instead of landing on the wrong control.+Re-capture after anything that changes the screen; indices do not survive it.+The role names match the host platform's accessibility framework(`AXButton` on macOS, `Button` on Windows UIA, `push button` on LinuxAT-SPI) — treat them as labels, not as strict types.@@ -75,9 +82,20 @@ computer_use(action="click", element=7, capture_after=True)| `mode` | Returns | Best for ||---|---|---|-| `som` (default) | Screenshot + numbered overlays + AX index | Vision models; preferred default |-| `vision` | Plain screenshot | When SOM overlay interferes with what you want to verify |-| `ax` | AX tree only, no image | Text-only models, or when you don't need to see pixels |+| `som` (default) | Screenshot + indexed element list | Vision models; preferred default |+| `vision` | Plain screenshot, no elements | When you only need pixels (then click by `coordinate=`) |+| `ax` | Element list only, no image | Text-only models, or when you don't need to see pixels |++Current drivers always return the screenshot AND the tree in one call;+`mode` decides what Hermes hands back to you, not what the driver does.+There is no numbered overlay burned into the screenshot — the index list is+the map; ground on both and cross-check (the tree lies on some surfaces).++**No vision model?** If your main model can't read images (or the provider+rejects image tool results), Hermes routes the screenshot through the+auxiliary vision model and you get a text description instead of pixels.+Configure `auxiliary.vision` in `config.yaml` to pick that model, or use+`mode="ax"` and drive by element index without a screenshot at all.## Actions@@ -91,8 +109,10 @@ drag from_element=N, to_element=M (or from/to_coordinate)scroll direction=up|down|left|right amount=3 (ticks)type text="…"key keys="<save shortcut>" | "return" | "escape" | "<modifier>+t"+set_value element=N value="…" (selects/sliders without opening the menu)wait seconds=0.5list_apps+list_windowsfocus_app app="<app name>" raise_window=false (default: don't raise)```@@ -117,8 +137,8 @@ Returned fields (present when the driver supports them):(ran but almost certainly did nothing).- `escalation`: `{recommended: "px" | "foreground", reason}` — presentonly when there's a next rung to try.-- `code`: a structured refusal like `"background_unavailable"` or- `"foreground_unsupported"`.+- `code`: a structured refusal like `"background_unavailable"`,+ `"foreground_unsupported"`, or `"stale"` (re-capture, then retry by index).- `verified`: `true` only on AX read-back.Walk it in order:@@ -241,8 +261,8 @@ computer_use(action="scroll", direction="down", amount=3, coordinate=[500, 400])`list_apps` returns running apps with bundle IDs / process names, PIDs,and window counts. `focus_app` routes input to an app without raisingit. You rarely need to focus explicitly — passing `app=...` to-`capture` / `click` / `type` will target that app's frontmost window-automatically.+`capture` will target that app's frontmost window and every following+input action goes to that same window (input actions ignore `app=`).## Delivering screenshots to the user@@ -281,10 +301,13 @@ in your conversation context.|---|---|| `cua-driver not installed` | Run `hermes computer-use install`, or `hermes tools` and enable Computer Use || Captures consistently return empty / "no on-screen window" | On Linux: DISPLAY may not be set (X11) or you're on pure Wayland — ask the user to run `hermes computer-use doctor`. On Windows: you may be in Session 0 (SSH session) instead of the interactive desktop — see the cua-driver `WINDOWS.md` deep-dive |-| Element index stale ("Element N not in cache") | SOM indices are only valid until the next `capture`. Re-capture before clicking. The wrapper carries opaque `element_token`s for stale-detection; you'll see an explicit error rather than a wrong click |+| `code:"stale"` / "element_token is stale" | Indices belong to one snapshot. Re-`capture`, read the new indices, then act. Never reuse an index across a capture |+| "bare element_index is not accepted" / `snapshot_id_required` | The driver saw a raw index without its token. This is a wrapper defect, not something you fix by passing `snapshot_id` (Hermes has no such argument). Re-capture once; if it repeats, tell the user to run `hermes update` and fall back to `coordinate=[x, y]` from the capture's bounds meanwhile |+| "tool 'capture' has no reviewed risk classification" / `Unknown tool` | Something called the driver's MCP vocabulary directly (`capture`, `screenshot`, `get_window_state`, `click` with raw args). Only the `computer_use(action=…)` vocabulary in this file exists on the Hermes side || Click had no effect | Read the structured verdict. `effect:"unverifiable"` → fresh capture/state before retry, even with an escalation hint. `effect:"suspected_noop"` or a structured refusal → climb the recommended ladder: coordinate (px), then foreground. Browser chrome/native prompts remain native; page content is a separate toolset. Don't conclude the app is undrivable || Type text disappears into a terminal emulator | cua-driver detects terminals (Ghostty, iTerm2, Terminal.app, Windows Terminal, mintty, etc.) and routes through key-event synthesis — should "just work" on a recent cua-driver. If it doesn't, ask the user to run `hermes computer-use doctor` || `blocked pattern in type text` | You tried to `type` a shell command matching the dangerous-pattern block list (`curl ... \| bash`, `sudo rm -rf`, etc.). Break the command up or reconsider |+| `hermes computer-use doctor` says "could not be started … Access is denied" (Windows) | The Hermes venv interpreter can't execute a binary under `C:\Program Files\WindowsApps`; the tool itself may still work because the shell resolves another copy on PATH. Fix once: reinstall cua-driver with the upstream installer (lands under the user profile) or set `HERMES_CUA_DRIVER_CMD` to a copy outside `WindowsApps`. The same denial spams `errors.log` for any other `WindowsApps` binary Hermes spawns (e.g. `bws.exe`) || Anything else weird | **First action: ask the user to run `hermes computer-use doctor`.** It runs the cua-driver `health_report` MCP tool and prints a structured per-check matrix. Their output tells you (and them) exactly what's wrong |## When NOT to use `computer_use`@@ -309,13 +332,12 @@ X11/Wayland nuances, recording trajectory + video, browser-pageinteraction, etc.) live in cua-driver's skill pack — same content thecua-driver team ships and maintains for every other agent harness.-To link the cua-driver skill pack into your skill space:-```cua-driver skills install```-You'll then have access to:+links the pack into `~/.hermes/skills/cua-driver` (Hermes is a detected+agent; `cua-driver skills status` shows the link state). You'll then have:- `SKILL.md` — the cross-platform core (snapshot invariant, no-foreground contract, click dispatch, AX tree mechanics)@@ -329,11 +351,6 @@ You'll then have access to:- `WEB_APPS.md` — browser page interaction tips- `TESTS.md` — replay-by-trajectory workflow-These are platform deep dives, not duplicates — when the user reports-"on Windows the click landed on the wrong element," you read-`WINDOWS.md` for the UIA / UWP context that explains why and what to-do differently.--Hermes autodetection is a planned follow-up in trycua/cua. For now, the command-installs the pack under `~/.cua-driver/skills/cua-driver`; point Hermes at that-directory or symlink it into the user's skill space.+Those files describe the driver's OWN MCP tools (`get_window_state`,+`element_token`, `snapshot_id`, …). Read them for platform context; keep+calling the Hermes actions from this file — the wrapper does the translation.diff --git a/website/docs/user-guide/features/computer-use.md b/website/docs/user-guide/features/computer-use.mdindex 514f5b3aee4..b781750a8e0 100644--- a/website/docs/user-guide/features/computer-use.md+++ b/website/docs/user-guide/features/computer-use.md@@ -242,10 +242,11 @@ maintains directly:cua-driver skills install```-The command installs the pack under `~/.cua-driver/skills/cua-driver`. Hermes-autodetection is a planned cua-driver follow-up, so currently point Hermes at-that directory or symlink it into your skill space. The wrapper remains the-workflow layer and points to Cua's installed skill for driver behavior. The+The command links the pack into `~/.hermes/skills/cua-driver` (Hermes is one+of the agents `cua-driver skills status` reports). The wrapper remains the+workflow layer: the pack documents the driver's own MCP vocabulary+(`get_window_state`, `element_token`, `snapshot_id`), which the `computer_use`+wrapper translates to for you — keep calling `computer_use(action=...)`. Thepack contains:| File | Topic |@@ -407,6 +408,14 @@ of screenshot context, not ~600K.affects every Windows automation stack. To drive elevated windows,run the Hermes agent itself at High integrity (launch from anelevated terminal); otherwise target non-elevated windows.+- **Windows: `hermes computer-use doctor` fails with "Access is denied"+ while the tool works.** A cua-driver installed under+ `C:\Program Files\WindowsApps` cannot be executed by the Hermes venv+ interpreter (WinError 5 from `CreateProcess`), even though the shell+ resolves the same binary fine. The doctor now reports this as a+ diagnosis instead of a traceback. Fix once: reinstall with the upstream+ installer (lands under your user profile) or set+ `HERMES_CUA_DRIVER_CMD` to a copy outside `WindowsApps`.- **Platform-specific deployment gotchas:**- **macOS** uses private SkyLight SPIs. Apple can change them in anyOS update. Hermes warns when the installed cua-driver is older than