C+
Packages · View as Markdown

agent_appkit

The macOS GUI backend for the agent surface: it binds the framework-agnostic agent_core rules to a live AppKit window.

  • open(window) walks the live NSView tree into a Surface — the controllable model an agent sees.
  • describe_ui returns a snapshot of the exposed nodes (Vec[UiNode]). A node is exposed by giving it an agent id with set_agent_id.
  • Authorized actionsclick, set_text, and scroll_to run through the agent_core authorization brain. Text edits use optimistic-concurrency versioning, so a stale edit is rejected.
  • Events — AppKit notifications are translated into verbs and delivered as the bubbling events agent_core defines.

Pair it with agent_mcp to expose the surface to an external agent. AppKit agent surface documents the checked docs/examples/recipes/appkit_agent recipe from the C+ source tree: describe the tagged UI, act on a real AppKit button, reject stale text edits, and refuse requests through a closed consent gate.