{"_id":"@111_00/stagehand","name":"@111_00/stagehand","dist-tags":{"latest":"2.5.0"},"versions":{"2.5.0":{"name":"@111_00/stagehand","version":"2.5.0","description":"An AI web browsing framework focused on simplicity and extensibility.","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","bin":{"evals":"dist/evals/cli.js"},"keywords":[],"author":{"name":"Browserbase"},"license":"MIT","devDependencies":{"@changesets/changelog-github":"^0.5.0","@changesets/cli":"^2.27.9","@eslint/js":"^9.16.0","@langchain/core":"^0.3.40","@langchain/openai":"^0.4.4","@playwright/test":"^1.42.1","@types/adm-zip":"^0.5.7","@types/cheerio":"^0.22.35","@types/express":"^4.17.21","@types/node":"^20.11.30","@types/ws":"^8.5.13","adm-zip":"^0.5.16","autoevals":"^0.0.64","braintrust":"^0.0.171","chalk":"^5.4.1","cheerio":"^1.0.0","chromium-bidi":"^0.10.0","esbuild":"^0.21.4","eslint":"^9.16.0","express":"^4.21.0","globals":"^15.13.0","multer":"^1.4.5-lts.1","prettier":"^3.2.5","string-comparison":"^1.3.0","tsup":"^8.2.1","tsx":"^4.10.5","typescript":"^5.2.2","typescript-eslint":"^8.17.0"},"peerDependencies":{"deepmerge":"^4.3.1","dotenv":"^16.4.5","zod":">=3.25.0 <3.25.68"},"dependencies":{"@anthropic-ai/sdk":"0.39.0","@browserbasehq/sdk":"^2.4.0","@google/genai":"^0.8.0","@modelcontextprotocol/sdk":"^1.17.2","ai":"^4.3.9","devtools-protocol":"^0.0.1464554","fetch-cookie":"^3.1.0","openai":"^4.87.1","pino":"^9.6.0","pino-pretty":"^13.0.0","playwright":"^1.52.0","ws":"^8.18.0","zod-to-json-schema":"^3.23.5"},"optionalDependencies":{"@ai-sdk/anthropic":"^1.2.6","@ai-sdk/azure":"^1.3.19","@ai-sdk/cerebras":"^0.2.6","@ai-sdk/deepseek":"^0.2.13","@ai-sdk/google":"^1.2.6","@ai-sdk/groq":"^1.2.4","@ai-sdk/mistral":"^1.2.7","@ai-sdk/openai":"^1.0.14","@ai-sdk/perplexity":"^1.1.7","@ai-sdk/togetherai":"^0.2.6","@ai-sdk/xai":"^1.2.15","ollama-ai-provider":"^1.2.0"},"directories":{"doc":"docs","example":"examples","lib":"lib"},"repository":{"type":"git","url":"git+https://github.com/browserbase/stagehand.git"},"bugs":{"url":"https://github.com/browserbase/stagehand/issues"},"homepage":"https://stagehand.dev","overrides":{"whatwg-url":"^14.0.0"},"scripts":{"example":"pnpm --filter @browserbasehq/stagehand-examples run start","format":"prettier --write .","prettier":"prettier --check .","prettier:fix":"prettier --write .","eslint":"eslint .","cache:clear":"rm -rf .cache","docs":"pnpm --filter @browserbasehq/stagehand-docs run dev","evals":"tsx scripts/run-evals.ts","evals:legacy":"tsx scripts/run-evals.ts","e2e":"pnpm run build && cd evals/deterministic && playwright test --config=e2e.playwright.config.ts","e2e:bb":"pnpm run build && cd evals/deterministic && playwright test --config=bb.playwright.config.ts","e2e:local":"pnpm run build && cd evals/deterministic && playwright test --config=local.playwright.config.ts","build-dom-scripts":"tsx lib/dom/genDomScripts.ts","build-types":"tsc --emitDeclarationOnly --outDir dist","build-js":"tsup lib/index.ts --dts","build:cli":"tsup evals/cli.ts --outDir dist/evals --format cjs && cp evals/evals.config.json dist/evals/ && chmod +x dist/evals/cli.js && npm link","build":"pnpm run lint && pnpm run gen-version && pnpm run build-dom-scripts && pnpm run build-js && pnpm run build-types","gen-version":"tsx scripts/gen-version.ts","lint":"pnpm run prettier:fix && pnpm run eslint","release":"pnpm run build && changeset publish","release-canary":"pnpm run build && changeset version --snapshot && changeset publish --tag alpha"},"_id":"@111_00/stagehand@2.5.0","_integrity":"sha512-PA0XLOwWeJ6dr9B1iKkBcnXJxJy/1Ov5RmsF0GoUt+/5rGDoJG/7QQxHkafWCWPbeFmo7ilrF6u2gzzj8aD3xw==","_resolved":"C:\\Users\\Raj\\AppData\\Local\\Temp\\22f83ca35b1bbda38a3d1f84c2bce541\\111_00-stagehand-2.5.0.tgz","_from":"file:111_00-stagehand-2.5.0.tgz","_nodeVersion":"20.19.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-PA0XLOwWeJ6dr9B1iKkBcnXJxJy/1Ov5RmsF0GoUt+/5rGDoJG/7QQxHkafWCWPbeFmo7ilrF6u2gzzj8aD3xw==","shasum":"d3c8708cb776566fef54d585c90700f5d60bddc5","tarball":"https://registry.npmjs.org/@111_00/stagehand/-/stagehand-2.5.0.tgz","fileCount":284,"unpackedSize":1034151,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFvJA7Mnqydcs8v8gBUZHPsdI6wltn20/SGbM2J7IiOHAiBcsQChTcDcomS2CGzFjoFlImVN6o8xFX3Z9KDwWU/NcQ=="}]},"_npmUser":{"name":"111_00","email":"rajdama1234@gmail.com"},"maintainers":[{"name":"111_00","email":"rajdama1234@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stagehand_2.5.0_1758265731844_0.5943956423876495"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-19T07:08:51.738Z","2.5.0":"2025-09-19T07:08:52.049Z","modified":"2025-09-19T07:08:52.296Z"},"maintainers":[{"name":"111_00","email":"rajdama1234@gmail.com"}],"description":"An AI web browsing framework focused on simplicity and extensibility.","homepage":"https://stagehand.dev","keywords":[],"repository":{"type":"git","url":"git+https://github.com/browserbase/stagehand.git"},"author":{"name":"Browserbase"},"bugs":{"url":"https://github.com/browserbase/stagehand/issues"},"license":"MIT","readme":"<div id=\"toc\" align=\"center\" style=\"margin-bottom: 0;\">\r\n  <ul style=\"list-style: none; margin: 0; padding: 0;\">\r\n    <a href=\"https://stagehand.dev\">\r\n      <picture>\r\n        <source media=\"(prefers-color-scheme: dark)\" srcset=\"media/dark_logo.png\" />\r\n        <img alt=\"Stagehand\" src=\"media/light_logo.png\" width=\"200\" style=\"margin-right: 30px;\" />\r\n      </picture>\r\n    </a>\r\n  </ul>\r\n</div>\r\n<p align=\"center\">\r\n  <strong>The AI Browser Automation Framework</strong><br>\r\n  <a href=\"https://docs.stagehand.dev\">Read the Docs</a>\r\n</p>\r\n\r\n<p align=\"center\">\r\n  <a href=\"https://github.com/browserbase/stagehand/tree/main?tab=MIT-1-ov-file#MIT-1-ov-file\">\r\n    <picture>\r\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"media/dark_license.svg\" />\r\n      <img alt=\"MIT License\" src=\"media/light_license.svg\" />\r\n    </picture>\r\n  </a>\r\n  <a href=\"https://join.slack.com/t/stagehand-dev/shared_invite/zt-38khc8iv5-T2acb50_0OILUaX7lxeBOg\">\r\n    <picture>\r\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"media/dark_slack.svg\" />\r\n      <img alt=\"Slack Community\" src=\"media/light_slack.svg\" />\r\n    </picture>\r\n  </a>\r\n</p>\r\n\r\n<p align=\"center\">\r\n\t<a href=\"https://trendshift.io/repositories/12122\" target=\"_blank\"><img src=\"https://trendshift.io/api/badge/repositories/12122\" alt=\"browserbase%2Fstagehand | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/></a>\r\n</p>\r\n\r\n<p align=\"center\">\r\nIf you're looking for the Python implementation, you can find it \r\n<a href=\"https://github.com/browserbase/stagehand-python\"> here</a>\r\n</p>\r\n\r\n<div align=\"center\" style=\"display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 0;\">\r\n  <b>Vibe code</b>\r\n  <span style=\"font-size: 1.05em;\"> Stagehand with </span>\r\n  <a href=\"https://director.ai\" style=\"display: flex; align-items: center;\">\r\n    <span>Director</span>\r\n  </a>\r\n  <span> </span>\r\n  <picture>\r\n    <img alt=\"Director\" src=\"media/director_icon.svg\" width=\"25\" />\r\n  </picture>\r\n</div>\r\n\r\n## Why Stagehand?\r\n\r\nMost existing browser automation tools either require you to write low-level code in a framework like Selenium, Playwright, or Puppeteer, or use high-level agents that can be unpredictable in production. By letting developers choose what to write in code vs. natural language, Stagehand is the natural choice for browser automations in production.\r\n\r\n1. **Choose when to write code vs. natural language**: use AI when you want to navigate unfamiliar pages, and use code ([Playwright](https://playwright.dev/)) when you know exactly what you want to do.\r\n\r\n2. **Preview and cache actions**: Stagehand lets you preview AI actions before running them, and also helps you easily cache repeatable actions to save time and tokens.\r\n\r\n3. **Computer use models with one line of code**: Stagehand lets you integrate SOTA computer use models from OpenAI and Anthropic into the browser with one line of code.\r\n\r\n## Example\r\n\r\nHere's how to build a sample browser automation with Stagehand:\r\n\r\n<div align=\"center\">\r\n  <div style=\"max-width:300px;\">\r\n    <img src=\"/media/github_demo.gif\" alt=\"See Stagehand in Action\">\r\n  </div>\r\n</div>\r\n\r\n```typescript\r\n// Use Playwright functions on the page object\r\nconst page = stagehand.page;\r\nawait page.goto(\"https://github.com/browserbase\");\r\n\r\n// Use act() to execute individual actions\r\nawait page.act(\"click on the stagehand repo\");\r\n\r\n// Use Computer Use agents for larger actions\r\nconst agent = stagehand.agent({\r\n    provider: \"openai\",\r\n    model: \"computer-use-preview\",\r\n});\r\nawait agent.execute(\"Get to the latest PR\");\r\n\r\n// Use extract() to read data from the page\r\nconst { author, title } = await page.extract({\r\n  instruction: \"extract the author and title of the PR\",\r\n  schema: z.object({\r\n    author: z.string().describe(\"The username of the PR author\"),\r\n    title: z.string().describe(\"The title of the PR\"),\r\n  }),\r\n});\r\n```\r\n\r\n## Documentation\r\n\r\nVisit [docs.stagehand.dev](https://docs.stagehand.dev) to view the full documentation.\r\n\r\n## Getting Started\r\n\r\nStart with Stagehand with one line of code, or check out our [Quickstart Guide](https://docs.stagehand.dev/get_started/quickstart) for more information:\r\n\r\n```bash\r\nnpx create-browser-app\r\n```\r\n\r\n<div align=\"center\">\r\n    <a href=\"https://www.loom.com/share/f5107f86d8c94fa0a8b4b1e89740f7a7\">\r\n      <p>Watch Anirudh demo create-browser-app to create a Stagehand project!</p>\r\n    </a>\r\n    <a href=\"https://www.loom.com/share/f5107f86d8c94fa0a8b4b1e89740f7a7\">\r\n      <img style=\"max-width:300px;\" src=\"https://cdn.loom.com/sessions/thumbnails/f5107f86d8c94fa0a8b4b1e89740f7a7-ec3f428b6775ceeb-full-play.gif\">\r\n    </a>\r\n  </div>\r\n\r\n### Build and Run from Source\r\n\r\n```bash\r\ngit clone https://github.com/browserbase/stagehand.git\r\ncd stagehand\r\npnpm install\r\npnpm playwright install\r\npnpm run build\r\npnpm run example # run the blank script at ./examples/example.ts\r\npnpm run example 2048 # run the 2048 example at ./examples/2048.ts\r\npnpm run evals -man # see evaluation suite options\r\n```\r\n\r\nStagehand is best when you have an API key for an LLM provider and Browserbase credentials. To add these to your project, run:\r\n\r\n```bash\r\ncp .env.example .env\r\nnano .env # Edit the .env file to add API keys\r\n```\r\n\r\n## Contributing\r\n\r\n> [!NOTE]  \r\n> We highly value contributions to Stagehand! For questions or support, please join our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-38khc8iv5-T2acb50_0OILUaX7lxeBOg).\r\n\r\nAt a high level, we're focused on improving reliability, speed, and cost in that order of priority. If you're interested in contributing, we strongly recommend reaching out to [Miguel Gonzalez](https://x.com/miguel_gonzf) or [Paul Klein](https://x.com/pk_iv) in our [Slack community](https://join.slack.com/t/stagehand-dev/shared_invite/zt-38khc8iv5-T2acb50_0OILUaX7lxeBOg) before starting to ensure that your contribution aligns with our goals.\r\n\r\nFor more information, please see our [Contributing Guide](https://docs.stagehand.dev/examples/contributing).\r\n\r\n## Acknowledgements\r\n\r\nThis project heavily relies on [Playwright](https://playwright.dev/) as a resilient backbone to automate the web. It also would not be possible without the awesome techniques and discoveries made by [tarsier](https://github.com/reworkd/tarsier), [gemini-zod](https://github.com/jbeoris/gemini-zod), and [fuji-web](https://github.com/normal-computing/fuji-web).\r\n\r\nWe'd like to thank the following people for their major contributions to Stagehand:\r\n- [Paul Klein](https://github.com/pkiv)\r\n- [Anirudh Kamath](https://github.com/kamath)\r\n- [Sean McGuire](https://github.com/seanmcguire12)\r\n- [Miguel Gonzalez](https://github.com/miguelg719)\r\n- [Sameel Arif](https://github.com/sameelarif)\r\n- [Filip Michalsky](https://github.com/filip-michalsky)\r\n- [Jeremy Press](https://x.com/jeremypress)\r\n- [Navid Pour](https://github.com/navidpour)\r\n\r\n## License\r\n\r\nLicensed under the MIT License.\r\n\r\nCopyright 2025 Browserbase, Inc.\r\n","readmeFilename":"README.md","_rev":"1-7ff2e402feced2ef840bf8be663995a3"}