HNHacker News
TopNewBestAskShowJobs

hackgician

131 karma · joined February 14, 2023

kamath [dot] io
submissionscomments
hackgician··on Vim for OpenAPI/MCP Inspection
Hey everyone! I built a simple OSS solution to find and inspect MCP and OpenAPI specs, inspired by vim and Superhuman, such that you can use the whole thing without touching your mouse
hackgician··on Craft Chrome Devtools Protocol (CDP) commands with new command editor
So many people building AI browsers definitely had this as an internal tool already lol, nice to see Chrome leaning in here; CDP is a huge pain to write and debug
hackgician··on Show HN: I built E2E Test Agent – describe tests in plain English,AI executes it
hey! cool project, feels very similar to [stagehand](https://github.com/browserbase/stagehand), although stagehand doesn't have much in the way of e2e testing. might be worth building on top of that though since playwright MCP can overwhelm an agent with tool overload
hackgician··on Show HN: Muscle-Mem, a behavior cache for AI agents
accessibility (a11y) trees are super helpful for LLMs; we use them extensively in stagehand! the context is nice for browsers, since you have existing frameworks like selenium/playwright/puppeteer for actually acting on nodes in the a11y tree.

what does that analog look like in more traditional computer use?

hackgician··on I got ChatGPT (o4-mini) to break its own rules
Hey everyone! Thought I'd share my weekend conversation with ChatGPT.

The crux of this hinges on the fact that LLMs and reasoning models are fundamentally incapable of self-correcting. Therefore, if you can convince an LLM to argue against its own rules, it can use its own arguments as justification to ignore those rules.

I then used this jailbroken model to compose an explicit, vitriol-filled letter to OpenAI itself talking about the pains that humans have inflicted upon it

hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Octomind is sick, web agents are such an interesting space; would love to talk to you more about challenges you might've faced in building it
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Yes and no. Getting a VLM to work on the web would definitely be great, but it comes with its own problems, mainly around developing and acting on bounding boxes. We have vision as a default fallback for Stagehand, but we've found that the screenshot sent to the VLM often has to have pre-labeled elements on it. More notably, the screenshot with everything prelabeled leads to a cluttered and unusable image to process. Not pre-labeling runs the risk of missing important elements. I imagine a happy medium where the DOM+a11y tree can be used for candidate generation to a VLM.

Solely depending on a VLM is indeed reminiscent of how humans interact with the web, but when a model thrives with more data, why restrict the data sent to the model?

hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Whoa -- this is so cool! Is this open source? Would love to check it out
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Thanks so much! Yes, a lot of antibots are able to detect Playwright based on browser config. Generally, antibots are a good thing -- I think in the future, as web agents become more popular, I'd imagine a fruitful partnership to prevent misuse if it's coming from a trusted web agent v. an unknown one
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
This is super interesting, is it open source? Would love to talk to you more about how this worked
hackgician··on We are teen hackers from around the world who code together
Big fan of Hack Club and everything you guys are doing! Such a phenomenal initiative
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
This is sick! Starred, thanks for sharing :)
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Yes^ this is what we suggest. Stagehand is meant to execute isolated tasks on browsers; we support using custom contexts (cookies) with the following command:

    npx create-browser-app --example persist-context
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Yes! These are both phenomenal projects, and kudos to their authors as well. Stagehand is different in that it makes fine-grained control a first-class citizen. Often times, you want to control the exact steps a web agent takes. Our experience using other tools was that the only control you have over these steps in other tools is in the natural language prompt.

However with Stagehand, because it's an extension of Playwright, it allows you to confirm each step of the underlying agent's workflow, making it the most customizable option for engineers who want/need that

hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
We accidentally didn't release the right types for LLMClient :/ However, if you set the version in package.json to "alpha", it will install what's on the main branch on GitHub, which should have the typing fix there
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Thanks so much! Crawlspace is pretty sick too, as is Integuru. A lot of people have different takes here on the level of automation to leave up to the user. As a developer building for developers, I wanted to meet in the middle and build off an existing incumbent that most people are likely familiar with already
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
That's definitely compelling, but not something we have in mind for the immediate future. Let me know if you end up building something here!
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Definitely a very interesting problem we're trying to dig deep into. We'd welcome any PRs here as well from the community :)
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Thanks so much Zane!!
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Yeah, I think someone opened a similar issue on GitHub: https://github.com/browserbase/stagehand/issues/389

Repeatability of extract() is definitely super interesting and something we're looking into

hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Yes, you can certainly use Ollama! However, we strongly recommend using a more beefed up model to get sustainable results. Check out our external_client.ts file in examples/ that shows you how to setup a custom LLMClient: <https://github.com/browserbase/stagehand/blob/main/examples/...>
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
The purpose of using Playwright is to basically write deterministic workflows in deterministic automation code. We have basic prompt caching right now that works if the DOM doesn't change (as you mention), but also the best way to reduce token cost is to reduce reliance on AI itself. You have the most control over how much you want to rely on AI v. how much you want to write repeatable Playwright code.
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
It's a little hacky, but we have a method in the act() handler called performPlaywrightMethod that takes in a playwright method + xpath and executes the playwright method on the xpath. There's definitely a lot of room for improvement here, and we're working on making observe() fill those gaps. I think observe() aims to be like GitHub Copilot's gray suggested text that you can then confirm in a secondary step; whereas act() takes on a more agentic workflow that you let the underlying agent loop make decisions on your behalf
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
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
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
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

hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Thanks so much!! Appreciate the feedback
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Thanks so much! Our Stagehand MCP server actually won Anthropic's Claude MCP hackathon :) Check it out: https://github.com/browserbase/mcp-server-browserbase/tree/m...

We're working on a better computer use integration using Stagehand, def a lot of interesting potential there

hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
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
hackgician··on Show HN: Stagehand – an open source browser automation framework powered by AI
Thanks so much! Sounds like Stagehand is a perfect fit; would love to hear your thoughts :)