9 comments

  • augusteo22 minutes ago
    The shift from &quot;click and hope&quot; to explicit post-conditions is the right framing.<p>We&#x27;ve been building agent-based automation and the reliability problem is brutal. An agent can be 95% accurate on each step, but chain ten steps together and you&#x27;re at 60% success rate. That&#x27;s not usable.<p>Curious about the failure modes though. What happens when the verification itself is wrong? Like, the cart shows updated on screen but the verification layer checks a stale element?
    • tonyww1 minute ago
      Absolutely agree on the compounding error point - that’s exactly what pushed us toward verification.<p>On “verification wrong”: we try hard to keep predicates grounded and re-evaluated, not “check a cached handle”. Assertions do re-snapshot &#x2F; re-query during each retry, and we scope them to signals that should change (URL, existence&#x2F;state of an element, text&#x2F;value).<p>If the page is flaky&#x2F;stale, the assertion just won’t prove the condition within the retry window and we fail with artifacts such as frames of clip (if ffmpeg available) rather than claiming success.<p>There are still edge cases (virtualized DOM, optimistic UI, async updates), but in those cases the goal is the same: make the failure explicit and debuggable with artifacts and time-travel traces, not silently drift.
  • wewtyflakes29 minutes ago
    I have found that a hybrid viewport screenshot + textual &#x27;semantic snapshot&#x27; approach leads to the best outcomes, though sometimes text-only can be fine if the underlying page is not made of a complete mess of frameworks that would otherwise confuse normal click handlers, etc.<p>I think using a logical diff to do pass&#x2F;fail checking is clever, though I wonder if there are failure modes there that may confuse things, such as verifying highly dynamic webpages that change their content even without active user interactions.
    • tonyww19 minutes ago
      Totally agree - hybrid approaches can work well, especially on messy pages. We’ve seen the same tradeoff.<p>On the verification side though, dynamic pages are exactly the reason why we scope assertions narrowly (specific predicates, bounded retries using eventually() function) instead of diffing the whole page. If the expected condition can’t be proven within that window, we fail fast rather than guessing.
  • tonyww16 hours ago
    A quick clarification on intent, since “browser automation” means different things to different people:<p>This isn’t about making scripts smarter or replacing Playwright&#x2F;Selenium. The problem I’m exploring is reliability: how to make agent-driven browser execution fail deterministically and explainably instead of half-working when layouts change.<p>Concretely, the agent doesn’t just “click and hope”. Each step is gated by explicit post-conditions, similar to how tests assert outcomes:<p>---- ## Python Code Example:<p>ready = runtime.assert_( all_of(url_contains(&quot;checkout&quot;), exists(&quot;role=button&quot;)), &quot;checkout_ready&quot;, required=True )<p>----<p>If the condition isn’t met, the run stops with artifacts instead of drifting forward. Vision models are optional fallbacks, not the primary control signal.<p>Happy to answer questions about the design tradeoffs or where this approach falls short
  • Akranazon1 hour ago
    It is interesting subject matter, I am working on something similar. But the descriptions are quite terse. Maybe I just failed to gleam:<p>* When you &quot;run a WASM pass&quot;, how is that generated? Do you use an agent to do the pruning step, or is it deterministic?<p>* Where do the &quot;deterministic overrides&quot; come from? I assume they are generated by the verifier agent?
    • tonyww1 hour ago
      The WASM pass is fully deterministic: it’s just code running in the page to extract and prune post-rendered elements (roles, geometry, visibility, layout, etc), no agent involved in the chrome extension .<p>The “deterministic overrides” aren’t generated by a verifier agent either; they’re runtime rules that kick in when assertions or ordinality constraints are explicit (e.g. “first result”). The verifier just checks outcomes — it doesn’t invent actions. Because the nature of ai agents is non-deterministic, which we don’t want to introduce to the verification layer (predicate only).
      • Akranazon17 minutes ago
        &gt; they’re runtime rules that kick in when assertions or ordinality constraints are explicit<p>So there a pre-defined list of rules - is it choosing which checks to care about from the set, or is there also a predefined binding between the task and the test?<p>If it&#x27;s the former, then you have to ensure that the checks are sufficiently generic that there&#x27;s a useful test for the given situation. Is an AI doing the choosing, over which of the checks to run?<p>If it&#x27;s the ladder, I would assume that writing the tests would be the bottleneck, writing a test can be as flaky&#x2F;time-consuming as implementing the actions by hand.
        • tonyww6 minutes ago
          It’s mostly the former: there’s a small set of generic checks&#x2F;primitives, and we choose which ones to apply per step.<p>The binding between “task&#x2F;step” and “what to verify” can come from either:<p>the user (explicit assertions), or the planner&#x2F;executor proposing a post-condition (e.g. “after clicking checkout, URL contains &#x2F;checkout and a checkout button exists”).<p>But the verifier itself is not an AI, by design it’s predicate-only
  • vilecoyote2 hours ago
    I took a look at the quickstart with aim of running this locally and found that an API key is needed for the importance ranking.<p>What exactly is importance ranking? Does the verification layer still exists without this ranking?
    • tonyww34 minutes ago
      Importance ranking is just a heuristic pass that scores&#x2F;prioritizes elements (size, visibility, role, state) so the snapshot stays small and focused. It’s deterministic, not ML.<p>The verification layer absolutely still exists without it — assertions, predicates, retries, and artifacts all work locally. The API-backed ranking just improves pruning quality on very dense pages, but it’s not required for correctness.<p>You can set use_api = False in the SnapshotOptions to avoid using the api
  • joeframbach4 hours ago
    Does the browser expose its accessibility tree instead of the raw dom element tree? The accessibility tree should be enough, I mean, it&#x27;s all that&#x27;s needed for vision impaired customers, and technically the ai agent _is_ a vision impaired customer. For a fair usage, try the accessibility tree.
    • tonyww3 hours ago
      The accessibility tree is definitely useful, and we do look at it. The issue we ran into is that it’s optimized for assistive consumption, not for action verification or layout reasoning on dynamic SPAs.<p>In practice we’ve seen cases where AX is incomplete, lags hydration, or doesn’t reflect overlays &#x2F; grouping accurately. It does not support ordinality queries well. That’s why we anchor on post-rendered DOM + geometry and then verify outcomes explicitly, rather than relying on any single representation.
  • asyncadventure3 hours ago
    Great point about the accessibility tree @joeframbach. The &quot;vision impaired customer&quot; analogy is spot on - if an interface works for screen readers, it should work for AI agents.<p>What I find most compelling about this approach is the explicit verification layer. Too many browser automation projects fail silently or drift into unexpected states. The Jest-style assertions create a clear contract: either the step definitively succeeded or it didn&#x27;t, with artifacts for debugging.<p>This reminds me of property-based testing - instead of hoping the agent &quot;gets it right,&quot; you&#x27;re encoding what success actually looks like.
    • tonyww2 hours ago
      Thanks — that’s exactly our motivation. The key shift for us was moving from “did the agent probably do the right thing?” to “can we prove the state we expected actually holds.”<p>The property-based testing analogy is a good one — once you make success explicit, failures become actionable instead of mysterious.
      • joeframbach59 minutes ago
        You realize you are responding to a brand new account posting an obviously AI-generated response?
        • tonyww14 minutes ago
          I’m absolutely not AI, I dedicate this morning to technical discussion with HN community on my post, which I’ve spent weeks building the technology behind it
  • ewuhic4 hours ago
    Slop shit discussing slop shit.