Show HN: Stagehand – an open source browser automation framework powered by AI Hi HN! I’m Anirudh — longtime lurker, first time poster, and I couldn’t be more excited to show you Stagehand. Stagehand is a TypeScript project that extends Playwright with three simple AI methods — act, extract, and observe. We’d love for you to try it out using the command below: npx create-browser-app --example quickstart Here’s a sample workflow: const stagehand = new Stagehand(); await stagehand.init(); // Stagehand overrides the Playwright Page and Context classes const { page, context } = stagehand await page.goto("instadash.com") // Regular Playwright // Take action on the page await page.act({ action: "click on taqueria cazadores" }) // Extract relevant data from the page const { price } = await page.extract({ instruction: "extract the price of the super burrito", schema: z.object({ price: z.number() }) }) We built Stagehand because we loved building browser automations using Playwright and Selenium, but we grew frustrated at how cumbersome it is to just get started and write simple browser automations. These frameworks, while incredibly powerful, are built for QA testing and are thus notoriously prone to fail if there are minor changes in the UI or underlying DOM structure. The goal of Stagehand is twofold: 1. Make browser automations easier to write 2. Make browser automations more resilient to DOM changes. We were super energized by what we’ve been seeing with vision-based computer use agents. We think with a browser, you can provide even richer data by leveraging the information in the DOM + a11y tree in addition to what’s rendered on the page. However, we didn’t want to go so far as to build an agent, since we wanted fine-grained control over each step that an agent can take. Therefore, the happy medium we built was to extend the existing powerful functionalities of Playwright with simple and extensible AI APIs that return the decision-making power back to the developer at each step. Check out our docs: https://ift.tt/h18OTxM We’d love for you to join and give us feedback on Slack as well: https://ift.tt/3lCkv4Y https://ift.tt/sXPF5vw January 8, 2025 at 10:11PM
Show HN: Stagehand – an open source browser automation framework powered by AI https://ift.tt/IwBailb
Related Articles
Show HN: Reddit Firehose https://ift.tt/M5LUzVYShow HN: Reddit Firehose Inspired by the upcoming reddit API changes, … Read More
Show HN: Minutes – Save up to 20% of salespeople's time https://ift.tt/A06KxZWShow HN: Minutes – Save up to 20% of salespeople's time Hey everyone, … Read More
Show HN: I open sourced the QR designer from my failed startup https://ift.tt/k6QigbmShow HN: I open sourced the QR designer from my failed startup My desi… Read More
Show HN: Open-Source Alternative to DocSend https://ift.tt/KJy2iPrShow HN: Open-Source Alternative to DocSend hey hn, i’m alana, founder… Read More
Show HN: Plus AI Market Research https://ift.tt/6B2SzYwShow HN: Plus AI Market Research Hi Team! Please add my app to your di… Read More
Show HN: I open sourced the CLI of my API Testing Framework https://ift.tt/nif16W7Show HN: I open sourced the CLI of my API Testing Framework https://if… Read More
Show HN: A CLI for quickly generating 3D device mockups https://ift.tt/2IbgQKjShow HN: A CLI for quickly generating 3D device mockups Device mockups… Read More
Show HN: SQLite.News – Your One-Stop SQLite News Aggregator https://ift.tt/G8oDeapShow HN: SQLite.News – Your One-Stop SQLite News Aggregator Hey Hacker… Read More
0 Comments: