agent-desktop architecture 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. calling agent your code or an LLM loop Your machine agent-desktop CLI: one JSON envelope per call agent-desktop-ffi C library: ad_* functions agent-desktop-core commands, snapshot, RefStore PlatformAdapter trait in core/adapter one chosen at compile time macOS agent-desktop-macos Windows agent-desktop-windows Linux agent-desktop-linux AX API UI Automation AT-SPI Target app its accessibility tree