Live data from Hacker News

Show HN: Stagehand – an open source browser automation framework powered by AI

github.com

11–20 of 89 posts

Re: Show HN: Stagehand – an open source browser automation framework powered by AI

#11
post #6

This looks very cool and makes a lot of sense, except for the idea that it should take the place of Playwright et al. Personally I'd love to use this as an intermediate workflow for producing deterministic playwright code, but it looks like this is intended for running directly. I don't think I could plausibly argue for using LLMs at runtime in our test suite at work...

Interesting, thanks for the feedback! By "taking the place of Playwright," we don't mean the AI itself is going to replace Playwright. Rather, you can continue to use existing Playwright code with new AI functionalities. In addition, we don't really intend for Stagehand to be used in a test suite (though you could!).

Rather, we want Stagehand to assist people who want to build web agents. For example, I was using headless browsers earlier in 2024 to do real-time RAG on e-commerce websites that could aggregate results for vibes-based search queries. These sites might have random DOM changes over time that make it hard to write sustainable DOM selectors, or annoying pop-ups that are hard to deterministically code against.

This is the perfect use for Stagehand! If you're doing QA on your own site, then base Playwright (as you mention) is likely the better solution

Re: Show HN: Stagehand – an open source browser automation framework powered by AI

#12
post #6

This looks very cool and makes a lot of sense, except for the idea that it should take the place of Playwright et al. Personally I'd love to use this as an intermediate workflow for producing deterministic playwright code, but it looks like this is intended for running directly. I don't think I could plausibly argue for using LLMs at runtime in our test suite at work...

Interesting, thanks for the feedback! By "taking the place of Playwright," we don't mean the AI itself is going to replace Playwright. Rather, you can continue to use existing Playwright code with new AI functionalities. In addition, we don't really intend for Stagehand to be used in a test suite (though you could!). Rather, we want Stagehand to assist people who want to build web agents. For example, I was using hea…

It seems to me like Selenium would have been a more appropriate API to extend from, then. Playwright, despite whatever people want it to be otherwise, is explicitly positioned for testing, first.

People in the browser automation space consistently ignore this, for whatever reason. Though, it's right on their site in black and white.

Re: Show HN: Stagehand – an open source browser automation framework powered by AI

#13

Earlier quoted context omitted.

Interesting, thanks for the feedback! By "taking the place of Playwright," we don't mean the AI itself is going to replace Playwright. Rather, you can continue to use existing Playwright code with new AI functionalities. In addition, we don't really intend for Stagehand to be used in a test suite (though you could!). Rather, we want Stagehand to assist people who want to build web agents. For example, I was using hea…

It seems to me like Selenium would have been a more appropriate API to extend from, then. Playwright, despite whatever people want it to be otherwise, is explicitly positioned for testing, first. People in the browser automation space consistently ignore this, for whatever reason. Though, it's right on their site in black and white.

Appreciate the feedback. Our take is that Playwright is an open-sourced library with a lot of built-in features that make building with it a lot easier, so it's definitely an easier starting point for us

Re: Show HN: Stagehand – an open source browser automation framework powered by AI

#15
Does it operate by translating your higher level AI methods into lower level Playwright methods, and if so is it possible to debug the actual methods those methods were translated to?

Also is there some level of deterministic behavior here or might every test run result in a different underlying command if your wording isn’t precise enough?

Re: Show HN: Stagehand – an open source browser automation framework powered by AI

#16
post #6

This looks very cool and makes a lot of sense, except for the idea that it should take the place of Playwright et al. Personally I'd love to use this as an intermediate workflow for producing deterministic playwright code, but it looks like this is intended for running directly. I don't think I could plausibly argue for using LLMs at runtime in our test suite at work...

Interesting, thanks for the feedback! By "taking the place of Playwright," we don't mean the AI itself is going to replace Playwright. Rather, you can continue to use existing Playwright code with new AI functionalities. In addition, we don't really intend for Stagehand to be used in a test suite (though you could!). Rather, we want Stagehand to assist people who want to build web agents. For example, I was using hea…

How do you get by when every major sites starts blocking headless browsers? A good example right now is Zillow, but I foresee a world where big chunks of the internet are behind captcha and bot detection

Re: Show HN: Stagehand – an open source browser automation framework powered by AI

#18
post #16

Earlier quoted context omitted.

Interesting, thanks for the feedback! By "taking the place of Playwright," we don't mean the AI itself is going to replace Playwright. Rather, you can continue to use existing Playwright code with new AI functionalities. In addition, we don't really intend for Stagehand to be used in a test suite (though you could!). Rather, we want Stagehand to assist people who want to build web agents. For example, I was using hea…

How do you get by when every major sites starts blocking headless browsers? A good example right now is Zillow, but I foresee a world where big chunks of the internet are behind captcha and bot detection

That's not really a problem for Stagehand. It's a problem for Selenium, Playwright, Puppeteer and others at the browser automation library level.

Re: Show HN: Stagehand – an open source browser automation framework powered by AI

#19

Earlier quoted context omitted.

It seems to me like Selenium would have been a more appropriate API to extend from, then. Playwright, despite whatever people want it to be otherwise, is explicitly positioned for testing, first. People in the browser automation space consistently ignore this, for whatever reason. Though, it's right on their site in black and white.

Appreciate the feedback. Our take is that Playwright is an open-sourced library with a lot of built-in features that make building with it a lot easier, so it's definitely an easier starting point for us

That's the same reason everyone else ignores the fact that it's a testing library. Except now you're forcing users to write kludges that wrap around the testing interface.

Re: Show HN: Stagehand – an open source browser automation framework powered by AI

#20

I’m curious how this compares to playwrights already built in codegen: https://playwright.dev/docs/codegen-intro Is a chat bot easier to reiterate a test?

Playwright codegen is incredibly powerful, but still pretty brittle. Its DOM selectors are still hardcoded, so you run the risk of Playwright selecting an unsustainable DOM selector. With Stagehand, the code is self-healing since it's dynamically generating Playwright every time, making it much more resilient to minor DOM changes

How do you avoid this becoming horrendously expensive per run? Are the results cached if the DOM doesn't change?
Post reply on HN