Yes. On Gentoo, the cleanest setup is to use your existing Node.js environment and install Stagehand + Playwright locally in a project. Stagehand v3 no longer bundles Playwright internally; it is designed to work with Playwright as a separate dependency.
1. Verify Node/npm
Playwright currently supports Node.js 22.x, 24.x, and 26.x.
If you're using your existing Node 24 setup, you're good.
2. Create a Stagehand project
3. Install Chromium
For Gentoo, I recommend installing only Chromium initially:
Playwright stores its downloaded browser binaries under ~/.cache/ms-playwright on Linux.
Verify:
4. Test Playwright
You should get:
and:
5. Test Stagehand
Run:
Stagehand's current V3 API uses Stagehand from @browserbasehq/stagehand, with env: "LOCAL" for a local browser.
6. If you want Firefox/WebKit too
Playwright officially supports Chromium, Firefox, and WebKit.
Important Gentoo note
I would not use:
on Gentoo. Playwright's Linux dependency installer is intended around supported Debian/Ubuntu environments and uses their package manager.
Instead, let Gentoo provide the system libraries, and let Playwright provide the browser binaries.
If Chromium fails to start, run:
That gives the browser-launch diagnostics recommended by Playwright.
Recommended final layout
And your core dependencies are simply:
This is a particularly good setup for what you were asking about earlier—AI-controlled browser automation that can log into an application, perform the workflow, and capture the steps/video. Stagehand provides the AI layer while Playwright provides the actual browser automation.