我花了 3 个月让桌面自动化不再对 AI agents 撒谎
Show HN: I spent 3 months making desktop automation stop lying to AI agents
我们发现了什么
方向观察:我花了 3 个月让桌面自动化不再对 AI agents 撒谎。原文包含第三方或历史项目线索,暂不能归属于本产品,需核对完整来源。
- 来源:Hacker News(发现于 2026-08-16)
- 证据等级:D · 包含历史项目、第三方案例或未来计划;不能作为当前项目收入证据。
- 商业模式:API / Usage-based
- 主题:AI Agent
- 初筛评分:17.6/100 · 收录 1 次
证据,比故事更重要。
规则清洗与初筛,未经人工商业核验。原文语境、实际客户和付费情况仍需自行验证。
引用与数字披露
来源类型(原作者自述/第三方测算/媒体转引)需采集端标注,本版尚未落字段。
- 作者
- 未标注
- 抓取日期
- 来源类型
- 未标注
- 币种
- 未标注
- 口径
- 未标注
- 披露主体
- 未标注
- 披露日期
- 未标注
中文辅助译文(全文)
这是一个大胆的声明。但我真切地觉得自己可能真的解决了 computer use 问题(演示:https://x.com/mdlahfir/status/2088109763783700827?s=20 ) 作为背景,我一直在开发 agent-desktop(灵感来自 Vercel Labs 的 agent-browser),一个面向桌面应用的自动化 CLI。它类似于 Playwright,但面向桌面,不仅支持原生应用,也支持 Chromium 应用。相信我,没错,就是那些无障碍树非常密集的 Chromium 应用。MacOS 已正式发布(GA);Windows 和 Linux 版本也即将上线!那么,我是如何解决的呢?核心思路是互操作性。computer use 面临的最大问题是,我们在浏览器使用方面有可靠的框架,例如 Playwright、agent-browser 等,但在桌面端却缺乏同样的框架。现在涌现出了一些非常优秀的解决方案,例如 tryCua,我就是它的忠实粉丝。我对 agent-desktop 的愿景是构建最可靠的框架,让智能体(agent)能够用它来完成长时任务。agent-desktop 轻量,基于 Rust 构建,速度快,且不消耗 token(可以连续运行数小时而不超出上下文窗口)下面是我用来实现这一目标的方法: a) 骨架快照(skeleton snapshots)—— 当你想对窗口/应用进行快照时,它只快照父级容器并返回引用 id,而非整个无障碍树。
b) 骨架钻取(skeleton drilling)—— 一旦智能体拿到那棵树,它就可以决定钻取某个特定区域。诸如 --find、--click、--wait 等所有子命令都在这个对引用敏感的区域上运行。也就是说,如果你想在整个应用中查找某个元素,它不需要漫无目的地在整个应用中搜索该元素;相反,智能体将获得该元素可能出现位置的精确线索,只需付出极低的 token 成本。c) 链式交互回退(chained interaction fallback)—— 单次点击并非一次 API 调用,而是一串有序的机制链(AXPress -> AXOpen -> 通过内部单元格激活 -> 写入选择 -> AXConfirm)。每个步骤仅在该元素声明支持时运行,且成功与否通过观察应用的状态变化来判断,而非通过返回码,因为应用会在两个方向上"撒谎":对于一个实际生效的操作,Finder 会返回错误;而对于一个什么都没做的操作,它却返回成功。以最先观察到的效果为准。响应会报告尝试过的每一步,因此智能体可以确切地知道是哪一种机制真正生效。d) 操作后反馈(after-action feedback)—— 每个操作都会报告其处置结果(已送达并已验证、已送达但未验证、未送达),以及任何被打开的界面(对话框、菜单、面板),因此它可以在不重新扫描整个应用的情况下让智能体知道发生了什么。e) 严格的引用重识别(strict ref re-identification)—— 引用(ref)不是一个指针;它是身份证据(角色、路径、稳定文本、边界哈希)。在每次操作之前,都会根据实时 UI 重新解析。
如果 UI 已更改,你会得到 STALEREF;如果现在有两个元素匹配,你会得到 AMBIGUOUSTARGET。它从不猜测。这一切中最重要的部分在于 Chromium 应用的无障碍。秘诀就是 CDP!如今大多数桌面应用都基于 Chromium(Slack、VS Code、Obsidian、Discord……)。一条命令即可启动应用并暴露一个 CDP 端点,agent-desktop 在返回该端点之前会验证它确实在响应。之后,任何浏览器自动化框架都可以连接并驱动其中的 web 内容:Playwright、Puppeteer、agent-browser,无论你已经在使用哪一个。通过 CDP 读取 Obsidian 的 web 内容耗时 201ms,而通过无障碍树读取则需要 2.3 秒。$ agent-desktop launch "Obsidian" --cdp { "ok": true, "data": {
"renderer": "chromium",
"cdp": { "port": 57500,
"httpendpoint": "http://127.0.0.1:57500",
"websocketurl": "ws://127.0.0.1:57500/devtools/browser/..." },
"suggestion": "Next: run agent-browser connect 57500 ..." } }
这正是 agent-desktop 能够与整个浏览器自动化生态系统互操作,而非与之竞争的原因。去试试 agent-desktop -> https://github.com/lahfir/agent-desktop
译文由上游机器翻译生成,可能有误;判断请以英文原文为准。
英文原文(来源本站未改写)
That's a bold claim.But I genuinely feel like I might have actually solved computer use (demo: https://x.com/mdlahfir/status/2088109763783700827?s=20 ) For context, I've been building agent-desktop (Inspired by agent-browser by Vercel Labs), an automation CLI for desktop apps.It's like Playwright but for desktops, not just native, but for Chromium apps as well.Trust me, yes, Chromium apps whose accessibility tree is dense.MacOS is GA;I'm almost close to launching for Windows and Linux!So, how did I solve it?Basically interoperability.
The biggest issue with computer use is that we have reliable frameworks for browser use, like Playwright, agent-browser, and many more, but not the same with desktops.We have really good solutions emerging, like tryCua, which I'm a big fan of.
My vision with agent-desktop is to build the most reliable framework that agents can use for long-horizon tasks. agent-desktop is lightweight, built on Rust, fast, and not token-hungry (It can go for hours without exceeding the context window) Here's the approach I used to make it possible: a) skeleton snapshots - when you want to snapshot a window/app, it only snapshots the parent containers and gives back a ref id, not the entire accessibility tree. b) skeleton drilling - once the agent has that tree, it can then decide to drill into a specific region.All the subcommands like --find, --click, --wait... all work on that specific ref aware region.
Meaning if you want to find an element in the entire app, it doesn't take forever searching for the entire app for that element;rather, the agent will have an exact clue on where that element might be for a fraction of the token costs. c) chained interaction fallback - a single click isn't one API call but it's an ordered chain of mechanisms (AXPress -> AXOpen -> activate through the inner cell -> write selection -> AXConfirm).Each step only runs if the element advertises it, and success is judged by watching the app's state change, not by the return code, because apps lie in both directions: Finder returns an error for an action that worked and success for one that did nothing.
First observed effect wins.The response reports every step tried, so the agent knows exactly which mechanism landed. d) after-action feedback - every action reports its disposition (delivered and verified, delivered but unverified, not delivered) plus any surface that opened (dialog, menu, sheet), so the agent knows what happened without re-scanning the whole app. e) strict ref re-identification - a ref isn't a pointer;it's identity evidence (role, path, stable text, bounds hash).Before every action, it's re-resolved against the live UI.If the UI changed, you get STALEREF;if two elements now match, you get AMBIGUOUSTARGET.It never guesses.
The most important part about all this is Chromium app accessibility.How did I do it?The magic word is CDP!Most desktop apps today are Chromium-based (Slack, VS Code, Obsidian, Discord...).One command launches the app with a CDP endpoint that agent-desktop verifies is actually answering before returning it.From there, any browser automation framework can connect and drive the web contents: Playwright, Puppeteer, agent-browser, whatever you already use.
Reading Obsidian's web content over CDP takes 201ms vs 2.3s through the accessibility tree. $ agent-desktop launch "Obsidian" --cdp { "ok": true, "data": {
"renderer": "chromium",
"cdp": { "port": 57500,
"httpendpoint": "http://127.0.0.1:57500",
"websocketurl": "ws://127.0.0.1:57500/devtools/browser/..." },
"suggestion": "Next: run agent-browser connect 57500 ..." } }
This is what makes agent-desktop interoperable with the entire browser automation ecosystem instead of competing with it. Go try agent-desktop -> https://github.com/lahfir/agent-desktop
这条还缺什么证据?
下面每条都由本条已有字段推出(等级、理由、商业模式、来源次数、是否演示), 本站不生成推测性结论;通用验证方法放在方法论页。
- 可核验的收入或付费证据查官网定价页与付费口径;第三方数据源(如 GetLatka)只作旁证,需标注来源与时点。
- 只有单一来源找一手站点或其他渠道是否重复出现同一产品;社区热帖数量不等于商业进展。
通用验证清单(谁有这个问题/谁愿意付费/一个人能交付哪一小步)见我们的筛选方法。