frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: I spent 3 months making desktop automation stop lying to AI agents

https://github.com/lahfir/agent-desktop/tree/main
3•lahfir•1h ago
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 STALE_REF; if two elements now match, you get AMBIGUOUS_TARGET. 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,
             "http_endpoint": "http://127.0.0.1:57500",
             "websocket_url": "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

Show HN: A website for exploring historical photographs of my city

https://yesterdays.maprva.org/
18•uneekname•2d ago•8 comments

Show HN: ThoughtDAG – An editable context graph for LLM conversations

https://chenxiachan.github.io/thoughtdag/
4•chatchan•1h ago•0 comments

Show HN: Deltix – AI Driven Testing

https://app.deltix.ai
22•oneounceman•3h ago•7 comments

Show HN: Ember – Redshift safe color palettes

https://github.com/carpdiem/ember
86•carpdiem•5d ago•19 comments

Show HN: Mole – Deep research agent for your terminal

https://github.com/lajosdeme/mole
64•lajosdeme•11h ago•10 comments

Show HN: I spent 3 months making desktop automation stop lying to AI agents

https://github.com/lahfir/agent-desktop/tree/main
3•lahfir•1h ago•0 comments

Show HN: LuaCAD – Parametric CAD Scripted in Lua

https://luacad.ad-si.com
89•adius•13h ago•17 comments

Show HN: C# Game Engine with its own scripting language and IDE

https://github.com/ArcadeMakerSources/ArcadeMaker
109•am-gm•3d ago•56 comments

Show HN: I serve my website with a swarm of ESP32 microcontrollers on a shelf

https://github.com/Novotarskyi/ivan-bohun
3•disco_jack•3h ago•1 comments

Show HN: Mocktail – Free, open-source mock API server with a built-in dashboard

https://getmocktail.com/
6•hhaluk•10h ago•0 comments

Show HN: Lumabri – Run Moe Models on a P2P Swarm with Colibri

https://github.com/JustVugg/lumabri
44•vforno•1d ago•18 comments

Show HN: Dictata – Local Whisper dictation with LLM cleanup

https://github.com/AntoineChatry/Dictata
3•AntoineC_•5h ago•0 comments

Show HN: Nikon F100 Film Camera Repair Notes

https://github.com/enthdegree/f100
5•enthdegree•5h ago•1 comments

Show HN: Is AI Dumber Today? An index of AI model experience from user's opinion

https://isaidumber.today/
14•schafberg•16h ago•6 comments

Show HN: Banquish – Take other websites apart and build your own

https://banquish.space
7•ghboo0927•10h ago•0 comments

Show HN: Online SNMP MIB database - upload/view your own MIBs

https://mib-viewer.com/
13•beefstew123•14h ago•0 comments

Show HN: Bloxwap – The Easiest Way to Trade

https://bloxwap.com/trade/HYPE
3•joeblau•6h ago•0 comments

Show HN: Rdio – an open-source internet radio control suite

https://rdio-docs.vercel.app
19•taqibrahim•18h ago•3 comments

Show HN: Lambdock – Wayland-native GTK4 dock with a live Lisp REPL

https://codeberg.org/jjba23/lambdock
39•jjba23•3d ago•1 comments

Show HN: Procedural Generated Grafitti Wall

https://procgrafprot.vercel.app/wall
6•whtspc64•10h ago•0 comments

Show HN: AletheionAGI – Grounding enforcement for AI agents

https://www.aletheionagi.com
5•felipemayamuniz•11h ago•2 comments

Show HN: Musical social media site where you can throw tomatoes at each other

https://mazurka.cafe/
2•Ambroza•8h ago•1 comments

Show HN: MCP Memory – Fast Agent Memory Using Google's OKF and SQLite FTS5

https://github.com/fellowgeek/mcp-memory
62•pcbmaker20•1d ago•35 comments

Show HN: Mininote: Instant, plain-text note taking without tracking or lock-in

https://mininote.ink/
21•helba-ai•15h ago•3 comments

Show HN: Artifex - Graph Based GPU Harness for AI Agents

https://gatewai.studio/artifex
7•oknaslnkn•18h ago•0 comments

Show HN: A simple, powerful, and cheaper email verification API

https://emailverifier.dev/
2•usamaejaz•9h ago•1 comments

Show HN: Wevna – Local-first runtime dashboard for Node.js back ends

https://github.com/wevna/wevna
3•boluajy•9h ago•0 comments

Show HN: Made a business license hub search tool

https://fernway.io/license-search
3•leyu00•10h ago•2 comments

Show HN: Hacker News minus the slop

https://hnfiltered.com/
4•potatopotaro•10h ago•1 comments

Show HN: E3d-pilot – a repo-improving agent harness, SHA-gated merges

https://github.com/spacepacket1/e3d-pilot
4•spacepacket•11h ago•0 comments