[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-browserbase-browser-use-to-stagehand":3,"mdc-q1qtqh-key":37,"related-repo-browserbase-browser-use-to-stagehand":2881,"related-org-browserbase-browser-use-to-stagehand":2992},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":35,"mdContent":36},"browser-use-to-stagehand","migrate browser-use scripts to Stagehand","Migrate browser-use (Python) browser-automation scripts to Stagehand v3 (TypeScript) on Browserbase. Use when the user wants to convert, port, rewrite, or migrate a browser-use Agent script to Stagehand, map browser-use features\u002FAPIs to Stagehand primitives (act\u002Fextract\u002Fobserve\u002Fagent), or move agentic browser automation onto Browserbase with more determinism. Triggers on \"browser-use\", \"browser_use\", or \"Agent(task=...)\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"browserbase","Browserbase","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fbrowserbase.png",[12,16,19,20,23],{"name":13,"slug":14,"type":15},"TypeScript","typescript","tag",{"name":17,"slug":18,"type":15},"Migration","migration",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"Python","python",{"name":24,"slug":25,"type":15},"Browser Automation","browser-automation",3649,"https:\u002F\u002Fgithub.com\u002Fbrowserbase\u002Fskills","2026-06-26T07:57:47.428249","MIT",232,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":34},[],"Browserbase's official collection of agent skills to access the web.","https:\u002F\u002Fgithub.com\u002Fbrowserbase\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fbrowser-use-to-stagehand","---\nname: browser-use-to-stagehand\ndescription: Migrate browser-use (Python) browser-automation scripts to Stagehand v3 (TypeScript) on Browserbase. Use when the user wants to convert, port, rewrite, or migrate a browser-use Agent script to Stagehand, map browser-use features\u002FAPIs to Stagehand primitives (act\u002Fextract\u002Fobserve\u002Fagent), or move agentic browser automation onto Browserbase with more determinism. Triggers on \"browser-use\", \"browser_use\", or \"Agent(task=...)\".\ncompatibility: \"The skill itself uses only Read\u002FWrite\u002FEdit\u002FGrep\u002FBash — no install step. The Stagehand code it generates needs Node 18+, `@browserbasehq\u002Fstagehand` (v3) and `zod`, plus `BROWSERBASE_API_KEY` \u002F `BROWSERBASE_PROJECT_ID` and a model-provider key (e.g. `ANTHROPIC_API_KEY`) to run. The optional trace-assisted path uses the Browserbase SDK or the sibling `browser-trace` skill.\"\nlicense: MIT\nallowed-tools: Read, Write, Edit, Grep, Bash\n---\n\n# browser-use → Stagehand on Browserbase (`\u002Fbrowser-use-to-stagehand`)\n\nConvert a browser-use (Python) script into an idiomatic **Stagehand v3 (TypeScript)** script on\n**Browserbase**, choosing the right level of determinism at each step rather than producing a\none-to-one agentic copy.\n\n**Core principle:** browser-use is agentic-by-default (the LLM decides every action). Stagehand\nlets you choose how much AI to use. A good migration replaces opaque agent loops with an\ninspectable, mostly-deterministic pipeline — using AI only where the page is genuinely\nunpredictable. This is a refactor with judgment, not a transpile.\n\n> **Source of truth & versions.** This skill's durable value is the *judgment* — the determinism\n> spectrum and the decompose-vs-agent decision — not the API specifics, which drift every release.\n> The code mappings here are a **snapshot validated against `@browserbasehq\u002Fstagehand` 3.6.x and\n> browser-use 0.13.x (2026-06)**. On any conflict, the **live docs win** — always verify against the\n> installed package and these sources before emitting code:\n> - Stagehand v3: \u003Chttps:\u002F\u002Fdocs.stagehand.dev\u002Fv3>  ·  installed types: `node_modules\u002F@browserbasehq\u002Fstagehand`\n> - Browserbase: \u003Chttps:\u002F\u002Fdocs.browserbase.com>\n> - browser-use: \u003Chttps:\u002F\u002Fdocs.browser-use.com>\n>\n> If the installed Stagehand major is **not 3**, treat this skill as conceptual only and follow the\n> live docs for every signature.\n\n## Reference files (read as needed)\n\n- [`references\u002Fapi-mapping.md`](references\u002Fapi-mapping.md) — the mechanical browser-use → Stagehand\n  mapping: variant detection, the full feature table, before\u002Fafter code, Browserbase platform\n  options, and v3 version gotchas. **Read this for any non-trivial construct.**\n- [`references\u002Fdeterminism.md`](references\u002Fdeterminism.md) — how to choose `agent()` vs\n  `act`\u002F`extract`\u002F`observe` vs cached `observe`→`act`. The decision tree. **Read this when deciding\n  how to translate an `Agent(task=…)`.**\n- [`references\u002Ftrace-assisted.md`](references\u002Ftrace-assisted.md) — the optional \"run it on\n  Browserbase, read the logs, then rewrite\" workflow for opaque\u002Fflaky scripts.\n- [`references\u002Fguide.md`](references\u002Fguide.md) — the human migration guide: philosophy shift,\n  feature mapping, the determinism spectrum, and a recommended migration path.\n- [`references\u002Fprompt.md`](references\u002Fprompt.md) — a self-contained, tool-agnostic version of this\n  skill; paste it into any AI assistant along with a browser-use script.\n- [`EXAMPLES.md`](EXAMPLES.md) — before\u002Fafter script pairs.\n\n## Workflow\n\n### 1. Get the source\nObtain the browser-use script(s). If the user only described a script, ask for the file(s). Note\nthe target: **TypeScript Stagehand on Browserbase** unless they say otherwise.\n\n> **First, gate on scope — is this even migratable?** Not every browser-use file is an\n> `Agent(task=…)` script. If the source is **browser-use running as an MCP server**\n> (`uvx browser-use --mcp`, a `mcpServers` config) there is **no Stagehand equivalent** — flag it as\n> out of scope, don't invent one (see api-mapping §3.7b). If the browser-use call is **embedded in a\n> larger app** (a class\u002Ftool wrapper, web route, queue task), convert only the browser-use surface and\n> preserve the surrounding app glue — see api-mapping §3.8.\n\n### 2. Detect the browser-use variant\nIdentify legacy (pre-0.12) vs stable vs Rust beta (only when imports come from `browser_use.beta`)\n— see api-mapping §1. Note: the classic top-level `from browser_use import Agent, ChatBrowserUse`\nsurface is alive and well in 0.13.x — `ChatBrowserUse` alone is **not** a beta tell; only a\n`browser_use.beta` import is. All variants translate identically, so when unsure, proceed with the\nstable mapping. Normalize legacy names before translating. State which variant you found.\n\n### 3. Inventory the script\nExtract a structured inventory before writing any TypeScript:\n- **Task(s)** — the `task=` string(s); split each into its implied ordered steps.\n- **Model** — the `Chat*` provider + model id.\n- **Browser config** — local vs `cdp_url`\u002FBrowserbase; headless; proxies; `user_data_dir`\u002F`storage_state`.\n- **Structured output** — any `output_model_schema` Pydantic models.\n- **Secrets** — `sensitive_data`, env-var usage, login flows.\n- **Guardrails** — `allowed_domains`, `max_steps`.\n- **Custom actions** — `@tools.action` \u002F `Controller` functions, and whether each is a deterministic\n  side-effect or an agent capability.\n- **Setup** — `initial_actions`, secondary models (`page_extraction_llm`, `planner_llm`).\n\n### 4. Decide the determinism level per step\nFor each step from the inventory, apply the decision tree in determinism.md:\n- Navigate to a known URL → `page.goto(url)` on the Stagehand page (no AI).\n- On-page action → `act(\"…\")`; if it repeats, `observe()` once then replay `act(action)` (no LLM call).\n- Reading data → `extract(\"…\", zodSchema)`.\n- Genuinely open-ended → keep `stagehand.agent().execute(...)` (tightened with `maxSteps`\u002F`systemPrompt`).\n\nDefault to **decomposition** when the flow is known; keep `agent()` only where it isn't. For a\nfirst lift-and-shift, a faithful `agent()` translation is acceptable — say so and note the\noptimization path.\n\n### 5. Produce the Stagehand v3 rewrite\n**First, verify the API.** Before writing, confirm the exact signatures you're about to use against\nthe installed package (`node_modules\u002F@browserbasehq\u002Fstagehand` types) or \u003Chttps:\u002F\u002Fdocs.stagehand.dev\u002Fv3>.\nThe mappings below are a 3.6.x snapshot; if anything differs in the installed version, the installed\nversion wins. Then emit runnable TypeScript. Always:\n- `import { Stagehand } from \"@browserbasehq\u002Fstagehand\";` and `import { z } from \"zod\";` when extracting.\n- Get the page via `const page = stagehand.context.pages()[0];`.\n- Call AI methods on the **instance**: `stagehand.act(...)`, `stagehand.extract(...)`,\n  `stagehand.observe(...)` — **never** `page.act(...)`.\n- Set the model as a `\"provider\u002Fmodel\"` string.\n- Default to `env: \"BROWSERBASE\"`; show `env: \"LOCAL\"` as the dev option.\n- Pass secrets via `variables` and `process.env`, never hardcoded.\n- `await stagehand.init()` at the start, `await stagehand.close()` in a `finally`.\n\nInclude the project setup so it runs (see the templates below).\n\n### 6. Write the migration summary\nAlongside the code, produce a short summary:\n- **Variant detected** and the determinism choices made (which steps became deterministic vs AI vs agent), with the reasoning.\n- **Needs human review** — anything that didn't map 1:1: lost `allowed_domains` guardrails,\n  custom-action logic, secondary-model intent, ambiguous task strings.\n- **Recommended next step** — Browserbase Context for auth reuse, caching for production, or the\n  trace-assisted path if the flow was opaque.\n\n### 7. Offer the trace-assisted path (only if warranted)\nIf the source was one large opaque `agent(task=…)`, was flaky, or your rewrite can't be confidently\nmapped, offer the trace-assisted workflow (trace-assisted.md): run the original on Browserbase, pull\n`sessions.logs.list`, and rewrite from observed behavior. Don't run anything without the user's go-ahead.\n\n## Output templates\n\n**`package.json`**\n```json\n{\n  \"name\": \"stagehand-migration\",\n  \"type\": \"module\",\n  \"scripts\": { \"start\": \"tsx index.ts\" },\n  \"dependencies\": {\n    \"@browserbasehq\u002Fstagehand\": \"^3.0.0\",\n    \"dotenv\": \"^16.0.0\",\n    \"zod\": \"^3.25.0\"\n  },\n  \"devDependencies\": { \"tsx\": \"^4.0.0\", \"typescript\": \"^5.0.0\" }\n}\n```\n> Add `\"ai\": \"^5.0.0\"` (Vercel AI SDK) **only** if a custom browser-use action maps to an agent\n> `tool`. **Pin v5, not v4** — Stagehand 3.6.x bundles `ai` v5 and types `agent({ tools })` as the v5\n> `ToolSet`, where a tool's schema field is **`inputSchema`**. The v4 `tool()` helper emits\n> `parameters` instead and will **fail to type-check** against Stagehand's v5 `ToolSet`. If you can't\n> control the hoisted `ai` version, skip the `tool()` helper and pass a plain object\n> `{ description, inputSchema: zodSchema, execute }` — it satisfies the v5 `ToolSet` regardless of which\n> `ai` major resolves.\n\n**`.env`**\n```bash\nBROWSERBASE_API_KEY=...\nBROWSERBASE_PROJECT_ID=...\nANTHROPIC_API_KEY=...   # or the provider matching your model string\n```\n\n**`index.ts` skeleton** (decomposed, the preferred shape)\n```typescript\nimport \"dotenv\u002Fconfig\";\nimport { Stagehand } from \"@browserbasehq\u002Fstagehand\";\nimport { z } from \"zod\";\n\nasync function main() {\n  const stagehand = new Stagehand({\n    env: \"BROWSERBASE\",\n    model: \"anthropic\u002Fclaude-sonnet-4-6\",\n  });\n  await stagehand.init();\n  try {\n    const page = stagehand.context.pages()[0];\n\n    await page.goto(\"https:\u002F\u002Fexample.com\");          \u002F\u002F deterministic skeleton\n    await stagehand.act(\"…\");                          \u002F\u002F AI where the page varies\n    const data = await stagehand.extract(\"…\", z.object({ \u002F* … *\u002F }));  \u002F\u002F structured reads\n\n    console.log(data);\n  } finally {\n    await stagehand.close();\n  }\n}\n\nmain().catch((err) => { console.error(err); process.exit(1); });\n```\n\n## Validation checklist (before declaring done)\n- [ ] AI methods are on the **instance** (`stagehand.act\u002Fextract\u002Fobserve`), not the page.\n- [ ] Page obtained via `stagehand.context.pages()[0]`.\n- [ ] Model is a `\"provider\u002Fmodel\"` string; the matching provider key is in `.env`.\n- [ ] `extract` uses a zod schema; `zod` is in dependencies.\n- [ ] Secrets use `variables` + `process.env`; nothing hardcoded.\n- [ ] `init()` \u002F `close()` present; `close()` in `finally`.\n- [ ] Each browser-use step is accounted for, placed deliberately on the determinism spectrum.\n- [ ] Migration summary lists determinism choices and \"needs human review\" items.\n\n## Common mistakes to avoid\n- **Copying v2 syntax** (`page.act()`, `stagehand.page`, `modelName`\u002F`modelClientOptions`,\n  `enableCaching`) from old blog posts. Use v3 — see api-mapping \"Version notes\".\n- **Translating every step into `act()`** — navigate with `page.goto` and cache repeatable steps via `observe`→`act`; don't spend an LLM call on every action.\n- **Defaulting everything to `agent()`** — that just reproduces browser-use's non-determinism in a\n  new framework. Decompose where the flow is known.\n- **Silently dropping `allowed_domains`** — Stagehand has no domain firewall; flag it for review.\n- **Inventing Browserbase\u002FStagehand options** — if unsure of a field, check\n  \u003Chttps:\u002F\u002Fdocs.stagehand.dev\u002Fv3> \u002F \u003Chttps:\u002F\u002Fdocs.browserbase.com> rather than guessing.\n",{"data":38,"body":41},{"name":4,"description":6,"compatibility":39,"license":29,"allowed-tools":40},"The skill itself uses only Read\u002FWrite\u002FEdit\u002FGrep\u002FBash — no install step. The Stagehand code it generates needs Node 18+, `@browserbasehq\u002Fstagehand` (v3) and `zod`, plus `BROWSERBASE_API_KEY` \u002F `BROWSERBASE_PROJECT_ID` and a model-provider key (e.g. `ANTHROPIC_API_KEY`) to run. The optional trace-assisted path uses the Browserbase SDK or the sibling `browser-trace` skill.","Read, Write, Edit, Grep, Bash",{"type":42,"children":43},"root",[44,62,82,92,196,203,353,359,366,378,435,441,484,490,495,682,688,693,777,803,809,833,994,999,1005,1010,1050,1056,1077,1083,1095,1511,1650,1662,1729,1745,2557,2563,2731,2737,2875],{"type":45,"tag":46,"props":47,"children":49},"element","h1",{"id":48},"browser-use-stagehand-on-browserbase-browser-use-to-stagehand",[50,53,60],{"type":51,"value":52},"text","browser-use → Stagehand on Browserbase (",{"type":45,"tag":54,"props":55,"children":57},"code",{"className":56},[],[58],{"type":51,"value":59},"\u002Fbrowser-use-to-stagehand",{"type":51,"value":61},")",{"type":45,"tag":63,"props":64,"children":65},"p",{},[66,68,74,76,80],{"type":51,"value":67},"Convert a browser-use (Python) script into an idiomatic ",{"type":45,"tag":69,"props":70,"children":71},"strong",{},[72],{"type":51,"value":73},"Stagehand v3 (TypeScript)",{"type":51,"value":75}," script on\n",{"type":45,"tag":69,"props":77,"children":78},{},[79],{"type":51,"value":9},{"type":51,"value":81},", choosing the right level of determinism at each step rather than producing a\none-to-one agentic copy.",{"type":45,"tag":63,"props":83,"children":84},{},[85,90],{"type":45,"tag":69,"props":86,"children":87},{},[88],{"type":51,"value":89},"Core principle:",{"type":51,"value":91}," browser-use is agentic-by-default (the LLM decides every action). Stagehand\nlets you choose how much AI to use. A good migration replaces opaque agent loops with an\ninspectable, mostly-deterministic pipeline — using AI only where the page is genuinely\nunpredictable. This is a refactor with judgment, not a transpile.",{"type":45,"tag":93,"props":94,"children":95},"blockquote",{},[96,136,184],{"type":45,"tag":63,"props":97,"children":98},{},[99,104,106,112,114,127,129,134],{"type":45,"tag":69,"props":100,"children":101},{},[102],{"type":51,"value":103},"Source of truth & versions.",{"type":51,"value":105}," This skill's durable value is the ",{"type":45,"tag":107,"props":108,"children":109},"em",{},[110],{"type":51,"value":111},"judgment",{"type":51,"value":113}," — the determinism\nspectrum and the decompose-vs-agent decision — not the API specifics, which drift every release.\nThe code mappings here are a ",{"type":45,"tag":69,"props":115,"children":116},{},[117,119,125],{"type":51,"value":118},"snapshot validated against ",{"type":45,"tag":54,"props":120,"children":122},{"className":121},[],[123],{"type":51,"value":124},"@browserbasehq\u002Fstagehand",{"type":51,"value":126}," 3.6.x and\nbrowser-use 0.13.x (2026-06)",{"type":51,"value":128},". On any conflict, the ",{"type":45,"tag":69,"props":130,"children":131},{},[132],{"type":51,"value":133},"live docs win",{"type":51,"value":135}," — always verify against the\ninstalled package and these sources before emitting code:",{"type":45,"tag":137,"props":138,"children":139},"ul",{},[140,162,173],{"type":45,"tag":141,"props":142,"children":143},"li",{},[144,146,154,156],{"type":51,"value":145},"Stagehand v3: ",{"type":45,"tag":147,"props":148,"children":152},"a",{"href":149,"rel":150},"https:\u002F\u002Fdocs.stagehand.dev\u002Fv3",[151],"nofollow",[153],{"type":51,"value":149},{"type":51,"value":155},"  ·  installed types: ",{"type":45,"tag":54,"props":157,"children":159},{"className":158},[],[160],{"type":51,"value":161},"node_modules\u002F@browserbasehq\u002Fstagehand",{"type":45,"tag":141,"props":163,"children":164},{},[165,167],{"type":51,"value":166},"Browserbase: ",{"type":45,"tag":147,"props":168,"children":171},{"href":169,"rel":170},"https:\u002F\u002Fdocs.browserbase.com",[151],[172],{"type":51,"value":169},{"type":45,"tag":141,"props":174,"children":175},{},[176,178],{"type":51,"value":177},"browser-use: ",{"type":45,"tag":147,"props":179,"children":182},{"href":180,"rel":181},"https:\u002F\u002Fdocs.browser-use.com",[151],[183],{"type":51,"value":180},{"type":45,"tag":63,"props":185,"children":186},{},[187,189,194],{"type":51,"value":188},"If the installed Stagehand major is ",{"type":45,"tag":69,"props":190,"children":191},{},[192],{"type":51,"value":193},"not 3",{"type":51,"value":195},", treat this skill as conceptual only and follow the\nlive docs for every signature.",{"type":45,"tag":197,"props":198,"children":200},"h2",{"id":199},"reference-files-read-as-needed",[201],{"type":51,"value":202},"Reference files (read as needed)",{"type":45,"tag":137,"props":204,"children":205},{},[206,225,297,311,325,339],{"type":45,"tag":141,"props":207,"children":208},{},[209,218,220],{"type":45,"tag":147,"props":210,"children":212},{"href":211},"references\u002Fapi-mapping.md",[213],{"type":45,"tag":54,"props":214,"children":216},{"className":215},[],[217],{"type":51,"value":211},{"type":51,"value":219}," — the mechanical browser-use → Stagehand\nmapping: variant detection, the full feature table, before\u002Fafter code, Browserbase platform\noptions, and v3 version gotchas. ",{"type":45,"tag":69,"props":221,"children":222},{},[223],{"type":51,"value":224},"Read this for any non-trivial construct.",{"type":45,"tag":141,"props":226,"children":227},{},[228,237,239,245,247,253,255,261,262,268,270,275,277,282,284],{"type":45,"tag":147,"props":229,"children":231},{"href":230},"references\u002Fdeterminism.md",[232],{"type":45,"tag":54,"props":233,"children":235},{"className":234},[],[236],{"type":51,"value":230},{"type":51,"value":238}," — how to choose ",{"type":45,"tag":54,"props":240,"children":242},{"className":241},[],[243],{"type":51,"value":244},"agent()",{"type":51,"value":246}," vs\n",{"type":45,"tag":54,"props":248,"children":250},{"className":249},[],[251],{"type":51,"value":252},"act",{"type":51,"value":254},"\u002F",{"type":45,"tag":54,"props":256,"children":258},{"className":257},[],[259],{"type":51,"value":260},"extract",{"type":51,"value":254},{"type":45,"tag":54,"props":263,"children":265},{"className":264},[],[266],{"type":51,"value":267},"observe",{"type":51,"value":269}," vs cached ",{"type":45,"tag":54,"props":271,"children":273},{"className":272},[],[274],{"type":51,"value":267},{"type":51,"value":276},"→",{"type":45,"tag":54,"props":278,"children":280},{"className":279},[],[281],{"type":51,"value":252},{"type":51,"value":283},". The decision tree. ",{"type":45,"tag":69,"props":285,"children":286},{},[287,289,295],{"type":51,"value":288},"Read this when deciding\nhow to translate an ",{"type":45,"tag":54,"props":290,"children":292},{"className":291},[],[293],{"type":51,"value":294},"Agent(task=…)",{"type":51,"value":296},".",{"type":45,"tag":141,"props":298,"children":299},{},[300,309],{"type":45,"tag":147,"props":301,"children":303},{"href":302},"references\u002Ftrace-assisted.md",[304],{"type":45,"tag":54,"props":305,"children":307},{"className":306},[],[308],{"type":51,"value":302},{"type":51,"value":310}," — the optional \"run it on\nBrowserbase, read the logs, then rewrite\" workflow for opaque\u002Fflaky scripts.",{"type":45,"tag":141,"props":312,"children":313},{},[314,323],{"type":45,"tag":147,"props":315,"children":317},{"href":316},"references\u002Fguide.md",[318],{"type":45,"tag":54,"props":319,"children":321},{"className":320},[],[322],{"type":51,"value":316},{"type":51,"value":324}," — the human migration guide: philosophy shift,\nfeature mapping, the determinism spectrum, and a recommended migration path.",{"type":45,"tag":141,"props":326,"children":327},{},[328,337],{"type":45,"tag":147,"props":329,"children":331},{"href":330},"references\u002Fprompt.md",[332],{"type":45,"tag":54,"props":333,"children":335},{"className":334},[],[336],{"type":51,"value":330},{"type":51,"value":338}," — a self-contained, tool-agnostic version of this\nskill; paste it into any AI assistant along with a browser-use script.",{"type":45,"tag":141,"props":340,"children":341},{},[342,351],{"type":45,"tag":147,"props":343,"children":345},{"href":344},"EXAMPLES.md",[346],{"type":45,"tag":54,"props":347,"children":349},{"className":348},[],[350],{"type":51,"value":344},{"type":51,"value":352}," — before\u002Fafter script pairs.",{"type":45,"tag":197,"props":354,"children":356},{"id":355},"workflow",[357],{"type":51,"value":358},"Workflow",{"type":45,"tag":360,"props":361,"children":363},"h3",{"id":362},"_1-get-the-source",[364],{"type":51,"value":365},"1. Get the source",{"type":45,"tag":63,"props":367,"children":368},{},[369,371,376],{"type":51,"value":370},"Obtain the browser-use script(s). If the user only described a script, ask for the file(s). Note\nthe target: ",{"type":45,"tag":69,"props":372,"children":373},{},[374],{"type":51,"value":375},"TypeScript Stagehand on Browserbase",{"type":51,"value":377}," unless they say otherwise.",{"type":45,"tag":93,"props":379,"children":380},{},[381],{"type":45,"tag":63,"props":382,"children":383},{},[384,389,391,396,398,403,405,411,413,419,421,426,428,433],{"type":45,"tag":69,"props":385,"children":386},{},[387],{"type":51,"value":388},"First, gate on scope — is this even migratable?",{"type":51,"value":390}," Not every browser-use file is an\n",{"type":45,"tag":54,"props":392,"children":394},{"className":393},[],[395],{"type":51,"value":294},{"type":51,"value":397}," script. If the source is ",{"type":45,"tag":69,"props":399,"children":400},{},[401],{"type":51,"value":402},"browser-use running as an MCP server",{"type":51,"value":404},"\n(",{"type":45,"tag":54,"props":406,"children":408},{"className":407},[],[409],{"type":51,"value":410},"uvx browser-use --mcp",{"type":51,"value":412},", a ",{"type":45,"tag":54,"props":414,"children":416},{"className":415},[],[417],{"type":51,"value":418},"mcpServers",{"type":51,"value":420}," config) there is ",{"type":45,"tag":69,"props":422,"children":423},{},[424],{"type":51,"value":425},"no Stagehand equivalent",{"type":51,"value":427}," — flag it as\nout of scope, don't invent one (see api-mapping §3.7b). If the browser-use call is ",{"type":45,"tag":69,"props":429,"children":430},{},[431],{"type":51,"value":432},"embedded in a\nlarger app",{"type":51,"value":434}," (a class\u002Ftool wrapper, web route, queue task), convert only the browser-use surface and\npreserve the surrounding app glue — see api-mapping §3.8.",{"type":45,"tag":360,"props":436,"children":438},{"id":437},"_2-detect-the-browser-use-variant",[439],{"type":51,"value":440},"2. Detect the browser-use variant",{"type":45,"tag":63,"props":442,"children":443},{},[444,446,452,454,460,462,468,470,475,477,482],{"type":51,"value":445},"Identify legacy (pre-0.12) vs stable vs Rust beta (only when imports come from ",{"type":45,"tag":54,"props":447,"children":449},{"className":448},[],[450],{"type":51,"value":451},"browser_use.beta",{"type":51,"value":453},")\n— see api-mapping §1. Note: the classic top-level ",{"type":45,"tag":54,"props":455,"children":457},{"className":456},[],[458],{"type":51,"value":459},"from browser_use import Agent, ChatBrowserUse",{"type":51,"value":461},"\nsurface is alive and well in 0.13.x — ",{"type":45,"tag":54,"props":463,"children":465},{"className":464},[],[466],{"type":51,"value":467},"ChatBrowserUse",{"type":51,"value":469}," alone is ",{"type":45,"tag":69,"props":471,"children":472},{},[473],{"type":51,"value":474},"not",{"type":51,"value":476}," a beta tell; only a\n",{"type":45,"tag":54,"props":478,"children":480},{"className":479},[],[481],{"type":51,"value":451},{"type":51,"value":483}," import is. All variants translate identically, so when unsure, proceed with the\nstable mapping. Normalize legacy names before translating. State which variant you found.",{"type":45,"tag":360,"props":485,"children":487},{"id":486},"_3-inventory-the-script",[488],{"type":51,"value":489},"3. Inventory the script",{"type":45,"tag":63,"props":491,"children":492},{},[493],{"type":51,"value":494},"Extract a structured inventory before writing any TypeScript:",{"type":45,"tag":137,"props":496,"children":497},{},[498,516,533,565,583,601,625,650],{"type":45,"tag":141,"props":499,"children":500},{},[501,506,508,514],{"type":45,"tag":69,"props":502,"children":503},{},[504],{"type":51,"value":505},"Task(s)",{"type":51,"value":507}," — the ",{"type":45,"tag":54,"props":509,"children":511},{"className":510},[],[512],{"type":51,"value":513},"task=",{"type":51,"value":515}," string(s); split each into its implied ordered steps.",{"type":45,"tag":141,"props":517,"children":518},{},[519,524,525,531],{"type":45,"tag":69,"props":520,"children":521},{},[522],{"type":51,"value":523},"Model",{"type":51,"value":507},{"type":45,"tag":54,"props":526,"children":528},{"className":527},[],[529],{"type":51,"value":530},"Chat*",{"type":51,"value":532}," provider + model id.",{"type":45,"tag":141,"props":534,"children":535},{},[536,541,543,549,551,557,558,564],{"type":45,"tag":69,"props":537,"children":538},{},[539],{"type":51,"value":540},"Browser config",{"type":51,"value":542}," — local vs ",{"type":45,"tag":54,"props":544,"children":546},{"className":545},[],[547],{"type":51,"value":548},"cdp_url",{"type":51,"value":550},"\u002FBrowserbase; headless; proxies; ",{"type":45,"tag":54,"props":552,"children":554},{"className":553},[],[555],{"type":51,"value":556},"user_data_dir",{"type":51,"value":254},{"type":45,"tag":54,"props":559,"children":561},{"className":560},[],[562],{"type":51,"value":563},"storage_state",{"type":51,"value":296},{"type":45,"tag":141,"props":566,"children":567},{},[568,573,575,581],{"type":45,"tag":69,"props":569,"children":570},{},[571],{"type":51,"value":572},"Structured output",{"type":51,"value":574}," — any ",{"type":45,"tag":54,"props":576,"children":578},{"className":577},[],[579],{"type":51,"value":580},"output_model_schema",{"type":51,"value":582}," Pydantic models.",{"type":45,"tag":141,"props":584,"children":585},{},[586,591,593,599],{"type":45,"tag":69,"props":587,"children":588},{},[589],{"type":51,"value":590},"Secrets",{"type":51,"value":592}," — ",{"type":45,"tag":54,"props":594,"children":596},{"className":595},[],[597],{"type":51,"value":598},"sensitive_data",{"type":51,"value":600},", env-var usage, login flows.",{"type":45,"tag":141,"props":602,"children":603},{},[604,609,610,616,618,624],{"type":45,"tag":69,"props":605,"children":606},{},[607],{"type":51,"value":608},"Guardrails",{"type":51,"value":592},{"type":45,"tag":54,"props":611,"children":613},{"className":612},[],[614],{"type":51,"value":615},"allowed_domains",{"type":51,"value":617},", ",{"type":45,"tag":54,"props":619,"children":621},{"className":620},[],[622],{"type":51,"value":623},"max_steps",{"type":51,"value":296},{"type":45,"tag":141,"props":626,"children":627},{},[628,633,634,640,642,648],{"type":45,"tag":69,"props":629,"children":630},{},[631],{"type":51,"value":632},"Custom actions",{"type":51,"value":592},{"type":45,"tag":54,"props":635,"children":637},{"className":636},[],[638],{"type":51,"value":639},"@tools.action",{"type":51,"value":641}," \u002F ",{"type":45,"tag":54,"props":643,"children":645},{"className":644},[],[646],{"type":51,"value":647},"Controller",{"type":51,"value":649}," functions, and whether each is a deterministic\nside-effect or an agent capability.",{"type":45,"tag":141,"props":651,"children":652},{},[653,658,659,665,667,673,674,680],{"type":45,"tag":69,"props":654,"children":655},{},[656],{"type":51,"value":657},"Setup",{"type":51,"value":592},{"type":45,"tag":54,"props":660,"children":662},{"className":661},[],[663],{"type":51,"value":664},"initial_actions",{"type":51,"value":666},", secondary models (",{"type":45,"tag":54,"props":668,"children":670},{"className":669},[],[671],{"type":51,"value":672},"page_extraction_llm",{"type":51,"value":617},{"type":45,"tag":54,"props":675,"children":677},{"className":676},[],[678],{"type":51,"value":679},"planner_llm",{"type":51,"value":681},").",{"type":45,"tag":360,"props":683,"children":685},{"id":684},"_4-decide-the-determinism-level-per-step",[686],{"type":51,"value":687},"4. Decide the determinism level per step",{"type":45,"tag":63,"props":689,"children":690},{},[691],{"type":51,"value":692},"For each step from the inventory, apply the decision tree in determinism.md:",{"type":45,"tag":137,"props":694,"children":695},{},[696,709,738,750],{"type":45,"tag":141,"props":697,"children":698},{},[699,701,707],{"type":51,"value":700},"Navigate to a known URL → ",{"type":45,"tag":54,"props":702,"children":704},{"className":703},[],[705],{"type":51,"value":706},"page.goto(url)",{"type":51,"value":708}," on the Stagehand page (no AI).",{"type":45,"tag":141,"props":710,"children":711},{},[712,714,720,722,728,730,736],{"type":51,"value":713},"On-page action → ",{"type":45,"tag":54,"props":715,"children":717},{"className":716},[],[718],{"type":51,"value":719},"act(\"…\")",{"type":51,"value":721},"; if it repeats, ",{"type":45,"tag":54,"props":723,"children":725},{"className":724},[],[726],{"type":51,"value":727},"observe()",{"type":51,"value":729}," once then replay ",{"type":45,"tag":54,"props":731,"children":733},{"className":732},[],[734],{"type":51,"value":735},"act(action)",{"type":51,"value":737}," (no LLM call).",{"type":45,"tag":141,"props":739,"children":740},{},[741,743,749],{"type":51,"value":742},"Reading data → ",{"type":45,"tag":54,"props":744,"children":746},{"className":745},[],[747],{"type":51,"value":748},"extract(\"…\", zodSchema)",{"type":51,"value":296},{"type":45,"tag":141,"props":751,"children":752},{},[753,755,761,763,769,770,776],{"type":51,"value":754},"Genuinely open-ended → keep ",{"type":45,"tag":54,"props":756,"children":758},{"className":757},[],[759],{"type":51,"value":760},"stagehand.agent().execute(...)",{"type":51,"value":762}," (tightened with ",{"type":45,"tag":54,"props":764,"children":766},{"className":765},[],[767],{"type":51,"value":768},"maxSteps",{"type":51,"value":254},{"type":45,"tag":54,"props":771,"children":773},{"className":772},[],[774],{"type":51,"value":775},"systemPrompt",{"type":51,"value":681},{"type":45,"tag":63,"props":778,"children":779},{},[780,782,787,789,794,796,801],{"type":51,"value":781},"Default to ",{"type":45,"tag":69,"props":783,"children":784},{},[785],{"type":51,"value":786},"decomposition",{"type":51,"value":788}," when the flow is known; keep ",{"type":45,"tag":54,"props":790,"children":792},{"className":791},[],[793],{"type":51,"value":244},{"type":51,"value":795}," only where it isn't. For a\nfirst lift-and-shift, a faithful ",{"type":45,"tag":54,"props":797,"children":799},{"className":798},[],[800],{"type":51,"value":244},{"type":51,"value":802}," translation is acceptable — say so and note the\noptimization path.",{"type":45,"tag":360,"props":804,"children":806},{"id":805},"_5-produce-the-stagehand-v3-rewrite",[807],{"type":51,"value":808},"5. Produce the Stagehand v3 rewrite",{"type":45,"tag":63,"props":810,"children":811},{},[812,817,819,824,826,831],{"type":45,"tag":69,"props":813,"children":814},{},[815],{"type":51,"value":816},"First, verify the API.",{"type":51,"value":818}," Before writing, confirm the exact signatures you're about to use against\nthe installed package (",{"type":45,"tag":54,"props":820,"children":822},{"className":821},[],[823],{"type":51,"value":161},{"type":51,"value":825}," types) or ",{"type":45,"tag":147,"props":827,"children":829},{"href":149,"rel":828},[151],[830],{"type":51,"value":149},{"type":51,"value":832},".\nThe mappings below are a 3.6.x snapshot; if anything differs in the installed version, the installed\nversion wins. Then emit runnable TypeScript. Always:",{"type":45,"tag":137,"props":834,"children":835},{},[836,855,867,915,928,948,968],{"type":45,"tag":141,"props":837,"children":838},{},[839,845,847,853],{"type":45,"tag":54,"props":840,"children":842},{"className":841},[],[843],{"type":51,"value":844},"import { Stagehand } from \"@browserbasehq\u002Fstagehand\";",{"type":51,"value":846}," and ",{"type":45,"tag":54,"props":848,"children":850},{"className":849},[],[851],{"type":51,"value":852},"import { z } from \"zod\";",{"type":51,"value":854}," when extracting.",{"type":45,"tag":141,"props":856,"children":857},{},[858,860,866],{"type":51,"value":859},"Get the page via ",{"type":45,"tag":54,"props":861,"children":863},{"className":862},[],[864],{"type":51,"value":865},"const page = stagehand.context.pages()[0];",{"type":51,"value":296},{"type":45,"tag":141,"props":868,"children":869},{},[870,872,877,879,885,886,892,894,900,901,906,908,914],{"type":51,"value":871},"Call AI methods on the ",{"type":45,"tag":69,"props":873,"children":874},{},[875],{"type":51,"value":876},"instance",{"type":51,"value":878},": ",{"type":45,"tag":54,"props":880,"children":882},{"className":881},[],[883],{"type":51,"value":884},"stagehand.act(...)",{"type":51,"value":617},{"type":45,"tag":54,"props":887,"children":889},{"className":888},[],[890],{"type":51,"value":891},"stagehand.extract(...)",{"type":51,"value":893},",\n",{"type":45,"tag":54,"props":895,"children":897},{"className":896},[],[898],{"type":51,"value":899},"stagehand.observe(...)",{"type":51,"value":592},{"type":45,"tag":69,"props":902,"children":903},{},[904],{"type":51,"value":905},"never",{"type":51,"value":907}," ",{"type":45,"tag":54,"props":909,"children":911},{"className":910},[],[912],{"type":51,"value":913},"page.act(...)",{"type":51,"value":296},{"type":45,"tag":141,"props":916,"children":917},{},[918,920,926],{"type":51,"value":919},"Set the model as a ",{"type":45,"tag":54,"props":921,"children":923},{"className":922},[],[924],{"type":51,"value":925},"\"provider\u002Fmodel\"",{"type":51,"value":927}," string.",{"type":45,"tag":141,"props":929,"children":930},{},[931,932,938,940,946],{"type":51,"value":781},{"type":45,"tag":54,"props":933,"children":935},{"className":934},[],[936],{"type":51,"value":937},"env: \"BROWSERBASE\"",{"type":51,"value":939},"; show ",{"type":45,"tag":54,"props":941,"children":943},{"className":942},[],[944],{"type":51,"value":945},"env: \"LOCAL\"",{"type":51,"value":947}," as the dev option.",{"type":45,"tag":141,"props":949,"children":950},{},[951,953,959,960,966],{"type":51,"value":952},"Pass secrets via ",{"type":45,"tag":54,"props":954,"children":956},{"className":955},[],[957],{"type":51,"value":958},"variables",{"type":51,"value":846},{"type":45,"tag":54,"props":961,"children":963},{"className":962},[],[964],{"type":51,"value":965},"process.env",{"type":51,"value":967},", never hardcoded.",{"type":45,"tag":141,"props":969,"children":970},{},[971,977,979,985,987,993],{"type":45,"tag":54,"props":972,"children":974},{"className":973},[],[975],{"type":51,"value":976},"await stagehand.init()",{"type":51,"value":978}," at the start, ",{"type":45,"tag":54,"props":980,"children":982},{"className":981},[],[983],{"type":51,"value":984},"await stagehand.close()",{"type":51,"value":986}," in a ",{"type":45,"tag":54,"props":988,"children":990},{"className":989},[],[991],{"type":51,"value":992},"finally",{"type":51,"value":296},{"type":45,"tag":63,"props":995,"children":996},{},[997],{"type":51,"value":998},"Include the project setup so it runs (see the templates below).",{"type":45,"tag":360,"props":1000,"children":1002},{"id":1001},"_6-write-the-migration-summary",[1003],{"type":51,"value":1004},"6. Write the migration summary",{"type":45,"tag":63,"props":1006,"children":1007},{},[1008],{"type":51,"value":1009},"Alongside the code, produce a short summary:",{"type":45,"tag":137,"props":1011,"children":1012},{},[1013,1023,1040],{"type":45,"tag":141,"props":1014,"children":1015},{},[1016,1021],{"type":45,"tag":69,"props":1017,"children":1018},{},[1019],{"type":51,"value":1020},"Variant detected",{"type":51,"value":1022}," and the determinism choices made (which steps became deterministic vs AI vs agent), with the reasoning.",{"type":45,"tag":141,"props":1024,"children":1025},{},[1026,1031,1033,1038],{"type":45,"tag":69,"props":1027,"children":1028},{},[1029],{"type":51,"value":1030},"Needs human review",{"type":51,"value":1032}," — anything that didn't map 1:1: lost ",{"type":45,"tag":54,"props":1034,"children":1036},{"className":1035},[],[1037],{"type":51,"value":615},{"type":51,"value":1039}," guardrails,\ncustom-action logic, secondary-model intent, ambiguous task strings.",{"type":45,"tag":141,"props":1041,"children":1042},{},[1043,1048],{"type":45,"tag":69,"props":1044,"children":1045},{},[1046],{"type":51,"value":1047},"Recommended next step",{"type":51,"value":1049}," — Browserbase Context for auth reuse, caching for production, or the\ntrace-assisted path if the flow was opaque.",{"type":45,"tag":360,"props":1051,"children":1053},{"id":1052},"_7-offer-the-trace-assisted-path-only-if-warranted",[1054],{"type":51,"value":1055},"7. Offer the trace-assisted path (only if warranted)",{"type":45,"tag":63,"props":1057,"children":1058},{},[1059,1061,1067,1069,1075],{"type":51,"value":1060},"If the source was one large opaque ",{"type":45,"tag":54,"props":1062,"children":1064},{"className":1063},[],[1065],{"type":51,"value":1066},"agent(task=…)",{"type":51,"value":1068},", was flaky, or your rewrite can't be confidently\nmapped, offer the trace-assisted workflow (trace-assisted.md): run the original on Browserbase, pull\n",{"type":45,"tag":54,"props":1070,"children":1072},{"className":1071},[],[1073],{"type":51,"value":1074},"sessions.logs.list",{"type":51,"value":1076},", and rewrite from observed behavior. Don't run anything without the user's go-ahead.",{"type":45,"tag":197,"props":1078,"children":1080},{"id":1079},"output-templates",[1081],{"type":51,"value":1082},"Output templates",{"type":45,"tag":63,"props":1084,"children":1085},{},[1086],{"type":45,"tag":69,"props":1087,"children":1088},{},[1089],{"type":45,"tag":54,"props":1090,"children":1092},{"className":1091},[],[1093],{"type":51,"value":1094},"package.json",{"type":45,"tag":1096,"props":1097,"children":1102},"pre",{"className":1098,"code":1099,"language":1100,"meta":1101,"style":1101},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"name\": \"stagehand-migration\",\n  \"type\": \"module\",\n  \"scripts\": { \"start\": \"tsx index.ts\" },\n  \"dependencies\": {\n    \"@browserbasehq\u002Fstagehand\": \"^3.0.0\",\n    \"dotenv\": \"^16.0.0\",\n    \"zod\": \"^3.25.0\"\n  },\n  \"devDependencies\": { \"tsx\": \"^4.0.0\", \"typescript\": \"^5.0.0\" }\n}\n","json","",[1103],{"type":45,"tag":54,"props":1104,"children":1105},{"__ignoreMap":1101},[1106,1118,1162,1200,1262,1288,1326,1364,1399,1408,1502],{"type":45,"tag":1107,"props":1108,"children":1111},"span",{"class":1109,"line":1110},"line",1,[1112],{"type":45,"tag":1107,"props":1113,"children":1115},{"style":1114},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1116],{"type":51,"value":1117},"{\n",{"type":45,"tag":1107,"props":1119,"children":1121},{"class":1109,"line":1120},2,[1122,1127,1133,1138,1143,1148,1154,1158],{"type":45,"tag":1107,"props":1123,"children":1124},{"style":1114},[1125],{"type":51,"value":1126},"  \"",{"type":45,"tag":1107,"props":1128,"children":1130},{"style":1129},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1131],{"type":51,"value":1132},"name",{"type":45,"tag":1107,"props":1134,"children":1135},{"style":1114},[1136],{"type":51,"value":1137},"\"",{"type":45,"tag":1107,"props":1139,"children":1140},{"style":1114},[1141],{"type":51,"value":1142},":",{"type":45,"tag":1107,"props":1144,"children":1145},{"style":1114},[1146],{"type":51,"value":1147}," \"",{"type":45,"tag":1107,"props":1149,"children":1151},{"style":1150},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1152],{"type":51,"value":1153},"stagehand-migration",{"type":45,"tag":1107,"props":1155,"children":1156},{"style":1114},[1157],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1159,"children":1160},{"style":1114},[1161],{"type":51,"value":893},{"type":45,"tag":1107,"props":1163,"children":1165},{"class":1109,"line":1164},3,[1166,1170,1175,1179,1183,1187,1192,1196],{"type":45,"tag":1107,"props":1167,"children":1168},{"style":1114},[1169],{"type":51,"value":1126},{"type":45,"tag":1107,"props":1171,"children":1172},{"style":1129},[1173],{"type":51,"value":1174},"type",{"type":45,"tag":1107,"props":1176,"children":1177},{"style":1114},[1178],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1180,"children":1181},{"style":1114},[1182],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1184,"children":1185},{"style":1114},[1186],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1188,"children":1189},{"style":1150},[1190],{"type":51,"value":1191},"module",{"type":45,"tag":1107,"props":1193,"children":1194},{"style":1114},[1195],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1197,"children":1198},{"style":1114},[1199],{"type":51,"value":893},{"type":45,"tag":1107,"props":1201,"children":1203},{"class":1109,"line":1202},4,[1204,1208,1213,1217,1221,1226,1230,1236,1240,1244,1248,1253,1257],{"type":45,"tag":1107,"props":1205,"children":1206},{"style":1114},[1207],{"type":51,"value":1126},{"type":45,"tag":1107,"props":1209,"children":1210},{"style":1129},[1211],{"type":51,"value":1212},"scripts",{"type":45,"tag":1107,"props":1214,"children":1215},{"style":1114},[1216],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1218,"children":1219},{"style":1114},[1220],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1222,"children":1223},{"style":1114},[1224],{"type":51,"value":1225}," {",{"type":45,"tag":1107,"props":1227,"children":1228},{"style":1114},[1229],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1231,"children":1233},{"style":1232},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1234],{"type":51,"value":1235},"start",{"type":45,"tag":1107,"props":1237,"children":1238},{"style":1114},[1239],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1241,"children":1242},{"style":1114},[1243],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1245,"children":1246},{"style":1114},[1247],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1249,"children":1250},{"style":1150},[1251],{"type":51,"value":1252},"tsx index.ts",{"type":45,"tag":1107,"props":1254,"children":1255},{"style":1114},[1256],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1258,"children":1259},{"style":1114},[1260],{"type":51,"value":1261}," },\n",{"type":45,"tag":1107,"props":1263,"children":1265},{"class":1109,"line":1264},5,[1266,1270,1275,1279,1283],{"type":45,"tag":1107,"props":1267,"children":1268},{"style":1114},[1269],{"type":51,"value":1126},{"type":45,"tag":1107,"props":1271,"children":1272},{"style":1129},[1273],{"type":51,"value":1274},"dependencies",{"type":45,"tag":1107,"props":1276,"children":1277},{"style":1114},[1278],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1280,"children":1281},{"style":1114},[1282],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1284,"children":1285},{"style":1114},[1286],{"type":51,"value":1287}," {\n",{"type":45,"tag":1107,"props":1289,"children":1291},{"class":1109,"line":1290},6,[1292,1297,1301,1305,1309,1313,1318,1322],{"type":45,"tag":1107,"props":1293,"children":1294},{"style":1114},[1295],{"type":51,"value":1296},"    \"",{"type":45,"tag":1107,"props":1298,"children":1299},{"style":1232},[1300],{"type":51,"value":124},{"type":45,"tag":1107,"props":1302,"children":1303},{"style":1114},[1304],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1306,"children":1307},{"style":1114},[1308],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1310,"children":1311},{"style":1114},[1312],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1314,"children":1315},{"style":1150},[1316],{"type":51,"value":1317},"^3.0.0",{"type":45,"tag":1107,"props":1319,"children":1320},{"style":1114},[1321],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1323,"children":1324},{"style":1114},[1325],{"type":51,"value":893},{"type":45,"tag":1107,"props":1327,"children":1329},{"class":1109,"line":1328},7,[1330,1334,1339,1343,1347,1351,1356,1360],{"type":45,"tag":1107,"props":1331,"children":1332},{"style":1114},[1333],{"type":51,"value":1296},{"type":45,"tag":1107,"props":1335,"children":1336},{"style":1232},[1337],{"type":51,"value":1338},"dotenv",{"type":45,"tag":1107,"props":1340,"children":1341},{"style":1114},[1342],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1344,"children":1345},{"style":1114},[1346],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1348,"children":1349},{"style":1114},[1350],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1352,"children":1353},{"style":1150},[1354],{"type":51,"value":1355},"^16.0.0",{"type":45,"tag":1107,"props":1357,"children":1358},{"style":1114},[1359],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1361,"children":1362},{"style":1114},[1363],{"type":51,"value":893},{"type":45,"tag":1107,"props":1365,"children":1367},{"class":1109,"line":1366},8,[1368,1372,1377,1381,1385,1389,1394],{"type":45,"tag":1107,"props":1369,"children":1370},{"style":1114},[1371],{"type":51,"value":1296},{"type":45,"tag":1107,"props":1373,"children":1374},{"style":1232},[1375],{"type":51,"value":1376},"zod",{"type":45,"tag":1107,"props":1378,"children":1379},{"style":1114},[1380],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1382,"children":1383},{"style":1114},[1384],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1386,"children":1387},{"style":1114},[1388],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1390,"children":1391},{"style":1150},[1392],{"type":51,"value":1393},"^3.25.0",{"type":45,"tag":1107,"props":1395,"children":1396},{"style":1114},[1397],{"type":51,"value":1398},"\"\n",{"type":45,"tag":1107,"props":1400,"children":1402},{"class":1109,"line":1401},9,[1403],{"type":45,"tag":1107,"props":1404,"children":1405},{"style":1114},[1406],{"type":51,"value":1407},"  },\n",{"type":45,"tag":1107,"props":1409,"children":1411},{"class":1109,"line":1410},10,[1412,1416,1421,1425,1429,1433,1437,1442,1446,1450,1454,1459,1463,1468,1472,1476,1480,1484,1488,1493,1497],{"type":45,"tag":1107,"props":1413,"children":1414},{"style":1114},[1415],{"type":51,"value":1126},{"type":45,"tag":1107,"props":1417,"children":1418},{"style":1129},[1419],{"type":51,"value":1420},"devDependencies",{"type":45,"tag":1107,"props":1422,"children":1423},{"style":1114},[1424],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1426,"children":1427},{"style":1114},[1428],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1430,"children":1431},{"style":1114},[1432],{"type":51,"value":1225},{"type":45,"tag":1107,"props":1434,"children":1435},{"style":1114},[1436],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1438,"children":1439},{"style":1232},[1440],{"type":51,"value":1441},"tsx",{"type":45,"tag":1107,"props":1443,"children":1444},{"style":1114},[1445],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1447,"children":1448},{"style":1114},[1449],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1451,"children":1452},{"style":1114},[1453],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1455,"children":1456},{"style":1150},[1457],{"type":51,"value":1458},"^4.0.0",{"type":45,"tag":1107,"props":1460,"children":1461},{"style":1114},[1462],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1464,"children":1465},{"style":1114},[1466],{"type":51,"value":1467},",",{"type":45,"tag":1107,"props":1469,"children":1470},{"style":1114},[1471],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1473,"children":1474},{"style":1232},[1475],{"type":51,"value":14},{"type":45,"tag":1107,"props":1477,"children":1478},{"style":1114},[1479],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1481,"children":1482},{"style":1114},[1483],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1485,"children":1486},{"style":1114},[1487],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1489,"children":1490},{"style":1150},[1491],{"type":51,"value":1492},"^5.0.0",{"type":45,"tag":1107,"props":1494,"children":1495},{"style":1114},[1496],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1498,"children":1499},{"style":1114},[1500],{"type":51,"value":1501}," }\n",{"type":45,"tag":1107,"props":1503,"children":1505},{"class":1109,"line":1504},11,[1506],{"type":45,"tag":1107,"props":1507,"children":1508},{"style":1114},[1509],{"type":51,"value":1510},"}\n",{"type":45,"tag":93,"props":1512,"children":1513},{},[1514],{"type":45,"tag":63,"props":1515,"children":1516},{},[1517,1519,1525,1527,1532,1534,1540,1542,1547,1549,1555,1557,1563,1565,1571,1573,1582,1584,1590,1592,1598,1600,1605,1607,1612,1614,1619,1621,1626,1628,1634,1636,1641,1643,1648],{"type":51,"value":1518},"Add ",{"type":45,"tag":54,"props":1520,"children":1522},{"className":1521},[],[1523],{"type":51,"value":1524},"\"ai\": \"^5.0.0\"",{"type":51,"value":1526}," (Vercel AI SDK) ",{"type":45,"tag":69,"props":1528,"children":1529},{},[1530],{"type":51,"value":1531},"only",{"type":51,"value":1533}," if a custom browser-use action maps to an agent\n",{"type":45,"tag":54,"props":1535,"children":1537},{"className":1536},[],[1538],{"type":51,"value":1539},"tool",{"type":51,"value":1541},". ",{"type":45,"tag":69,"props":1543,"children":1544},{},[1545],{"type":51,"value":1546},"Pin v5, not v4",{"type":51,"value":1548}," — Stagehand 3.6.x bundles ",{"type":45,"tag":54,"props":1550,"children":1552},{"className":1551},[],[1553],{"type":51,"value":1554},"ai",{"type":51,"value":1556}," v5 and types ",{"type":45,"tag":54,"props":1558,"children":1560},{"className":1559},[],[1561],{"type":51,"value":1562},"agent({ tools })",{"type":51,"value":1564}," as the v5\n",{"type":45,"tag":54,"props":1566,"children":1568},{"className":1567},[],[1569],{"type":51,"value":1570},"ToolSet",{"type":51,"value":1572},", where a tool's schema field is ",{"type":45,"tag":69,"props":1574,"children":1575},{},[1576],{"type":45,"tag":54,"props":1577,"children":1579},{"className":1578},[],[1580],{"type":51,"value":1581},"inputSchema",{"type":51,"value":1583},". The v4 ",{"type":45,"tag":54,"props":1585,"children":1587},{"className":1586},[],[1588],{"type":51,"value":1589},"tool()",{"type":51,"value":1591}," helper emits\n",{"type":45,"tag":54,"props":1593,"children":1595},{"className":1594},[],[1596],{"type":51,"value":1597},"parameters",{"type":51,"value":1599}," instead and will ",{"type":45,"tag":69,"props":1601,"children":1602},{},[1603],{"type":51,"value":1604},"fail to type-check",{"type":51,"value":1606}," against Stagehand's v5 ",{"type":45,"tag":54,"props":1608,"children":1610},{"className":1609},[],[1611],{"type":51,"value":1570},{"type":51,"value":1613},". If you can't\ncontrol the hoisted ",{"type":45,"tag":54,"props":1615,"children":1617},{"className":1616},[],[1618],{"type":51,"value":1554},{"type":51,"value":1620}," version, skip the ",{"type":45,"tag":54,"props":1622,"children":1624},{"className":1623},[],[1625],{"type":51,"value":1589},{"type":51,"value":1627}," helper and pass a plain object\n",{"type":45,"tag":54,"props":1629,"children":1631},{"className":1630},[],[1632],{"type":51,"value":1633},"{ description, inputSchema: zodSchema, execute }",{"type":51,"value":1635}," — it satisfies the v5 ",{"type":45,"tag":54,"props":1637,"children":1639},{"className":1638},[],[1640],{"type":51,"value":1570},{"type":51,"value":1642}," regardless of which\n",{"type":45,"tag":54,"props":1644,"children":1646},{"className":1645},[],[1647],{"type":51,"value":1554},{"type":51,"value":1649}," major resolves.",{"type":45,"tag":63,"props":1651,"children":1652},{},[1653],{"type":45,"tag":69,"props":1654,"children":1655},{},[1656],{"type":45,"tag":54,"props":1657,"children":1659},{"className":1658},[],[1660],{"type":51,"value":1661},".env",{"type":45,"tag":1096,"props":1663,"children":1667},{"className":1664,"code":1665,"language":1666,"meta":1101,"style":1101},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","BROWSERBASE_API_KEY=...\nBROWSERBASE_PROJECT_ID=...\nANTHROPIC_API_KEY=...   # or the provider matching your model string\n","bash",[1668],{"type":45,"tag":54,"props":1669,"children":1670},{"__ignoreMap":1101},[1671,1690,1706],{"type":45,"tag":1107,"props":1672,"children":1673},{"class":1109,"line":1110},[1674,1680,1685],{"type":45,"tag":1107,"props":1675,"children":1677},{"style":1676},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1678],{"type":51,"value":1679},"BROWSERBASE_API_KEY",{"type":45,"tag":1107,"props":1681,"children":1682},{"style":1114},[1683],{"type":51,"value":1684},"=",{"type":45,"tag":1107,"props":1686,"children":1687},{"style":1150},[1688],{"type":51,"value":1689},"...\n",{"type":45,"tag":1107,"props":1691,"children":1692},{"class":1109,"line":1120},[1693,1698,1702],{"type":45,"tag":1107,"props":1694,"children":1695},{"style":1676},[1696],{"type":51,"value":1697},"BROWSERBASE_PROJECT_ID",{"type":45,"tag":1107,"props":1699,"children":1700},{"style":1114},[1701],{"type":51,"value":1684},{"type":45,"tag":1107,"props":1703,"children":1704},{"style":1150},[1705],{"type":51,"value":1689},{"type":45,"tag":1107,"props":1707,"children":1708},{"class":1109,"line":1164},[1709,1714,1718,1723],{"type":45,"tag":1107,"props":1710,"children":1711},{"style":1676},[1712],{"type":51,"value":1713},"ANTHROPIC_API_KEY",{"type":45,"tag":1107,"props":1715,"children":1716},{"style":1114},[1717],{"type":51,"value":1684},{"type":45,"tag":1107,"props":1719,"children":1720},{"style":1150},[1721],{"type":51,"value":1722},"...",{"type":45,"tag":1107,"props":1724,"children":1726},{"style":1725},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1727],{"type":51,"value":1728},"   # or the provider matching your model string\n",{"type":45,"tag":63,"props":1730,"children":1731},{},[1732,1743],{"type":45,"tag":69,"props":1733,"children":1734},{},[1735,1741],{"type":45,"tag":54,"props":1736,"children":1738},{"className":1737},[],[1739],{"type":51,"value":1740},"index.ts",{"type":51,"value":1742}," skeleton",{"type":51,"value":1744}," (decomposed, the preferred shape)",{"type":45,"tag":1096,"props":1746,"children":1749},{"className":1747,"code":1748,"language":14,"meta":1101,"style":1101},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import \"dotenv\u002Fconfig\";\nimport { Stagehand } from \"@browserbasehq\u002Fstagehand\";\nimport { z } from \"zod\";\n\nasync function main() {\n  const stagehand = new Stagehand({\n    env: \"BROWSERBASE\",\n    model: \"anthropic\u002Fclaude-sonnet-4-6\",\n  });\n  await stagehand.init();\n  try {\n    const page = stagehand.context.pages()[0];\n\n    await page.goto(\"https:\u002F\u002Fexample.com\");          \u002F\u002F deterministic skeleton\n    await stagehand.act(\"…\");                          \u002F\u002F AI where the page varies\n    const data = await stagehand.extract(\"…\", z.object({ \u002F* … *\u002F }));  \u002F\u002F structured reads\n\n    console.log(data);\n  } finally {\n    await stagehand.close();\n  }\n}\n\nmain().catch((err) => { console.error(err); process.exit(1); });\n",[1750],{"type":45,"tag":54,"props":1751,"children":1752},{"__ignoreMap":1101},[1753,1780,1822,1862,1871,1899,1936,1965,1994,2010,2039,2051,2111,2119,2172,2222,2321,2329,2364,2381,2410,2419,2427,2435],{"type":45,"tag":1107,"props":1754,"children":1755},{"class":1109,"line":1110},[1756,1762,1766,1771,1775],{"type":45,"tag":1107,"props":1757,"children":1759},{"style":1758},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[1760],{"type":51,"value":1761},"import",{"type":45,"tag":1107,"props":1763,"children":1764},{"style":1114},[1765],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1767,"children":1768},{"style":1150},[1769],{"type":51,"value":1770},"dotenv\u002Fconfig",{"type":45,"tag":1107,"props":1772,"children":1773},{"style":1114},[1774],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1776,"children":1777},{"style":1114},[1778],{"type":51,"value":1779},";\n",{"type":45,"tag":1107,"props":1781,"children":1782},{"class":1109,"line":1120},[1783,1787,1791,1796,1801,1806,1810,1814,1818],{"type":45,"tag":1107,"props":1784,"children":1785},{"style":1758},[1786],{"type":51,"value":1761},{"type":45,"tag":1107,"props":1788,"children":1789},{"style":1114},[1790],{"type":51,"value":1225},{"type":45,"tag":1107,"props":1792,"children":1793},{"style":1676},[1794],{"type":51,"value":1795}," Stagehand",{"type":45,"tag":1107,"props":1797,"children":1798},{"style":1114},[1799],{"type":51,"value":1800}," }",{"type":45,"tag":1107,"props":1802,"children":1803},{"style":1758},[1804],{"type":51,"value":1805}," from",{"type":45,"tag":1107,"props":1807,"children":1808},{"style":1114},[1809],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1811,"children":1812},{"style":1150},[1813],{"type":51,"value":124},{"type":45,"tag":1107,"props":1815,"children":1816},{"style":1114},[1817],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1819,"children":1820},{"style":1114},[1821],{"type":51,"value":1779},{"type":45,"tag":1107,"props":1823,"children":1824},{"class":1109,"line":1164},[1825,1829,1833,1838,1842,1846,1850,1854,1858],{"type":45,"tag":1107,"props":1826,"children":1827},{"style":1758},[1828],{"type":51,"value":1761},{"type":45,"tag":1107,"props":1830,"children":1831},{"style":1114},[1832],{"type":51,"value":1225},{"type":45,"tag":1107,"props":1834,"children":1835},{"style":1676},[1836],{"type":51,"value":1837}," z",{"type":45,"tag":1107,"props":1839,"children":1840},{"style":1114},[1841],{"type":51,"value":1800},{"type":45,"tag":1107,"props":1843,"children":1844},{"style":1758},[1845],{"type":51,"value":1805},{"type":45,"tag":1107,"props":1847,"children":1848},{"style":1114},[1849],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1851,"children":1852},{"style":1150},[1853],{"type":51,"value":1376},{"type":45,"tag":1107,"props":1855,"children":1856},{"style":1114},[1857],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1859,"children":1860},{"style":1114},[1861],{"type":51,"value":1779},{"type":45,"tag":1107,"props":1863,"children":1864},{"class":1109,"line":1202},[1865],{"type":45,"tag":1107,"props":1866,"children":1868},{"emptyLinePlaceholder":1867},true,[1869],{"type":51,"value":1870},"\n",{"type":45,"tag":1107,"props":1872,"children":1873},{"class":1109,"line":1264},[1874,1879,1884,1890,1895],{"type":45,"tag":1107,"props":1875,"children":1876},{"style":1129},[1877],{"type":51,"value":1878},"async",{"type":45,"tag":1107,"props":1880,"children":1881},{"style":1129},[1882],{"type":51,"value":1883}," function",{"type":45,"tag":1107,"props":1885,"children":1887},{"style":1886},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1888],{"type":51,"value":1889}," main",{"type":45,"tag":1107,"props":1891,"children":1892},{"style":1114},[1893],{"type":51,"value":1894},"()",{"type":45,"tag":1107,"props":1896,"children":1897},{"style":1114},[1898],{"type":51,"value":1287},{"type":45,"tag":1107,"props":1900,"children":1901},{"class":1109,"line":1290},[1902,1907,1912,1917,1922,1926,1932],{"type":45,"tag":1107,"props":1903,"children":1904},{"style":1129},[1905],{"type":51,"value":1906},"  const",{"type":45,"tag":1107,"props":1908,"children":1909},{"style":1676},[1910],{"type":51,"value":1911}," stagehand",{"type":45,"tag":1107,"props":1913,"children":1914},{"style":1114},[1915],{"type":51,"value":1916}," =",{"type":45,"tag":1107,"props":1918,"children":1919},{"style":1114},[1920],{"type":51,"value":1921}," new",{"type":45,"tag":1107,"props":1923,"children":1924},{"style":1886},[1925],{"type":51,"value":1795},{"type":45,"tag":1107,"props":1927,"children":1929},{"style":1928},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1930],{"type":51,"value":1931},"(",{"type":45,"tag":1107,"props":1933,"children":1934},{"style":1114},[1935],{"type":51,"value":1117},{"type":45,"tag":1107,"props":1937,"children":1938},{"class":1109,"line":1328},[1939,1944,1948,1952,1957,1961],{"type":45,"tag":1107,"props":1940,"children":1941},{"style":1928},[1942],{"type":51,"value":1943},"    env",{"type":45,"tag":1107,"props":1945,"children":1946},{"style":1114},[1947],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1949,"children":1950},{"style":1114},[1951],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1953,"children":1954},{"style":1150},[1955],{"type":51,"value":1956},"BROWSERBASE",{"type":45,"tag":1107,"props":1958,"children":1959},{"style":1114},[1960],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1962,"children":1963},{"style":1114},[1964],{"type":51,"value":893},{"type":45,"tag":1107,"props":1966,"children":1967},{"class":1109,"line":1366},[1968,1973,1977,1981,1986,1990],{"type":45,"tag":1107,"props":1969,"children":1970},{"style":1928},[1971],{"type":51,"value":1972},"    model",{"type":45,"tag":1107,"props":1974,"children":1975},{"style":1114},[1976],{"type":51,"value":1142},{"type":45,"tag":1107,"props":1978,"children":1979},{"style":1114},[1980],{"type":51,"value":1147},{"type":45,"tag":1107,"props":1982,"children":1983},{"style":1150},[1984],{"type":51,"value":1985},"anthropic\u002Fclaude-sonnet-4-6",{"type":45,"tag":1107,"props":1987,"children":1988},{"style":1114},[1989],{"type":51,"value":1137},{"type":45,"tag":1107,"props":1991,"children":1992},{"style":1114},[1993],{"type":51,"value":893},{"type":45,"tag":1107,"props":1995,"children":1996},{"class":1109,"line":1401},[1997,2002,2006],{"type":45,"tag":1107,"props":1998,"children":1999},{"style":1114},[2000],{"type":51,"value":2001},"  }",{"type":45,"tag":1107,"props":2003,"children":2004},{"style":1928},[2005],{"type":51,"value":61},{"type":45,"tag":1107,"props":2007,"children":2008},{"style":1114},[2009],{"type":51,"value":1779},{"type":45,"tag":1107,"props":2011,"children":2012},{"class":1109,"line":1410},[2013,2018,2022,2026,2031,2035],{"type":45,"tag":1107,"props":2014,"children":2015},{"style":1758},[2016],{"type":51,"value":2017},"  await",{"type":45,"tag":1107,"props":2019,"children":2020},{"style":1676},[2021],{"type":51,"value":1911},{"type":45,"tag":1107,"props":2023,"children":2024},{"style":1114},[2025],{"type":51,"value":296},{"type":45,"tag":1107,"props":2027,"children":2028},{"style":1886},[2029],{"type":51,"value":2030},"init",{"type":45,"tag":1107,"props":2032,"children":2033},{"style":1928},[2034],{"type":51,"value":1894},{"type":45,"tag":1107,"props":2036,"children":2037},{"style":1114},[2038],{"type":51,"value":1779},{"type":45,"tag":1107,"props":2040,"children":2041},{"class":1109,"line":1504},[2042,2047],{"type":45,"tag":1107,"props":2043,"children":2044},{"style":1758},[2045],{"type":51,"value":2046},"  try",{"type":45,"tag":1107,"props":2048,"children":2049},{"style":1114},[2050],{"type":51,"value":1287},{"type":45,"tag":1107,"props":2052,"children":2054},{"class":1109,"line":2053},12,[2055,2060,2065,2069,2073,2077,2082,2086,2091,2096,2102,2107],{"type":45,"tag":1107,"props":2056,"children":2057},{"style":1129},[2058],{"type":51,"value":2059},"    const",{"type":45,"tag":1107,"props":2061,"children":2062},{"style":1676},[2063],{"type":51,"value":2064}," page",{"type":45,"tag":1107,"props":2066,"children":2067},{"style":1114},[2068],{"type":51,"value":1916},{"type":45,"tag":1107,"props":2070,"children":2071},{"style":1676},[2072],{"type":51,"value":1911},{"type":45,"tag":1107,"props":2074,"children":2075},{"style":1114},[2076],{"type":51,"value":296},{"type":45,"tag":1107,"props":2078,"children":2079},{"style":1676},[2080],{"type":51,"value":2081},"context",{"type":45,"tag":1107,"props":2083,"children":2084},{"style":1114},[2085],{"type":51,"value":296},{"type":45,"tag":1107,"props":2087,"children":2088},{"style":1886},[2089],{"type":51,"value":2090},"pages",{"type":45,"tag":1107,"props":2092,"children":2093},{"style":1928},[2094],{"type":51,"value":2095},"()[",{"type":45,"tag":1107,"props":2097,"children":2099},{"style":2098},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2100],{"type":51,"value":2101},"0",{"type":45,"tag":1107,"props":2103,"children":2104},{"style":1928},[2105],{"type":51,"value":2106},"]",{"type":45,"tag":1107,"props":2108,"children":2109},{"style":1114},[2110],{"type":51,"value":1779},{"type":45,"tag":1107,"props":2112,"children":2114},{"class":1109,"line":2113},13,[2115],{"type":45,"tag":1107,"props":2116,"children":2117},{"emptyLinePlaceholder":1867},[2118],{"type":51,"value":1870},{"type":45,"tag":1107,"props":2120,"children":2122},{"class":1109,"line":2121},14,[2123,2128,2132,2136,2141,2145,2149,2154,2158,2162,2167],{"type":45,"tag":1107,"props":2124,"children":2125},{"style":1758},[2126],{"type":51,"value":2127},"    await",{"type":45,"tag":1107,"props":2129,"children":2130},{"style":1676},[2131],{"type":51,"value":2064},{"type":45,"tag":1107,"props":2133,"children":2134},{"style":1114},[2135],{"type":51,"value":296},{"type":45,"tag":1107,"props":2137,"children":2138},{"style":1886},[2139],{"type":51,"value":2140},"goto",{"type":45,"tag":1107,"props":2142,"children":2143},{"style":1928},[2144],{"type":51,"value":1931},{"type":45,"tag":1107,"props":2146,"children":2147},{"style":1114},[2148],{"type":51,"value":1137},{"type":45,"tag":1107,"props":2150,"children":2151},{"style":1150},[2152],{"type":51,"value":2153},"https:\u002F\u002Fexample.com",{"type":45,"tag":1107,"props":2155,"children":2156},{"style":1114},[2157],{"type":51,"value":1137},{"type":45,"tag":1107,"props":2159,"children":2160},{"style":1928},[2161],{"type":51,"value":61},{"type":45,"tag":1107,"props":2163,"children":2164},{"style":1114},[2165],{"type":51,"value":2166},";",{"type":45,"tag":1107,"props":2168,"children":2169},{"style":1725},[2170],{"type":51,"value":2171},"          \u002F\u002F deterministic skeleton\n",{"type":45,"tag":1107,"props":2173,"children":2175},{"class":1109,"line":2174},15,[2176,2180,2184,2188,2192,2196,2200,2205,2209,2213,2217],{"type":45,"tag":1107,"props":2177,"children":2178},{"style":1758},[2179],{"type":51,"value":2127},{"type":45,"tag":1107,"props":2181,"children":2182},{"style":1676},[2183],{"type":51,"value":1911},{"type":45,"tag":1107,"props":2185,"children":2186},{"style":1114},[2187],{"type":51,"value":296},{"type":45,"tag":1107,"props":2189,"children":2190},{"style":1886},[2191],{"type":51,"value":252},{"type":45,"tag":1107,"props":2193,"children":2194},{"style":1928},[2195],{"type":51,"value":1931},{"type":45,"tag":1107,"props":2197,"children":2198},{"style":1114},[2199],{"type":51,"value":1137},{"type":45,"tag":1107,"props":2201,"children":2202},{"style":1150},[2203],{"type":51,"value":2204},"…",{"type":45,"tag":1107,"props":2206,"children":2207},{"style":1114},[2208],{"type":51,"value":1137},{"type":45,"tag":1107,"props":2210,"children":2211},{"style":1928},[2212],{"type":51,"value":61},{"type":45,"tag":1107,"props":2214,"children":2215},{"style":1114},[2216],{"type":51,"value":2166},{"type":45,"tag":1107,"props":2218,"children":2219},{"style":1725},[2220],{"type":51,"value":2221},"                          \u002F\u002F AI where the page varies\n",{"type":45,"tag":1107,"props":2223,"children":2225},{"class":1109,"line":2224},16,[2226,2230,2235,2239,2244,2248,2252,2256,2260,2264,2268,2272,2276,2280,2284,2289,2293,2298,2303,2307,2312,2316],{"type":45,"tag":1107,"props":2227,"children":2228},{"style":1129},[2229],{"type":51,"value":2059},{"type":45,"tag":1107,"props":2231,"children":2232},{"style":1676},[2233],{"type":51,"value":2234}," data",{"type":45,"tag":1107,"props":2236,"children":2237},{"style":1114},[2238],{"type":51,"value":1916},{"type":45,"tag":1107,"props":2240,"children":2241},{"style":1758},[2242],{"type":51,"value":2243}," await",{"type":45,"tag":1107,"props":2245,"children":2246},{"style":1676},[2247],{"type":51,"value":1911},{"type":45,"tag":1107,"props":2249,"children":2250},{"style":1114},[2251],{"type":51,"value":296},{"type":45,"tag":1107,"props":2253,"children":2254},{"style":1886},[2255],{"type":51,"value":260},{"type":45,"tag":1107,"props":2257,"children":2258},{"style":1928},[2259],{"type":51,"value":1931},{"type":45,"tag":1107,"props":2261,"children":2262},{"style":1114},[2263],{"type":51,"value":1137},{"type":45,"tag":1107,"props":2265,"children":2266},{"style":1150},[2267],{"type":51,"value":2204},{"type":45,"tag":1107,"props":2269,"children":2270},{"style":1114},[2271],{"type":51,"value":1137},{"type":45,"tag":1107,"props":2273,"children":2274},{"style":1114},[2275],{"type":51,"value":1467},{"type":45,"tag":1107,"props":2277,"children":2278},{"style":1676},[2279],{"type":51,"value":1837},{"type":45,"tag":1107,"props":2281,"children":2282},{"style":1114},[2283],{"type":51,"value":296},{"type":45,"tag":1107,"props":2285,"children":2286},{"style":1886},[2287],{"type":51,"value":2288},"object",{"type":45,"tag":1107,"props":2290,"children":2291},{"style":1928},[2292],{"type":51,"value":1931},{"type":45,"tag":1107,"props":2294,"children":2295},{"style":1114},[2296],{"type":51,"value":2297},"{",{"type":45,"tag":1107,"props":2299,"children":2300},{"style":1725},[2301],{"type":51,"value":2302}," \u002F* … *\u002F",{"type":45,"tag":1107,"props":2304,"children":2305},{"style":1114},[2306],{"type":51,"value":1800},{"type":45,"tag":1107,"props":2308,"children":2309},{"style":1928},[2310],{"type":51,"value":2311},"))",{"type":45,"tag":1107,"props":2313,"children":2314},{"style":1114},[2315],{"type":51,"value":2166},{"type":45,"tag":1107,"props":2317,"children":2318},{"style":1725},[2319],{"type":51,"value":2320},"  \u002F\u002F structured reads\n",{"type":45,"tag":1107,"props":2322,"children":2324},{"class":1109,"line":2323},17,[2325],{"type":45,"tag":1107,"props":2326,"children":2327},{"emptyLinePlaceholder":1867},[2328],{"type":51,"value":1870},{"type":45,"tag":1107,"props":2330,"children":2332},{"class":1109,"line":2331},18,[2333,2338,2342,2347,2351,2356,2360],{"type":45,"tag":1107,"props":2334,"children":2335},{"style":1676},[2336],{"type":51,"value":2337},"    console",{"type":45,"tag":1107,"props":2339,"children":2340},{"style":1114},[2341],{"type":51,"value":296},{"type":45,"tag":1107,"props":2343,"children":2344},{"style":1886},[2345],{"type":51,"value":2346},"log",{"type":45,"tag":1107,"props":2348,"children":2349},{"style":1928},[2350],{"type":51,"value":1931},{"type":45,"tag":1107,"props":2352,"children":2353},{"style":1676},[2354],{"type":51,"value":2355},"data",{"type":45,"tag":1107,"props":2357,"children":2358},{"style":1928},[2359],{"type":51,"value":61},{"type":45,"tag":1107,"props":2361,"children":2362},{"style":1114},[2363],{"type":51,"value":1779},{"type":45,"tag":1107,"props":2365,"children":2367},{"class":1109,"line":2366},19,[2368,2372,2377],{"type":45,"tag":1107,"props":2369,"children":2370},{"style":1114},[2371],{"type":51,"value":2001},{"type":45,"tag":1107,"props":2373,"children":2374},{"style":1758},[2375],{"type":51,"value":2376}," finally",{"type":45,"tag":1107,"props":2378,"children":2379},{"style":1114},[2380],{"type":51,"value":1287},{"type":45,"tag":1107,"props":2382,"children":2384},{"class":1109,"line":2383},20,[2385,2389,2393,2397,2402,2406],{"type":45,"tag":1107,"props":2386,"children":2387},{"style":1758},[2388],{"type":51,"value":2127},{"type":45,"tag":1107,"props":2390,"children":2391},{"style":1676},[2392],{"type":51,"value":1911},{"type":45,"tag":1107,"props":2394,"children":2395},{"style":1114},[2396],{"type":51,"value":296},{"type":45,"tag":1107,"props":2398,"children":2399},{"style":1886},[2400],{"type":51,"value":2401},"close",{"type":45,"tag":1107,"props":2403,"children":2404},{"style":1928},[2405],{"type":51,"value":1894},{"type":45,"tag":1107,"props":2407,"children":2408},{"style":1114},[2409],{"type":51,"value":1779},{"type":45,"tag":1107,"props":2411,"children":2413},{"class":1109,"line":2412},21,[2414],{"type":45,"tag":1107,"props":2415,"children":2416},{"style":1114},[2417],{"type":51,"value":2418},"  }\n",{"type":45,"tag":1107,"props":2420,"children":2422},{"class":1109,"line":2421},22,[2423],{"type":45,"tag":1107,"props":2424,"children":2425},{"style":1114},[2426],{"type":51,"value":1510},{"type":45,"tag":1107,"props":2428,"children":2430},{"class":1109,"line":2429},23,[2431],{"type":45,"tag":1107,"props":2432,"children":2433},{"emptyLinePlaceholder":1867},[2434],{"type":51,"value":1870},{"type":45,"tag":1107,"props":2436,"children":2438},{"class":1109,"line":2437},24,[2439,2444,2448,2452,2457,2461,2465,2471,2475,2480,2484,2489,2493,2498,2502,2506,2510,2514,2519,2523,2528,2532,2537,2541,2545,2549,2553],{"type":45,"tag":1107,"props":2440,"children":2441},{"style":1886},[2442],{"type":51,"value":2443},"main",{"type":45,"tag":1107,"props":2445,"children":2446},{"style":1676},[2447],{"type":51,"value":1894},{"type":45,"tag":1107,"props":2449,"children":2450},{"style":1114},[2451],{"type":51,"value":296},{"type":45,"tag":1107,"props":2453,"children":2454},{"style":1886},[2455],{"type":51,"value":2456},"catch",{"type":45,"tag":1107,"props":2458,"children":2459},{"style":1676},[2460],{"type":51,"value":1931},{"type":45,"tag":1107,"props":2462,"children":2463},{"style":1114},[2464],{"type":51,"value":1931},{"type":45,"tag":1107,"props":2466,"children":2468},{"style":2467},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[2469],{"type":51,"value":2470},"err",{"type":45,"tag":1107,"props":2472,"children":2473},{"style":1114},[2474],{"type":51,"value":61},{"type":45,"tag":1107,"props":2476,"children":2477},{"style":1129},[2478],{"type":51,"value":2479}," =>",{"type":45,"tag":1107,"props":2481,"children":2482},{"style":1114},[2483],{"type":51,"value":1225},{"type":45,"tag":1107,"props":2485,"children":2486},{"style":1676},[2487],{"type":51,"value":2488}," console",{"type":45,"tag":1107,"props":2490,"children":2491},{"style":1114},[2492],{"type":51,"value":296},{"type":45,"tag":1107,"props":2494,"children":2495},{"style":1886},[2496],{"type":51,"value":2497},"error",{"type":45,"tag":1107,"props":2499,"children":2500},{"style":1928},[2501],{"type":51,"value":1931},{"type":45,"tag":1107,"props":2503,"children":2504},{"style":1676},[2505],{"type":51,"value":2470},{"type":45,"tag":1107,"props":2507,"children":2508},{"style":1928},[2509],{"type":51,"value":61},{"type":45,"tag":1107,"props":2511,"children":2512},{"style":1114},[2513],{"type":51,"value":2166},{"type":45,"tag":1107,"props":2515,"children":2516},{"style":1676},[2517],{"type":51,"value":2518}," process",{"type":45,"tag":1107,"props":2520,"children":2521},{"style":1114},[2522],{"type":51,"value":296},{"type":45,"tag":1107,"props":2524,"children":2525},{"style":1886},[2526],{"type":51,"value":2527},"exit",{"type":45,"tag":1107,"props":2529,"children":2530},{"style":1928},[2531],{"type":51,"value":1931},{"type":45,"tag":1107,"props":2533,"children":2534},{"style":2098},[2535],{"type":51,"value":2536},"1",{"type":45,"tag":1107,"props":2538,"children":2539},{"style":1928},[2540],{"type":51,"value":61},{"type":45,"tag":1107,"props":2542,"children":2543},{"style":1114},[2544],{"type":51,"value":2166},{"type":45,"tag":1107,"props":2546,"children":2547},{"style":1114},[2548],{"type":51,"value":1800},{"type":45,"tag":1107,"props":2550,"children":2551},{"style":1676},[2552],{"type":51,"value":61},{"type":45,"tag":1107,"props":2554,"children":2555},{"style":1114},[2556],{"type":51,"value":1779},{"type":45,"tag":197,"props":2558,"children":2560},{"id":2559},"validation-checklist-before-declaring-done",[2561],{"type":51,"value":2562},"Validation checklist (before declaring done)",{"type":45,"tag":137,"props":2564,"children":2567},{"className":2565},[2566],"contains-task-list",[2568,2594,2610,2632,2654,2677,2713,2722],{"type":45,"tag":141,"props":2569,"children":2572},{"className":2570},[2571],"task-list-item",[2573,2578,2580,2584,2586,2592],{"type":45,"tag":2574,"props":2575,"children":2577},"input",{"disabled":1867,"type":2576},"checkbox",[],{"type":51,"value":2579}," AI methods are on the ",{"type":45,"tag":69,"props":2581,"children":2582},{},[2583],{"type":51,"value":876},{"type":51,"value":2585}," (",{"type":45,"tag":54,"props":2587,"children":2589},{"className":2588},[],[2590],{"type":51,"value":2591},"stagehand.act\u002Fextract\u002Fobserve",{"type":51,"value":2593},"), not the page.",{"type":45,"tag":141,"props":2595,"children":2597},{"className":2596},[2571],[2598,2601,2603,2609],{"type":45,"tag":2574,"props":2599,"children":2600},{"disabled":1867,"type":2576},[],{"type":51,"value":2602}," Page obtained via ",{"type":45,"tag":54,"props":2604,"children":2606},{"className":2605},[],[2607],{"type":51,"value":2608},"stagehand.context.pages()[0]",{"type":51,"value":296},{"type":45,"tag":141,"props":2611,"children":2613},{"className":2612},[2571],[2614,2617,2619,2624,2626,2631],{"type":45,"tag":2574,"props":2615,"children":2616},{"disabled":1867,"type":2576},[],{"type":51,"value":2618}," Model is a ",{"type":45,"tag":54,"props":2620,"children":2622},{"className":2621},[],[2623],{"type":51,"value":925},{"type":51,"value":2625}," string; the matching provider key is in ",{"type":45,"tag":54,"props":2627,"children":2629},{"className":2628},[],[2630],{"type":51,"value":1661},{"type":51,"value":296},{"type":45,"tag":141,"props":2633,"children":2635},{"className":2634},[2571],[2636,2639,2640,2645,2647,2652],{"type":45,"tag":2574,"props":2637,"children":2638},{"disabled":1867,"type":2576},[],{"type":51,"value":907},{"type":45,"tag":54,"props":2641,"children":2643},{"className":2642},[],[2644],{"type":51,"value":260},{"type":51,"value":2646}," uses a zod schema; ",{"type":45,"tag":54,"props":2648,"children":2650},{"className":2649},[],[2651],{"type":51,"value":1376},{"type":51,"value":2653}," is in dependencies.",{"type":45,"tag":141,"props":2655,"children":2657},{"className":2656},[2571],[2658,2661,2663,2668,2670,2675],{"type":45,"tag":2574,"props":2659,"children":2660},{"disabled":1867,"type":2576},[],{"type":51,"value":2662}," Secrets use ",{"type":45,"tag":54,"props":2664,"children":2666},{"className":2665},[],[2667],{"type":51,"value":958},{"type":51,"value":2669}," + ",{"type":45,"tag":54,"props":2671,"children":2673},{"className":2672},[],[2674],{"type":51,"value":965},{"type":51,"value":2676},"; nothing hardcoded.",{"type":45,"tag":141,"props":2678,"children":2680},{"className":2679},[2571],[2681,2684,2685,2691,2692,2698,2700,2705,2707,2712],{"type":45,"tag":2574,"props":2682,"children":2683},{"disabled":1867,"type":2576},[],{"type":51,"value":907},{"type":45,"tag":54,"props":2686,"children":2688},{"className":2687},[],[2689],{"type":51,"value":2690},"init()",{"type":51,"value":641},{"type":45,"tag":54,"props":2693,"children":2695},{"className":2694},[],[2696],{"type":51,"value":2697},"close()",{"type":51,"value":2699}," present; ",{"type":45,"tag":54,"props":2701,"children":2703},{"className":2702},[],[2704],{"type":51,"value":2697},{"type":51,"value":2706}," in ",{"type":45,"tag":54,"props":2708,"children":2710},{"className":2709},[],[2711],{"type":51,"value":992},{"type":51,"value":296},{"type":45,"tag":141,"props":2714,"children":2716},{"className":2715},[2571],[2717,2720],{"type":45,"tag":2574,"props":2718,"children":2719},{"disabled":1867,"type":2576},[],{"type":51,"value":2721}," Each browser-use step is accounted for, placed deliberately on the determinism spectrum.",{"type":45,"tag":141,"props":2723,"children":2725},{"className":2724},[2571],[2726,2729],{"type":45,"tag":2574,"props":2727,"children":2728},{"disabled":1867,"type":2576},[],{"type":51,"value":2730}," Migration summary lists determinism choices and \"needs human review\" items.",{"type":45,"tag":197,"props":2732,"children":2734},{"id":2733},"common-mistakes-to-avoid",[2735],{"type":51,"value":2736},"Common mistakes to avoid",{"type":45,"tag":137,"props":2738,"children":2739},{},[2740,2785,2822,2837,2852],{"type":45,"tag":141,"props":2741,"children":2742},{},[2743,2748,2749,2755,2756,2762,2763,2769,2770,2776,2777,2783],{"type":45,"tag":69,"props":2744,"children":2745},{},[2746],{"type":51,"value":2747},"Copying v2 syntax",{"type":51,"value":2585},{"type":45,"tag":54,"props":2750,"children":2752},{"className":2751},[],[2753],{"type":51,"value":2754},"page.act()",{"type":51,"value":617},{"type":45,"tag":54,"props":2757,"children":2759},{"className":2758},[],[2760],{"type":51,"value":2761},"stagehand.page",{"type":51,"value":617},{"type":45,"tag":54,"props":2764,"children":2766},{"className":2765},[],[2767],{"type":51,"value":2768},"modelName",{"type":51,"value":254},{"type":45,"tag":54,"props":2771,"children":2773},{"className":2772},[],[2774],{"type":51,"value":2775},"modelClientOptions",{"type":51,"value":893},{"type":45,"tag":54,"props":2778,"children":2780},{"className":2779},[],[2781],{"type":51,"value":2782},"enableCaching",{"type":51,"value":2784},") from old blog posts. Use v3 — see api-mapping \"Version notes\".",{"type":45,"tag":141,"props":2786,"children":2787},{},[2788,2799,2801,2807,2809,2814,2815,2820],{"type":45,"tag":69,"props":2789,"children":2790},{},[2791,2793],{"type":51,"value":2792},"Translating every step into ",{"type":45,"tag":54,"props":2794,"children":2796},{"className":2795},[],[2797],{"type":51,"value":2798},"act()",{"type":51,"value":2800}," — navigate with ",{"type":45,"tag":54,"props":2802,"children":2804},{"className":2803},[],[2805],{"type":51,"value":2806},"page.goto",{"type":51,"value":2808}," and cache repeatable steps via ",{"type":45,"tag":54,"props":2810,"children":2812},{"className":2811},[],[2813],{"type":51,"value":267},{"type":51,"value":276},{"type":45,"tag":54,"props":2816,"children":2818},{"className":2817},[],[2819],{"type":51,"value":252},{"type":51,"value":2821},"; don't spend an LLM call on every action.",{"type":45,"tag":141,"props":2823,"children":2824},{},[2825,2835],{"type":45,"tag":69,"props":2826,"children":2827},{},[2828,2830],{"type":51,"value":2829},"Defaulting everything to ",{"type":45,"tag":54,"props":2831,"children":2833},{"className":2832},[],[2834],{"type":51,"value":244},{"type":51,"value":2836}," — that just reproduces browser-use's non-determinism in a\nnew framework. Decompose where the flow is known.",{"type":45,"tag":141,"props":2838,"children":2839},{},[2840,2850],{"type":45,"tag":69,"props":2841,"children":2842},{},[2843,2845],{"type":51,"value":2844},"Silently dropping ",{"type":45,"tag":54,"props":2846,"children":2848},{"className":2847},[],[2849],{"type":51,"value":615},{"type":51,"value":2851}," — Stagehand has no domain firewall; flag it for review.",{"type":45,"tag":141,"props":2853,"children":2854},{},[2855,2860,2862,2867,2868,2873],{"type":45,"tag":69,"props":2856,"children":2857},{},[2858],{"type":51,"value":2859},"Inventing Browserbase\u002FStagehand options",{"type":51,"value":2861}," — if unsure of a field, check\n",{"type":45,"tag":147,"props":2863,"children":2865},{"href":149,"rel":2864},[151],[2866],{"type":51,"value":149},{"type":51,"value":641},{"type":45,"tag":147,"props":2869,"children":2871},{"href":169,"rel":2870},[151],[2872],{"type":51,"value":169},{"type":51,"value":2874}," rather than guessing.",{"type":45,"tag":2876,"props":2877,"children":2878},"style",{},[2879],{"type":51,"value":2880},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2882,"total":2224},[2883,2906,2919,2931,2949,2964,2972],{"slug":2884,"name":2884,"fn":2885,"description":2886,"org":2887,"tags":2888,"stars":26,"repoUrl":27,"updatedAt":2905},"agent-experience","audit developer experience with AI agents","Audit the developer experience of a product, SDK, docs site, or SKILL.md by dropping multiple Claude subagents at it with only a tiny task prompt and real tools (WebFetch, Bash, Write). Agents must discover the docs themselves, install deps, ask for credentials if needed, and attempt real execution. The skill captures each agent's trace — tool calls, retries, wall time, errors — and scores on Setup Friction, Speed, Efficiency, Error Recovery, and Doc Quality, then emits an HTML report with an A–F grade and concrete fixes. Use when the user asks to audit agent experience, test a skill, audit docs for agents, check if a SDK is agent-friendly, validate a SKILL.md, measure agent DX, or benchmark how painful onboarding is for an AI agent. Triggers: 'audit agent experience', 'test this skill', 'audit docs for agents', 'is my SDK agent-friendly', 'run a DX audit', 'agent experience test', 'test my docs', 'how do agents do with my product'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2889,2892,2895,2896,2899,2902],{"name":2890,"slug":2891,"type":15},"Agents","agents",{"name":2893,"slug":2894,"type":15},"Audit","audit",{"name":9,"slug":8,"type":15},{"name":2897,"slug":2898,"type":15},"Engineering","engineering",{"name":2900,"slug":2901,"type":15},"Multi-Agent","multi-agent",{"name":2903,"slug":2904,"type":15},"QA","qa","2026-05-29T06:58:56.259807",{"slug":2907,"name":2907,"fn":2908,"description":2909,"org":2910,"tags":2911,"stars":26,"repoUrl":27,"updatedAt":2918},"autobrowse","run self-improving browser automation","Self-improving browser automation via the auto-research loop. Iteratively runs a browsing task, reads the trace, and improves the navigation skill (strategy.md) until it reliably passes. Supports parallel runs across multiple tasks using sub-agents. Use when you want to build or improve browser automation skills for specific website tasks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2912,2913,2916,2917],{"name":2890,"slug":2891,"type":15},{"name":2914,"slug":2915,"type":15},"Automation","automation",{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},"2026-04-23T05:00:30.528336",{"slug":2920,"name":2920,"fn":2921,"description":2922,"org":2923,"tags":2924,"stars":26,"repoUrl":27,"updatedAt":2930},"browser","automate browser interactions via CLI","Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Supports remote Browserbase sessions with Browserbase Identity, Verified browsers, automatic CAPTCHA solving, and residential proxies — ideal for protected websites and JavaScript-heavy pages.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2925,2926,2927],{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":2928,"slug":2929,"type":15},"CLI","cli","2026-04-06T18:06:22.005051",{"slug":2932,"name":2932,"fn":2933,"description":2934,"org":2935,"tags":2936,"stars":26,"repoUrl":27,"updatedAt":2948},"browser-to-api","generate OpenAPI specs from browser traffic","Turn a website's observable HTTP traffic into a best-effort OpenAPI 3.1 spec by analyzing a `browser-trace` capture. Use when the user wants to discover\u002Fextract API endpoints from a browser session, build an OpenAPI doc from network traffic, or document a third-party site's XHR\u002Ffetch surface for client integration.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2937,2940,2941,2942,2945],{"name":2938,"slug":2939,"type":15},"API Development","api-development",{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":2943,"slug":2944,"type":15},"HTTP","http",{"name":2946,"slug":2947,"type":15},"OpenAPI","openapi","2026-05-14T06:07:27.298495",{"slug":2950,"name":2950,"fn":2951,"description":2952,"org":2953,"tags":2954,"stars":26,"repoUrl":27,"updatedAt":2963},"browser-trace","capture and debug browser automation traces","Capture a full DevTools-protocol trace of any browser automation — CDP firehose, screenshots, and DOM dumps — then bisect the stream into per-page searchable buckets. Use when the user wants to debug a failed run, audit network\u002Fconsole\u002FDOM activity, attach a trace to an in-progress session, or feed structured per-page summaries back into an agent loop so its next iteration learns from the last one.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2955,2956,2957,2960],{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":2958,"slug":2959,"type":15},"Debugging","debugging",{"name":2961,"slug":2962,"type":15},"Observability","observability","2026-04-28T05:41:33.024656",{"slug":4,"name":4,"fn":5,"description":6,"org":2965,"tags":2966,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2967,2968,2969,2970,2971],{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":17,"slug":18,"type":15},{"name":21,"slug":22,"type":15},{"name":13,"slug":14,"type":15},{"slug":2973,"name":2973,"fn":2974,"description":2975,"org":2976,"tags":2977,"stars":26,"repoUrl":27,"updatedAt":2991},"company-research","conduct deep company and product research","Company discovery and deep research skill. Researches a company's product and ICP,\ndiscovers target companies to sell to using Browserbase Search API, deeply researches\neach using a Plan→Research→Synthesize pattern, and scores ICP fit — compiled into\na scored research report and CSV. Supports depth modes (quick\u002Fdeep\u002Fdeeper) for\nbalancing scale vs intelligence.\nUse when the user wants to: (1) find companies to sell to, (2) research potential\ncustomers, (3) discover companies matching an ICP, (4) build a target company list,\n(5) do market research on prospects. Triggers: \"find companies to sell to\",\n\"company research\", \"find prospects\", \"ICP research\", \"target companies\",\n\"who should we sell to\", \"market research\", \"lead research\", \"prospect list\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2978,2979,2982,2985,2988],{"name":9,"slug":8,"type":15},{"name":2980,"slug":2981,"type":15},"Competitive Intelligence","competitive-intelligence",{"name":2983,"slug":2984,"type":15},"Marketing","marketing",{"name":2986,"slug":2987,"type":15},"Research","research",{"name":2989,"slug":2990,"type":15},"Sales","sales","2026-04-27T05:34:56.172569",{"items":2993,"total":2323},[2994,3006,3015,3022,3028,3036,3043,3051,3059,3073,3085,3098],{"slug":2995,"name":2995,"fn":2996,"description":2997,"org":2998,"tags":2999,"stars":3003,"repoUrl":3004,"updatedAt":3005},"browse","run Browserbase browser automation","Use the browse CLI for Browserbase browser automation, Browserbase cloud APIs, Browserbase Functions, templates, web fetch\u002Fsearch, diagnostics, and Browse.sh skill discovery\u002Finstallation. Use when the user asks to navigate pages, inspect browser state, run local or remote browser sessions, manage Browserbase resources, call Browserbase Functions, browse or scaffold Browserbase templates, fetch or search web content, diagnose browse setup, find or install a skill for a website task, discover site-specific Browse.sh skills, or install\u002Frefresh this browse skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3000,3001,3002],{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":2928,"slug":2929,"type":15},23676,"https:\u002F\u002Fgithub.com\u002Fbrowserbase\u002Fstagehand","2026-06-06T07:11:24.95733",{"slug":2884,"name":2884,"fn":2885,"description":2886,"org":3007,"tags":3008,"stars":26,"repoUrl":27,"updatedAt":2905},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3009,3010,3011,3012,3013,3014],{"name":2890,"slug":2891,"type":15},{"name":2893,"slug":2894,"type":15},{"name":9,"slug":8,"type":15},{"name":2897,"slug":2898,"type":15},{"name":2900,"slug":2901,"type":15},{"name":2903,"slug":2904,"type":15},{"slug":2907,"name":2907,"fn":2908,"description":2909,"org":3016,"tags":3017,"stars":26,"repoUrl":27,"updatedAt":2918},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3018,3019,3020,3021],{"name":2890,"slug":2891,"type":15},{"name":2914,"slug":2915,"type":15},{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"slug":2920,"name":2920,"fn":2921,"description":2922,"org":3023,"tags":3024,"stars":26,"repoUrl":27,"updatedAt":2930},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3025,3026,3027],{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":2928,"slug":2929,"type":15},{"slug":2932,"name":2932,"fn":2933,"description":2934,"org":3029,"tags":3030,"stars":26,"repoUrl":27,"updatedAt":2948},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3031,3032,3033,3034,3035],{"name":2938,"slug":2939,"type":15},{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":2943,"slug":2944,"type":15},{"name":2946,"slug":2947,"type":15},{"slug":2950,"name":2950,"fn":2951,"description":2952,"org":3037,"tags":3038,"stars":26,"repoUrl":27,"updatedAt":2963},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3039,3040,3041,3042],{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":2958,"slug":2959,"type":15},{"name":2961,"slug":2962,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":3044,"tags":3045,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3046,3047,3048,3049,3050],{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":17,"slug":18,"type":15},{"name":21,"slug":22,"type":15},{"name":13,"slug":14,"type":15},{"slug":2973,"name":2973,"fn":2974,"description":2975,"org":3052,"tags":3053,"stars":26,"repoUrl":27,"updatedAt":2991},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3054,3055,3056,3057,3058],{"name":9,"slug":8,"type":15},{"name":2980,"slug":2981,"type":15},{"name":2983,"slug":2984,"type":15},{"name":2986,"slug":2987,"type":15},{"name":2989,"slug":2990,"type":15},{"slug":3060,"name":3060,"fn":3061,"description":3062,"org":3063,"tags":3064,"stars":26,"repoUrl":27,"updatedAt":3072},"competitor-analysis","analyze competitors across features and pricing","Competitor research and intelligence skill. Takes a user's company (with optional\nseed competitor URLs), auto-discovers additional competitors via Browserbase Search API,\ndeeply researches each using a 4-lane pattern (marketing surface, external signal,\npublic benchmarks, strategic diff vs the user's company), and compiles the results\ninto an HTML report with four views: overview, per-competitor deep dive, side-by-side\nfeature\u002Fpricing matrix, and a chronological mentions feed (news, reviews,\nsocial, comparison pages, and public benchmarks).\nUse when the user wants to: (1) analyze competitors, (2) build a competitive matrix,\n(3) extract competitor pricing \u002F features, (4) find comparison pages and online\nmentions of competitors, (5) surface public benchmarks. Triggers: \"competitor analysis\",\n\"analyze competitors\", \"competitive intel\", \"competitor research\", \"competitor pricing\",\n\"feature comparison\", \"price comparison\", \"find comparisons\", \"who's comparing us\",\n\"competitor mentions\", \"competitor benchmarks\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3065,3066,3067,3068,3069],{"name":9,"slug":8,"type":15},{"name":2980,"slug":2981,"type":15},{"name":2983,"slug":2984,"type":15},{"name":2986,"slug":2987,"type":15},{"name":3070,"slug":3071,"type":15},"Strategy","strategy","2026-06-19T09:41:33.392499",{"slug":3074,"name":3074,"fn":3075,"description":3076,"org":3077,"tags":3078,"stars":26,"repoUrl":27,"updatedAt":3084},"cookie-sync","sync Chrome cookies to a Browserbase context","Sync cookies from local Chrome to a Browserbase persistent context so the browse CLI can access authenticated sites. Use when the user wants to browse as themselves, sync cookies, or log into sites via Browserbase.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3079,3082,3083],{"name":3080,"slug":3081,"type":15},"Auth","auth",{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:06:23.3251",{"slug":3086,"name":3086,"fn":3087,"description":3088,"org":3089,"tags":3090,"stars":26,"repoUrl":27,"updatedAt":3097},"event-prospecting","research event speakers for sales prospecting","Event prospecting skill. Takes a conference \u002F event speakers URL,\nextracts the people, filters their companies against the user's\nICP, then deep-researches only the speakers at ICP-fit companies.\nOutputs a person-first HTML report where each card answers \"why\nshould the AE talk to this person?\" with all public links and a\none-click DM opener.\nUse when the user wants to: (1) find leads at a specific\nconference, (2) prep for an event, (3) research event speakers,\n(4) build a target list from a sponsor\u002Fexhibitor page,\n(5) scrape conference speakers and rank by ICP fit.\nTriggers: \"find leads at {event}\", \"research speakers at\",\n\"prospect this conference\", \"stripe sessions leads\",\n\"ai engineer summit prospects\", \"event prospecting\",\n\"scrape conference speakers\", \"who should I meet at\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3091,3092,3095,3096],{"name":9,"slug":8,"type":15},{"name":3093,"slug":3094,"type":15},"Prospecting","prospecting",{"name":2986,"slug":2987,"type":15},{"name":2989,"slug":2990,"type":15},"2026-04-28T05:41:31.770467",{"slug":3099,"name":3099,"fn":3100,"description":3101,"org":3102,"tags":3103,"stars":26,"repoUrl":27,"updatedAt":3108},"fetch","fetch URLs without a browser session","Use this skill when the user wants to retrieve a URL without a full browser session: fetch HTML or JSON from static pages, inspect status codes or headers, follow redirects, or get page source for simple scraping. Prefer it over a browser when JavaScript rendering and page interaction are not needed. Supports proxies and redirect control.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3104,3105],{"name":2943,"slug":2944,"type":15},{"name":3106,"slug":3107,"type":15},"Web Scraping","web-scraping","2026-04-06T18:06:19.462477"]