{"id":18759791,"url":"https://github.com/browserbase/stagehand","last_synced_at":"2026-02-04T23:04:06.950Z","repository":{"id":260103322,"uuid":"776908852","full_name":"browserbase/stagehand","owner":"browserbase","description":"The AI Browser Automation Framework","archived":false,"fork":false,"pushed_at":"2025-09-02T00:45:27.000Z","size":64371,"stargazers_count":16702,"open_issues_count":111,"forks_count":1010,"subscribers_count":74,"default_branch":"main","last_synced_at":"2025-09-02T02:29:45.029Z","etag":null,"topics":["agents","ai","llms","playwright","puppeteer","selenium"],"latest_commit_sha":null,"homepage":"https://stagehand.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/browserbase.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-24T19:19:44.000Z","updated_at":"2025-09-02T00:54:17.000Z","dependencies_parsed_at":"2025-01-03T02:01:45.052Z","dependency_job_id":"aae10c2e-284b-470b-8a16-f01532abfbcf","html_url":"https://github.com/browserbase/stagehand","commit_stats":{"total_commits":225,"total_committers":17,"mean_commits":"13.235294117647058","dds":0.768888888888889,"last_synced_commit":"5c6f14bade201e08cb86d2e14e246cb65707f7ee"},"previous_names":["browserbase/stagehand"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/browserbase/stagehand","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserbase%2Fstagehand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserbase%2Fstagehand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserbase%2Fstagehand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserbase%2Fstagehand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserbase","download_url":"https://codeload.github.com/browserbase/stagehand/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserbase%2Fstagehand/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274365923,"owners_count":25272293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","ai","llms","playwright","puppeteer","selenium"],"created_at":"2024-11-07T18:07:39.283Z","updated_at":"2026-01-24T03:22:03.430Z","avatar_url":"https://github.com/browserbase.png","language":"TypeScript","readme":"\u003cdiv id=\"toc\" align=\"center\" style=\"margin-bottom: 0;\"\u003e\n  \u003cul style=\"list-style: none; margin: 0; padding: 0;\"\u003e\n    \u003ca href=\"https://stagehand.dev\"\u003e\n      \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"media/dark_logo.png\" /\u003e\n        \u003cimg alt=\"Stagehand\" src=\"media/light_logo.png\" width=\"200\" style=\"margin-right: 30px;\" /\u003e\n      \u003c/picture\u003e\n    \u003c/a\u003e\n  \u003c/ul\u003e\n\u003c/div\u003e\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eThe AI Browser Automation Framework\u003c/strong\u003e\u003cbr\u003e\n  \u003ca href=\"https://docs.stagehand.dev\"\u003eRead the Docs\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/browserbase/stagehand/tree/main?tab=MIT-1-ov-file#MIT-1-ov-file\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"media/dark_license.svg\" /\u003e\n      \u003cimg alt=\"MIT License\" src=\"media/light_license.svg\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://stagehand.dev/discord\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"media/dark_discord.svg\" /\u003e\n      \u003cimg alt=\"Discord Community\" src=\"media/light_discord.svg\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://trendshift.io/repositories/12122\" target=\"_blank\"\u003e\u003cimg src=\"https://trendshift.io/api/badge/repositories/12122\" alt=\"browserbase%2Fstagehand | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://deepwiki.com/browserbase/stagehand\"\u003e\n    \u003cimg alt=\"Ask DeepWiki\" src=\"https://deepwiki.com/badge.svg\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nIf you're looking for the Python implementation, you can find it \n\u003ca href=\"https://github.com/browserbase/stagehand-python\"\u003e here\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\" style=\"display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 0;\"\u003e\n  \u003cb\u003eVibe code\u003c/b\u003e\n  \u003cspan style=\"font-size: 1.05em;\"\u003e Stagehand with \u003c/span\u003e\n  \u003ca href=\"https://director.ai\" style=\"display: flex; align-items: center;\"\u003e\n    \u003cspan\u003eDirector\u003c/span\u003e\n  \u003c/a\u003e\n  \u003cspan\u003e \u003c/span\u003e\n  \u003cpicture\u003e\n    \u003cimg alt=\"Director\" src=\"media/director_icon.svg\" width=\"25\" /\u003e\n  \u003c/picture\u003e\n\u003c/div\u003e\n\n## What is Stagehand?\n\nStagehand is a browser automation framework used to control web browsers with natural language and code. By combining the power of AI with the precision of code, Stagehand makes web automation flexible, maintainable, and actually reliable.\n\n## Why Stagehand?\n\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 (and bridging the gap between the two) Stagehand is the natural choice for browser automations in production.\n\n1. **Choose when to write code vs. natural language**: use AI when you want to navigate unfamiliar pages, and use code when you know exactly what you want to do.\n\n2. **Go from AI-driven to repeatable workflows**: Stagehand lets you preview AI actions before running them, and also helps you easily cache repeatable actions to save time and tokens.\n\n3. **Write once, run forever**: Stagehand's auto-caching combined with self-healing remembers previous actions, runs without LLM inference, and knows when to involve AI whenever the website changes and your automation breaks. \n\n## Getting Started\n\nStart with Stagehand with one line of code, or check out our [Quickstart Guide](https://docs.stagehand.dev/v3/first-steps/quickstart) for more information:\n\n```bash\nnpx create-browser-app\n```\n\n## Example\n\nHere's how to build a sample browser automation with Stagehand:\n\n```typescript\n// Stagehand's CDP engine provides an optimized, low level interface to the browser built for automation\nconst page = stagehand.context.pages()[0];\nawait page.goto(\"https://github.com/browserbase\");\n\n// Use act() to execute individual actions\nawait stagehand.act(\"click on the stagehand repo\");\n\n// Use agent() for multi-step tasks\nconst agent = stagehand.agent();\nawait agent.execute(\"Get to the latest PR\");\n\n// Use extract() to get structured data from the page\nconst { author, title } = await stagehand.extract(\n  \"extract the author and title of the PR\",\n  z.object({\n    author: z.string().describe(\"The username of the PR author\"),\n    title: z.string().describe(\"The title of the PR\"),\n  }),\n);\n```\n\n## Documentation\n\nVisit [docs.stagehand.dev](https://docs.stagehand.dev) to view the full documentation.\n\n\n### Build and Run from Source\n\n```bash\ngit clone https://github.com/browserbase/stagehand.git\ncd stagehand\npnpm install\npnpm run build\npnpm run example # run the blank script at ./examples/example.ts\n```\n\nStagehand is best when you have an API key for an LLM provider and Browserbase credentials. To add these to your project, run:\n\n```bash\ncp .env.example .env\nnano .env # Edit the .env file to add API keys\n```\n\n### Installing from a branch\n\nYou can install and build Stagehand directly from a github branch using [gitpkg](https://github.com/EqualMa/gitpkg)\n\nIn your project's `package.json` set:\n```json\n\"@browserbasehq/stagehand\": \"https://gitpkg.now.sh/browserbase/stagehand/packages/core?\u003cbranchName\u003e\",\n```\n\n\n## Contributing\n\n\u003e [!NOTE]\n\u003e We highly value contributions to Stagehand! For questions or support, please join our [Discord community](https://stagehand.dev/discord).\n\nAt a high level, we're focused on improving reliability, extensibility, speed, and cost in that order of priority. If you're interested in contributing, **bug fixes and small improvements are the best way to get started**. For more involved features, we strongly recommend reaching out to [Miguel Gonzalez](https://x.com/miguel_gonzf) or [Paul Klein](https://x.com/pk_iv) in our [Discord community](https://stagehand.dev/discord) before starting to ensure that your contribution aligns with our goals.\n\n\u003c!-- For more information, please see our [Contributing Guide](https://docs.stagehand.dev/examples/contributing). --\u003e\n\n## Acknowledgements\n\nWe'd like to thank the following people for their major contributions to Stagehand:\n- [Paul Klein](https://github.com/pkiv)\n- [Sean McGuire](https://github.com/seanmcguire12)\n- [Miguel Gonzalez](https://github.com/miguelg719)\n- [Sameel Arif](https://github.com/sameelarif)\n- [Thomas Katwan](https://github.com/tkattkat)\n- [Filip Michalsky](https://github.com/filip-michalsky)\n- [Anirudh Kamath](https://github.com/kamath)\n- [Jeremy Press](https://x.com/jeremypress)\n- [Navid Pour](https://github.com/navidpour)\n\n## License\n\nLicensed under the MIT License.\n\nCopyright 2025 Browserbase, Inc.\n","funding_links":[],"categories":["AI Agent Frameworks","TypeScript","🚀 Specialized Agents","AI Agents for Testing","HarmonyOS","🤖 AI-Powered Scraping","ai","Repos","GUI \u0026 Computer Control AI Agents","\u003ca name=\"TypeScript\"\u003e\u003c/a\u003eTypeScript","Agent Harnessing and Evaluation","Frameworks \u0026 Libraries","Tools"],"sub_categories":["Browser Automation Agents","🌐 Web Agents",".NET","Windows Manager","Browser \u0026 Web Automation","Benchmark Reality Check (real-world tool use)","Browser Agents","Browser Automation","Agent Web Interaction"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserbase%2Fstagehand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserbase%2Fstagehand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserbase%2Fstagehand/lists"}