The StagehandTool integrates the Stagehand framework with CrewAI, enabling agents to interact with websites and automate browser tasks using natural language instructions.
The context manager approach is recommended as it ensures proper cleanup of resources even if exceptions occur.
from crewai import Agent, Task, Crewfrom crewai_tools import StagehandToolfrom stagehand.schemas import AvailableModel# Initialize the tool with your API keys using a context managerwith StagehandTool( api_key="your-browserbase-api-key", project_id="your-browserbase-project-id", model_api_key="your-llm-api-key", # OpenAI or Anthropic API key model_name=AvailableModel.CLAUDE_3_7_SONNET_LATEST, # Optional: specify which model to use) as stagehand_tool: # Create an agent with the tool researcher = Agent( role="Web Researcher", goal="Find and summarize information from websites", backstory="I'm an expert at finding information online.", verbose=True, tools=[stagehand_tool], ) # Create a task that uses the tool research_task = Task( description="Go to https://www.example.com and tell me what you see on the homepage.", agent=researcher, ) # Run the crew crew = Crew( agents=[researcher], tasks=[research_task], verbose=True, ) result = crew.kickoff() print(result)
from crewai import Agent, Task, Crewfrom crewai_tools import StagehandToolfrom stagehand.schemas import AvailableModel# Initialize the tool with your API keysstagehand_tool = StagehandTool( api_key="your-browserbase-api-key", project_id="your-browserbase-project-id", model_api_key="your-llm-api-key", model_name=AvailableModel.CLAUDE_3_7_SONNET_LATEST,)try: # Create an agent with the tool researcher = Agent( role="Web Researcher", goal="Find and summarize information from websites", backstory="I'm an expert at finding information online.", verbose=True, tools=[stagehand_tool], ) # Create a task that uses the tool research_task = Task( description="Go to https://www.example.com and tell me what you see on the homepage.", agent=researcher, ) # Run the crew crew = Crew( agents=[researcher], tasks=[research_task], verbose=True, ) result = crew.kickoff() print(result)finally: # Explicitly clean up resources stagehand_tool.close()
The act command type (default) enables webpage interactions like clicking buttons, filling forms, and navigation.
# Perform an action (default behavior)result = stagehand_tool.run( instruction="Click the login button", url="https://example.com", command_type="act" # Default, so can be omitted)# Fill out a formresult = stagehand_tool.run( instruction="Fill the contact form with name 'John Doe', email 'john@example.com', and message 'Hello world'", url="https://example.com/contact")
The extract command type retrieves structured data from webpages.
# Extract all product informationresult = stagehand_tool.run( instruction="Extract all product names, prices, and descriptions", url="https://example.com/products", command_type="extract")# Extract specific information with a selectorresult = stagehand_tool.run( instruction="Extract the main article title and content", url="https://example.com/blog/article", command_type="extract", selector=".article-container" # Optional CSS selector)
The observe command type identifies and analyzes webpage elements.
# Find interactive elementsresult = stagehand_tool.run( instruction="Find all interactive elements in the navigation menu", url="https://example.com", command_type="observe")# Identify form fieldsresult = stagehand_tool.run( instruction="Identify all the input fields in the registration form", url="https://example.com/register", command_type="observe", selector="#registration-form")
Customize the StagehandTool behavior with these parameters:
stagehand_tool = StagehandTool( api_key="your-browserbase-api-key", project_id="your-browserbase-project-id", model_api_key="your-llm-api-key", model_name=AvailableModel.CLAUDE_3_7_SONNET_LATEST, dom_settle_timeout_ms=5000, # Wait longer for DOM to settle headless=True, # Run browser in headless mode self_heal=True, # Attempt to recover from errors wait_for_captcha_solves=True, # Wait for CAPTCHA solving verbose=1, # Control logging verbosity (0-3))
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"CrewAI","colors":{"primary":"#EB6658","light":"#F3A78B","dark":"#C94C3C"},"logo":{"light":"https://mintcdn.com/crewai/5SZbe87tsCWZY09V/images/crew_only_logo.png?fit=max\u0026auto=format\u0026n=5SZbe87tsCWZY09V\u0026q=85\u0026s=439ca5dc63a1768cad7196005ff5636f","dark":"https://mintcdn.com/crewai/5SZbe87tsCWZY09V/images/crew_only_logo.png?fit=max\u0026auto=format\u0026n=5SZbe87tsCWZY09V\u0026q=85\u0026s=439ca5dc63a1768cad7196005ff5636f"},"favicon":"https://mintcdn.com/crewai/sz5CkjPWxVjBAZE7/images/favicon.svg?fit=max\u0026auto=format\u0026n=sz5CkjPWxVjBAZE7\u0026q=85\u0026s=16c03dad58d05417a2e442ff942d2ce7","api":{"playground":{}},"appearance":{"default":"system","strict":false},"background":{"decoration":"grid"},"navbar":{"links":[{"icon":"arrow-up-right-from-square","href":"https://app.crewai.com","label":"Start Cloud Trial"}],"primary":{"type":"github","href":"https://github.com/crewAIInc/crewAI"}},"footer":{"socials":{"website":"https://crewai.com","x":"https://x.com/crewAIInc","github":"https://github.com/crewAIInc/crewAI","linkedin":"https://www.linkedin.com/company/crewai-inc","youtube":"https://youtube.com/@crewAIInc","reddit":"https://www.reddit.com/r/crewAIInc"}},"seo":{"metatags":{"og:type":"website","og:site_name":"CrewAI Documentation","og:image":"https://docs.crewai.com/images/crew_only_logo.png","twitter:card":"summary_large_image","twitter:site":"@crewAIInc","keywords":"AI agents, multi-agent systems, CrewAI, artificial intelligence, automation, Python framework, agent collaboration, AI workflows"}},"fonts":{"family":"Inter"},"errors":{"404":{"redirect":true}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode",{"title":"Request a feature","description":"Join the discussion on GitHub to request a new feature","icon":"plus","href":"https://github.com/crewAIInc/crewAI/issues/new/choose"}],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","href":""},{"language":"pt-BR","href":"edge/pt-BR"},{"language":"ko","href":"edge/ko"},{"language":"ar","href":"edge/ar"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"crewai","hasAudioNarration":false,"actualSubdomain":"crewai","customDomains":["docs.crewai.com"],"gitSource":{"type":"github","owner":"crewaiinc","repo":"crewai","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adf01ab737ceb5e71081551","collectionId":"633b6451-fde0-41b1-97f0-7ab4ef6ab679","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf01ab737ceb5e71081551"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adf01ab737ceb5e71081551","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"en","tag":"Documentation","count":8428},{"language":"ko","tag":"기술 문서","count":7754},{"language":"pt-BR","tag":"Documentação","count":7187},{"language":"ar","tag":"التقنية التوثيق","count":7154},{"language":"en","tag":"Tools","count":3870},{"language":"ko","tag":"도구 (Tools)","count":3579},{"language":"ar","tag":"الأدوات","count":3336},{"language":"pt-BR","tag":"Ferramentas","count":3057},{"language":"en","tag":"Learn","count":1345},{"language":"ko","tag":"학습","count":1199},{"language":"pt-BR","tag":"Aprenda","count":1199},{"language":"ar","tag":"التعلّم","count":1103},{"language":"en","tag":"Core Concepts","count":1019},{"language":"ko","tag":"핵심 개념","count":989},{"language":"pt-BR","tag":"Conceitos-Chave","count":989},{"language":"ar","tag":"المفاهيم الأساسية","count":917},{"language":"en","tag":"Observability","count":864},{"language":"en","tag":"Search \u0026 Research","count":840},{"language":"ko","tag":"Observability","count":816},{"language":"pt-BR","tag":"Observabilidade","count":816},{"language":"en","tag":"Guides","count":808},{"language":"ko","tag":"검색 및 연구","count":804},{"language":"ar","tag":"Observability","count":748},{"language":"ar","tag":"البحث والاستكشاف","count":740},{"language":"en","tag":"Web Scraping \u0026 Browsing","count":708},{"language":"en","tag":"File \u0026 Document","count":672},{"language":"ko","tag":"파일 \u0026 문서","count":672},{"language":"ko","tag":"웹 스크래핑 \u0026 브라우징","count":672},{"language":"pt-BR","tag":"Web Scraping \u0026 Navegação","count":624},{"language":"ar","tag":"الملفات والمستندات","count":616},{"language":"ar","tag":"استخراج بيانات الويب","count":616},{"language":"pt-BR","tag":"Arquivo \u0026 Documento","count":576},{"language":"ko","tag":"가이드","count":567},{"language":"pt-BR","tag":"Guias","count":567},{"language":"ar","tag":"الأدلّة","count":534},{"language":"pt-BR","tag":"Pesquisa","count":480},{"language":"ko","tag":"시작 안내","count":460},{"language":"pt-BR","tag":"Começando","count":460},{"language":"en","tag":"AI \u0026 Machine Learning","count":456},{"language":"ar","tag":"البدء","count":428}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"v1.15.18/en/tools/web-scraping/stagehandtool","slug":"/v1.15.18/en/tools/web-scraping/stagehandtool","pageMetadata":{"title":"Stagehand Tool","description":"Web automation tool that integrates Stagehand with CrewAI for browser interaction and automation","icon":"hand","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/stagehandtool"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Web automation tool that integrates Stagehand with CrewAI for browser interaction and automation\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`StagehandTool`}),` integrates the `,_jsx(_components.a,{href:`https://docs.stagehand.dev/get_started/introduction`,children:`Stagehand`}),` framework with CrewAI, enabling agents to interact with websites and automate browser tasks using natural language instructions.`]}),`\n`,_jsx(Heading,{level:`2`,id:`overview-2`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`Stagehand is a powerful browser automation framework built by Browserbase that allows AI agents to:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Navigate to websites`}),`\n`,_jsx(_components.li,{children:`Click buttons, links, and other elements`}),`\n`,_jsx(_components.li,{children:`Fill in forms`}),`\n`,_jsx(_components.li,{children:`Extract data from web pages`}),`\n`,_jsx(_components.li,{children:`Observe and identify elements`}),`\n`,_jsx(_components.li,{children:`Perform complex workflows`}),`\n`]}),`\n`,_jsx(_components.p,{children:`The StagehandTool wraps the Stagehand Python SDK to provide CrewAI agents with browser control capabilities through three core primitives:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Act`}),`: Perform actions like clicking, typing, or navigating`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Extract`}),`: Extract structured data from web pages`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Observe`}),`: Identify and analyze elements on the page`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Before using this tool, ensure you have:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.a,{href:`https://www.browserbase.com/`,children:`Browserbase`}),` account with API key and project ID`]}),`\n`,_jsx(_components.li,{children:`An API key for an LLM (OpenAI or Anthropic Claude)`}),`\n`,_jsx(_components.li,{children:`The Stagehand Python SDK installed`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Install the required dependency:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` stagehand-py`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`usage`,children:`Usage`}),`\n`,_jsx(Heading,{level:`3`,id:`basic-implementation`,children:`Basic Implementation`}),`\n`,_jsx(_components.p,{children:`The StagehandTool can be implemented in two ways:`}),`\n`,_jsx(Heading,{level:`4`,id:`1-using-context-manager-recommended`,children:`1. Using Context Manager (Recommended)`}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`The context manager approach is recommended as it ensures proper cleanup of resources even if exceptions occur.`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`35`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`35`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crewai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Agent, Task, Crew`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crewai_tools `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` StagehandTool`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand.schemas `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AvailableModel`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Initialize the tool with your API keys using a context manager`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` StagehandTool(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-browserbase-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` project_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-browserbase-project-id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-llm-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# OpenAI or Anthropic API key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AvailableModel.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CLAUDE_3_7_SONNET_LATEST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Optional: specify which model to use`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand_tool:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Create an agent with the tool`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` researcher `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Agent(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Web Researcher\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` goal`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Find and summarize information from websites\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` backstory`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"I'm an expert at finding information online.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` verbose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` tools`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[stagehand_tool],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Create a task that uses the tool`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` research_task `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Task(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` description`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Go to https://www.example.com and tell me what you see on the homepage.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` agent`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`researcher,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Run the crew`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crew `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Crew(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` agents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[researcher],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` tasks`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[research_task],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` verbose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crew.kickoff()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`2-manual-resource-management`,children:`2. Manual Resource Management`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`40`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`40`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crewai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Agent, Task, Crew`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crewai_tools `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` StagehandTool`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand.schemas `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AvailableModel`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Initialize the tool with your API keys`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`stagehand_tool `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` StagehandTool(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-browserbase-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` project_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-browserbase-project-id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-llm-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AvailableModel.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CLAUDE_3_7_SONNET_LATEST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Create an agent with the tool`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` researcher `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Agent(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Web Researcher\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` goal`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Find and summarize information from websites\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` backstory`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"I'm an expert at finding information online.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` verbose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` tools`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[stagehand_tool],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Create a task that uses the tool`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` research_task `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Task(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` description`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Go to https://www.example.com and tell me what you see on the homepage.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` agent`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`researcher,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Run the crew`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crew `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Crew(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` agents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[researcher],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` tasks`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[research_task],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` verbose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crew.kickoff()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`finally`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Explicitly clean up resources`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand_tool.close()`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`command-types`,children:`Command Types`}),`\n`,_jsx(_components.p,{children:`The StagehandTool supports three different command types for specific web automation tasks:`}),`\n`,_jsx(Heading,{level:`3`,id:`1-act-command`,children:`1. Act Command`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`act`}),` command type (default) enables webpage interactions like clicking buttons, filling forms, and navigation.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Perform an action (default behavior)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand_tool.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Click the login button\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` command_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"act\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Default, so can be omitted`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Fill out a form`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand_tool.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Fill the contact form with name 'John Doe', email 'john@example.com', and message 'Hello world'\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/contact\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`2-extract-command`,children:`2. Extract Command`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`extract`}),` command type retrieves structured data from webpages.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Extract all product information`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand_tool.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Extract all product names, prices, and descriptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` command_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"extract\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Extract specific information with a selector`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand_tool.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Extract the main article title and content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/blog/article\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` command_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"extract\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` selector`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\".article-container\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Optional CSS selector`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`3-observe-command`,children:`3. Observe Command`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`observe`}),` command type identifies and analyzes webpage elements.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Find interactive elements`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand_tool.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Find all interactive elements in the navigation menu\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` command_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"observe\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Identify form fields`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stagehand_tool.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` instruction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Identify all the input fields in the registration form\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/register\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` command_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"observe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` selector`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"#registration-form\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-options`,children:`Configuration Options`}),`\n`,_jsx(_components.p,{children:`Customize the StagehandTool behavior with these parameters:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`stagehand_tool `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` StagehandTool(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-browserbase-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` project_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-browserbase-project-id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-llm-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AvailableModel.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CLAUDE_3_7_SONNET_LATEST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` dom_settle_timeout_ms`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Wait longer for DOM to settle`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headless`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Run browser in headless mode`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` self_heal`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Attempt to recover from errors`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` wait_for_captcha_solves`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Wait for CAPTCHA solving`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` verbose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Control logging verbosity (0-3)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Be Specific`}),`: Provide detailed instructions for better results`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Choose Appropriate Command Type`}),`: Select the right command type for your task`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use Selectors`}),`: Leverage CSS selectors to improve accuracy`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Break Down Complex Tasks`}),`: Split complex workflows into multiple tool calls`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Implement Error Handling`}),`: Add error handling for potential issues`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsx(_components.p,{children:`Common issues and solutions:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Session Issues`}),`: Verify API keys for both Browserbase and LLM provider`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Element Not Found`}),`: Increase `,_jsx(_components.code,{children:`dom_settle_timeout_ms`}),` for slower pages`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Action Failures`}),`: Use `,_jsx(_components.code,{children:`observe`}),` to identify correct elements first`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Incomplete Data`}),`: Refine instructions or provide specific selectors`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`additional-resources`,children:`Additional Resources`}),`\n`,_jsx(_components.p,{children:`For questions about the CrewAI integration:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Join Stagehand’s `,_jsx(_components.a,{href:`https://stagehand.dev/slack`,children:`Slack community`})]}),`\n`,_jsxs(_components.li,{children:[`Open an issue in the `,_jsx(_components.a,{href:`https://github.com/browserbase/stagehand`,children:`Stagehand repository`})]}),`\n`,_jsxs(_components.li,{children:[`Visit `,_jsx(_components.a,{href:`https://docs.stagehand.dev/`,children:`Stagehand documentation`})]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Stagehand Tool","description":"Web automation tool that integrates Stagehand with CrewAI for browser interaction and automation","icon":"hand","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/stagehandtool"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":1,"children":[]},{"title":"Overview","slug":"overview-2","depth":2,"children":[]},{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Usage","slug":"usage","depth":2,"children":[{"title":"Basic Implementation","slug":"basic-implementation","depth":3,"children":[]},{"title":"1. Using Context Manager (Recommended)","slug":"1-using-context-manager-recommended","depth":4,"children":[]},{"title":"2. Manual Resource Management","slug":"2-manual-resource-management","depth":4,"children":[]}]},{"title":"Command Types","slug":"command-types","depth":2,"children":[{"title":"1. Act Command","slug":"1-act-command","depth":3,"children":[]},{"title":"2. Extract Command","slug":"2-extract-command","depth":3,"children":[]},{"title":"3. Observe Command","slug":"3-observe-command","depth":3,"children":[]}]},{"title":"Configuration Options","slug":"configuration-options","depth":2,"children":[]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Additional Resources","slug":"additional-resources","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/crewai/cc0a0a5c2c93f4d8/common-room-tracking.js","/_mintlify/custom/crewai/36c44d75a9111b06/reo-tracking.js"],"subdomain":"crewai","siteName":"CrewAI","title":"Stagehand Tool - CrewAI","navMaps":{"firstHrefInVersion":{"Edge":{"href":"/edge/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.30":{"href":"/v1.15.30/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.29":{"href":"/v1.15.29/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.28":{"href":"/v1.15.28/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.27":{"href":"/v1.15.27/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.26":{"href":"/v1.15.26/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.25":{"href":"/v1.15.25/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.24":{"href":"/v1.15.24/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.23":{"href":"/v1.15.23/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.22":{"href":"/v1.15.22/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.21":{"href":"/v1.15.21/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.20":{"href":"/v1.15.20/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.19":{"href":"/v1.15.19/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.18":{"href":"/v1.15.18/en/tools/web-scraping/stagehandtool","matchLevel":0},"v1.15.17":{"href":"/v1.15.17/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.16":{"href":"/v1.15.16/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.15":{"href":"/v1.15.15/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.14":{"href":"/v1.15.14/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.13":{"href":"/v1.15.13/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.12":{"href":"/v1.15.12/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.11":{"href":"/v1.15.11/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.10":{"href":"/v1.15.10/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.9":{"href":"/v1.15.9/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.8":{"href":"/v1.15.8/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.7":{"href":"/v1.15.7/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.6":{"href":"/v1.15.6/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.5":{"href":"/v1.15.5/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.4":{"href":"/v1.15.4/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.3":{"href":"/v1.15.3/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.2":{"href":"/v1.15.2/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.1":{"href":"/v1.15.1/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.15.0":{"href":"/v1.15.0/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.14.7":{"href":"/v1.14.7/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.14.6":{"href":"/v1.14.6/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.14.5":{"href":"/v1.14.5/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.14.4":{"href":"/v1.14.4/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.14.3":{"href":"/v1.14.3/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.14.2":{"href":"/v1.14.2/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.14.1":{"href":"/v1.14.1/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.14.0":{"href":"/v1.14.0/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.13.0":{"href":"/v1.13.0/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.12.2":{"href":"/v1.12.2/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.12.1":{"href":"/v1.12.1/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.12.0":{"href":"/v1.12.0/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.11.1":{"href":"/v1.11.1/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.11.0":{"href":"/v1.11.0/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.10.1":{"href":"/v1.10.1/en/tools/web-scraping/stagehandtool","matchLevel":1},"v1.10.0":{"href":"/v1.10.0/en/tools/web-scraping/stagehandtool","matchLevel":1}},"firstHrefInLanguage":{"en":{"href":"/v1.15.18/en/tools/web-scraping/stagehandtool","matchLevel":0},"pt-BR":{"href":"/v1.15.18/pt-BR/tools/web-scraping/stagehandtool","matchLevel":1},"ko":{"href":"/v1.15.18/ko/tools/web-scraping/stagehandtool","matchLevel":1},"ar":{"href":"/v1.15.18/ar/tools/web-scraping/stagehandtool","matchLevel":1}}},"lastModified":"2026-08-27T18:39:00.301Z","originalFileLocation":"v1.15.18/en/tools/web-scraping/stagehandtool.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Web automation tool that integrates Stagehand with CrewAI for browser interaction and automation\">\u003cmeta data-mint-head name=\"keywords\" content=\"AI agents, multi-agent systems, CrewAI, artificial intelligence, automation, Python framework, agent collaboration, AI workflows\">\u003cmeta data-mint-head name=\"application-name\" content=\"CrewAI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Stagehand Tool - CrewAI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Web automation tool that integrates Stagehand with CrewAI for browser interaction and automation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"CrewAI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.crewai.com/images/crew_only_logo.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Stagehand Tool - CrewAI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Web automation tool that integrates Stagehand with CrewAI for browser interaction and automation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.crewai.com/images/crew_only_logo.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/crewai/4u_yrBmnBvL-de5g/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"CrewAI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EB6658\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v1.15.18/en/tools/web-scraping/stagehandtool.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://docs.crewai.com/v1.15.18/pt-BR/tools/web-scraping/stagehandtool\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.crewai.com/v1.15.18/ko/tools/web-scraping/stagehandtool\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://docs.crewai.com/v1.15.18/ar/tools/web-scraping/stagehandtool\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.crewai.com/#organization\",\"name\":\"CrewAI\",\"url\":\"https://docs.crewai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/crewai/5SZbe87tsCWZY09V/images/crew_only_logo.png?fit=max\u0026auto=format\u0026n=5SZbe87tsCWZY09V\u0026q=85\u0026s=439ca5dc63a1768cad7196005ff5636f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.crewai.com#website\",\"name\":\"CrewAI\",\"url\":\"https://docs.crewai.com\",\"publisher\":{\"@id\":\"https://docs.crewai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool#webpage\",\"url\":\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool\",\"name\":\"Stagehand Tool\",\"description\":\"Web automation tool that integrates Stagehand with CrewAI for browser interaction and automation\",\"dateModified\":\"2026-08-27T18:39:00.301Z\",\"isPartOf\":{\"@id\":\"https://docs.crewai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tools\",\"item\":\"https://docs.crewai.com/v1.15.18/en/tools/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Scraping \u0026 Browsing\",\"item\":\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Stagehand Tool\",\"item\":\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool#article\",\"headline\":\"Stagehand Tool\",\"name\":\"Stagehand Tool\",\"description\":\"Web automation tool that integrates Stagehand with CrewAI for browser interaction and automation\",\"url\":\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool\",\"mainEntityOfPage\":{\"@id\":\"https://docs.crewai.com/v1.15.18/en/tools/web-scraping/stagehandtool#webpage\"},\"image\":\"https://docs.crewai.com/images/crew_only_logo.png\",\"dateModified\":\"2026-08-27T18:39:00.301Z\",\"publisher\":{\"@id\":\"https://docs.crewai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.crewai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"CrewAI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"CrewAI","nav":{"global":null,"languages":[{"language":"en","versions":[{"version":"Edge","tag":"Edge","pages":[{"title":"Edge","href":"/edge/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.30","default":true,"tag":"Latest","pages":[{"title":"v1.15.30","href":"/v1.15.30/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.29","pages":[{"title":"v1.15.29","href":"/v1.15.29/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.28","pages":[{"title":"v1.15.28","href":"/v1.15.28/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.27","pages":[{"title":"v1.15.27","href":"/v1.15.27/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.26","pages":[{"title":"v1.15.26","href":"/v1.15.26/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.25","pages":[{"title":"v1.15.25","href":"/v1.15.25/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.24","pages":[{"title":"v1.15.24","href":"/v1.15.24/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.23","pages":[{"title":"v1.15.23","href":"/v1.15.23/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.22","pages":[{"title":"v1.15.22","href":"/v1.15.22/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.21","pages":[{"title":"v1.15.21","href":"/v1.15.21/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.20","pages":[{"title":"v1.15.20","href":"/v1.15.20/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.19","pages":[{"title":"v1.15.19","href":"/v1.15.19/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.18","tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":""}]},{"tab":"Documentation","icon":"book-open","groups":[{"group":"Get Started","pages":[{"title":"Introduction","icon":"handshake","mode":"wide","href":"/v1.15.18/en/introduction"},{"title":"Build with AI","icon":"robot","mode":"wide","href":"/v1.15.18/en/guides/coding-tools/build-with-ai"},{"title":"Skills","icon":"wand-magic-sparkles","mode":"wide","href":"/v1.15.18/en/skills"},{"title":"Installation","icon":"wrench","mode":"wide","href":"/v1.15.18/en/installation"},{"title":"Quickstart","icon":"rocket","mode":"wide","href":"/v1.15.18/en/quickstart"}]},{"group":"Guides","pages":[{"group":"Strategy","icon":"compass","pages":[{"title":"Evaluating Use Cases for CrewAI","icon":"scale-balanced","mode":"wide","href":"/v1.15.18/en/guides/concepts/evaluating-use-cases"}]},{"group":"Agents","icon":"user","pages":[{"title":"Crafting Effective Agents","icon":"robot","mode":"wide","href":"/v1.15.18/en/guides/agents/crafting-effective-agents"}]},{"group":"Crews","icon":"users","pages":[{"title":"Build Your First Crew","icon":"users-gear","mode":"wide","href":"/v1.15.18/en/guides/crews/first-crew"}]},{"group":"Flows","icon":"code-branch","pages":[{"title":"Build Your First Flow","icon":"diagram-project","mode":"wide","href":"/v1.15.18/en/guides/flows/first-flow"},{"title":"Mastering Flow State Management","icon":"diagram-project","mode":"wide","href":"/v1.15.18/en/guides/flows/mastering-flow-state"},{"title":"Conversational Flows","icon":"comments","mode":"wide","href":"/v1.15.18/en/guides/flows/conversational-flows"},{"title":"Migrating from inputs.id to restore_from_state_id","icon":"arrow-right-arrow-left","href":"/v1.15.18/en/guides/flows/inputs-id-deprecation"}]},{"group":"Frontend","icon":"browser","pages":[{"title":"Frontend Overview","icon":"browser","mode":"wide","href":"/v1.15.18/en/guides/frontend/overview"},{"title":"Conversational Flows","icon":"comments","mode":"wide","href":"/v1.15.18/en/guides/frontend/conversational-flows"},{"title":"Generative UI","icon":"wand-magic-sparkles","mode":"wide","href":"/v1.15.18/en/guides/frontend/generative-ui"},{"title":"Tool-Based Generative UI","icon":"puzzle-piece","mode":"wide","href":"/v1.15.18/en/guides/frontend/tool-based-generative-ui"},{"title":"Agentic Generative UI","icon":"list-check","mode":"wide","href":"/v1.15.18/en/guides/frontend/agentic-generative-ui"},{"title":"Reasoning","icon":"brain","mode":"wide","href":"/v1.15.18/en/guides/frontend/reasoning"},{"title":"A2UI","icon":"table-cells","mode":"wide","href":"/v1.15.18/en/guides/frontend/a2ui"},{"title":"Human-in-the-Loop","icon":"user-check","mode":"wide","href":"/v1.15.18/en/guides/frontend/human-in-the-loop"},{"title":"Shared State","icon":"arrows-rotate","mode":"wide","href":"/v1.15.18/en/guides/frontend/shared-state"},{"title":"Frontend Actions","icon":"bolt","mode":"wide","href":"/v1.15.18/en/guides/frontend/frontend-actions"},{"title":"Predictive State Updates","icon":"gauge-high","mode":"wide","href":"/v1.15.18/en/guides/frontend/predictive-state-updates"},{"title":"Channels","icon":"slack","mode":"wide","href":"/v1.15.18/en/guides/frontend/channels"}]},{"group":"Tools","icon":"wrench","pages":[{"title":"Publish Custom Tools","icon":"box-open","mode":"wide","href":"/v1.15.18/en/guides/tools/publish-custom-tools"}]},{"group":"Coding Tools","icon":"terminal","pages":[{"title":"Coding Tools","icon":"terminal","mode":"wide","href":"/v1.15.18/en/guides/coding-tools/agents-md"},{"title":"Build with AI","icon":"robot","mode":"wide","href":"/v1.15.18/en/guides/coding-tools/build-with-ai"}]},{"group":"Advanced","icon":"gear","pages":[{"title":"Customizing Prompts","icon":"message-pen","mode":"wide","href":"/v1.15.18/en/guides/advanced/customizing-prompts"},{"title":"Fingerprinting","icon":"fingerprint","mode":"wide","href":"/v1.15.18/en/guides/advanced/fingerprinting"}]},{"group":"Migration","icon":"shuffle","pages":[{"title":"Moving from LangGraph to CrewAI: A Practical Guide for Engineers","icon":"switch","mode":"wide","href":"/v1.15.18/en/guides/migration/migrating-from-langgraph"},{"title":"Upgrading CrewAI","icon":"arrow-up-circle","href":"/v1.15.18/en/guides/migration/upgrading-crewai"}]}]},{"group":"Core Concepts","pages":[{"title":"Agents","icon":"robot","mode":"wide","href":"/v1.15.18/en/concepts/agents"},{"title":"Agent Capabilities","icon":"puzzle-piece","mode":"wide","href":"/v1.15.18/en/concepts/agent-capabilities"},{"title":"Tasks","icon":"list-check","mode":"wide","href":"/v1.15.18/en/concepts/tasks"},{"title":"Crews","icon":"people-group","mode":"wide","href":"/v1.15.18/en/concepts/crews"},{"title":"Flows","icon":"arrow-progress","mode":"wide","href":"/v1.15.18/en/concepts/flows"},{"title":"Streaming","icon":"radio","mode":"wide","href":"/v1.15.18/en/concepts/streaming"},{"title":"Production Architecture","icon":"server","mode":"wide","href":"/v1.15.18/en/concepts/production-architecture"},{"title":"Knowledge","icon":"book","mode":"wide","href":"/v1.15.18/en/concepts/knowledge"},{"title":"Skills","icon":"bolt","mode":"wide","href":"/v1.15.18/en/concepts/skills"},{"title":"LLMs","icon":"microchip-ai","mode":"wide","href":"/v1.15.18/en/concepts/llms"},{"title":"Files","icon":"file-image","href":"/v1.15.18/en/concepts/files"},{"title":"Processes","icon":"bars-staggered","mode":"wide","href":"/v1.15.18/en/concepts/processes"},{"title":"Collaboration","icon":"screen-users","mode":"wide","href":"/v1.15.18/en/concepts/collaboration"},{"title":"Training","icon":"dumbbell","mode":"wide","href":"/v1.15.18/en/concepts/training"},{"title":"Memory","icon":"database","mode":"wide","href":"/v1.15.18/en/concepts/memory"},{"title":"Reasoning","icon":"brain","mode":"wide","href":"/v1.15.18/en/concepts/reasoning"},{"title":"Planning","icon":"ruler-combined","mode":"wide","href":"/v1.15.18/en/concepts/planning"},{"title":"Testing","icon":"vial","mode":"wide","href":"/v1.15.18/en/concepts/testing"},{"title":"CLI","icon":"terminal","mode":"wide","href":"/v1.15.18/en/concepts/cli"},{"title":"Tools","icon":"screwdriver-wrench","mode":"wide","href":"/v1.15.18/en/concepts/tools"},{"title":"Event Listeners","icon":"spinner","mode":"wide","href":"/v1.15.18/en/concepts/event-listener"},{"title":"Checkpointing","icon":"floppy-disk","mode":"wide","href":"/v1.15.18/en/concepts/checkpointing"}]},{"group":"MCP Integration","pages":[{"title":"MCP Servers as Tools in CrewAI","icon":"plug","mode":"wide","href":"/v1.15.18/en/mcp/overview"},{"title":"MCP DSL Integration","icon":"code","mode":"wide","href":"/v1.15.18/en/mcp/dsl-integration"},{"title":"Stdio Transport","icon":"server","mode":"wide","href":"/v1.15.18/en/mcp/stdio"},{"title":"SSE Transport","icon":"wifi","mode":"wide","href":"/v1.15.18/en/mcp/sse"},{"title":"Streamable HTTP Transport","icon":"globe","mode":"wide","href":"/v1.15.18/en/mcp/streamable-http"},{"title":"Connecting to Multiple MCP Servers","icon":"layer-group","mode":"wide","href":"/v1.15.18/en/mcp/multiple-servers"},{"title":"MCP Security Considerations","icon":"lock","mode":"wide","href":"/v1.15.18/en/mcp/security"}]},{"group":"Tools","pages":[{"title":"Tools Overview","icon":"toolbox","mode":"wide","href":"/v1.15.18/en/tools/overview"},{"group":"File \u0026 Document","icon":"folder-open","pages":[{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/tools/file-document/overview"},{"title":"File Read","icon":"folders","mode":"wide","href":"/v1.15.18/en/tools/file-document/filereadtool"},{"title":"File Write","icon":"file-pen","mode":"wide","href":"/v1.15.18/en/tools/file-document/filewritetool"},{"title":"PDF RAG Search","icon":"file-pdf","mode":"wide","href":"/v1.15.18/en/tools/file-document/pdfsearchtool"},{"title":"DOCX RAG Search","icon":"file-word","mode":"wide","href":"/v1.15.18/en/tools/file-document/docxsearchtool"},{"title":"MDX RAG Search","icon":"markdown","mode":"wide","href":"/v1.15.18/en/tools/file-document/mdxsearchtool"},{"title":"XML RAG Search","icon":"file-xml","mode":"wide","href":"/v1.15.18/en/tools/file-document/xmlsearchtool"},{"title":"TXT RAG Search","icon":"file-lines","mode":"wide","href":"/v1.15.18/en/tools/file-document/txtsearchtool"},{"title":"JSON RAG Search","icon":"file-code","mode":"wide","href":"/v1.15.18/en/tools/file-document/jsonsearchtool"},{"title":"CSV RAG Search","icon":"file-csv","mode":"wide","href":"/v1.15.18/en/tools/file-document/csvsearchtool"},{"title":"Directory RAG Search","icon":"address-book","mode":"wide","href":"/v1.15.18/en/tools/file-document/directorysearchtool"},{"title":"Directory Read","icon":"folder-tree","mode":"wide","href":"/v1.15.18/en/tools/file-document/directoryreadtool"},{"title":"OCR Tool","icon":"image","mode":"wide","href":"/v1.15.18/en/tools/file-document/ocrtool"},{"title":"PDF Text Writing Tool","icon":"file-pdf","mode":"wide","href":"/v1.15.18/en/tools/file-document/pdf-text-writing-tool"}]},{"group":"Web Scraping \u0026 Browsing","icon":"globe","pages":[{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/overview"},{"title":"Scrape Website","icon":"magnifying-glass-location","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/scrapewebsitetool"},{"title":"Scrape Element From Website Tool","icon":"code","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/scrapeelementfromwebsitetool"},{"title":"Scrapfly Scrape Website Tool","icon":"spider","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/scrapflyscrapetool"},{"title":"Selenium Scraper","icon":"clipboard-user","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/seleniumscrapingtool"},{"title":"Scrapegraph Scrape Tool","icon":"chart-area","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/scrapegraphscrapetool"},{"title":"Spider Scraper","icon":"spider-web","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/spidertool"},{"title":"Browserbase Web Loader","icon":"browser","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/browserbaseloadtool"},{"title":"Hyperbrowser Load Tool","description":"The `HyperbrowserLoadTool` enables web scraping and crawling using Hyperbrowser.","icon":"globe","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/hyperbrowserloadtool"},{"title":"Stagehand Tool","icon":"hand","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/stagehandtool"},{"title":"Firecrawl Crawl Website","description":"The `FirecrawlCrawlWebsiteTool` is designed to crawl and convert websites into clean markdown or structured data.","icon":"fire-flame","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/firecrawlcrawlwebsitetool"},{"title":"Firecrawl Scrape Website","icon":"fire-flame","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/firecrawlscrapewebsitetool"},{"title":"Oxylabs Scrapers","icon":"globe","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/oxylabsscraperstool"},{"title":"Bright Data Tools","icon":"spider","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/brightdata-tools"},{"title":"You.com Content Extraction Tool","icon":"globe","mode":"wide","href":"/v1.15.18/en/tools/web-scraping/youai-contents"}]},{"group":"Search \u0026 Research","icon":"magnifying-glass","pages":[{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/tools/search-research/overview"},{"title":"Google Serper Search","icon":"google","mode":"wide","href":"/v1.15.18/en/tools/search-research/serperdevtool"},{"title":"Brave Search Tools","icon":"searchengin","mode":"wide","href":"/v1.15.18/en/tools/search-research/bravesearchtool"},{"title":"Exa Search Tool","icon":"magnifying-glass","mode":"wide","href":"/v1.15.18/en/tools/search-research/exasearchtool"},{"title":"Linkup Search Tool","icon":"link","mode":"wide","href":"/v1.15.18/en/tools/search-research/linkupsearchtool"},{"title":"Github Search","icon":"github","mode":"wide","href":"/v1.15.18/en/tools/search-research/githubsearchtool"},{"title":"Website RAG Search","icon":"globe-stand","mode":"wide","href":"/v1.15.18/en/tools/search-research/websitesearchtool"},{"title":"Code Docs RAG Search","icon":"code","mode":"wide","href":"/v1.15.18/en/tools/search-research/codedocssearchtool"},{"title":"YouTube Channel RAG Search","icon":"youtube","mode":"wide","href":"/v1.15.18/en/tools/search-research/youtubechannelsearchtool"},{"title":"YouTube Video RAG Search","icon":"youtube","mode":"wide","href":"/v1.15.18/en/tools/search-research/youtubevideosearchtool"},{"title":"Tavily Search Tool","icon":"magnifying-glass","mode":"wide","href":"/v1.15.18/en/tools/search-research/tavilysearchtool"},{"title":"Tavily Extractor Tool","icon":"square-poll-horizontal","mode":"wide","href":"/v1.15.18/en/tools/search-research/tavilyextractortool"},{"title":"Tavily Research Tool","icon":"flask","mode":"wide","href":"/v1.15.18/en/tools/search-research/tavilyresearchtool"},{"title":"Arxiv Paper Tool","icon":"box-archive","mode":"wide","href":"/v1.15.18/en/tools/search-research/arxivpapertool"},{"title":"SerpApi Google Search Tool","icon":"google","mode":"wide","href":"/v1.15.18/en/tools/search-research/serpapi-googlesearchtool"},{"title":"SerpApi Google Shopping Tool","icon":"cart-shopping","mode":"wide","href":"/v1.15.18/en/tools/search-research/serpapi-googleshoppingtool"},{"title":"Databricks SQL Query Tool","icon":"trowel-bricks","mode":"wide","href":"/v1.15.18/en/tools/search-research/databricks-query-tool"},{"title":"You.com Search \u0026 Research Tools","icon":"magnifying-glass","mode":"wide","href":"/v1.15.18/en/tools/search-research/youai-search"}]},{"group":"Database \u0026 Data","icon":"database","pages":[{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/tools/database-data/overview"},{"title":"MySQL RAG Search","icon":"database","mode":"wide","href":"/v1.15.18/en/tools/database-data/mysqltool"},{"title":"PG RAG Search","icon":"elephant","mode":"wide","href":"/v1.15.18/en/tools/database-data/pgsearchtool"},{"title":"Snowflake Search Tool","icon":"snowflake","mode":"wide","href":"/v1.15.18/en/tools/database-data/snowflakesearchtool"},{"title":"NL2SQL Tool","icon":"language","mode":"wide","href":"/v1.15.18/en/tools/database-data/nl2sqltool"},{"title":"Qdrant Vector Search Tool","icon":"vector-square","mode":"wide","href":"/v1.15.18/en/tools/database-data/qdrantvectorsearchtool"},{"title":"Weaviate Vector Search","icon":"network-wired","mode":"wide","href":"/v1.15.18/en/tools/database-data/weaviatevectorsearchtool"},{"title":"MongoDB Vector Search Tool","icon":"leaf","mode":"wide","href":"/v1.15.18/en/tools/database-data/mongodbvectorsearchtool"},{"title":"SingleStore Search Tool","icon":"circle","mode":"wide","href":"/v1.15.18/en/tools/database-data/singlestoresearchtool"},{"title":"Db2 Vector Search Tool","icon":"database","mode":"wide","href":"/v1.15.18/en/tools/database-data/db2searchtool"}]},{"group":"AI \u0026 Machine Learning","icon":"brain","pages":[{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/overview"},{"title":"DALL-E Tool","icon":"image","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/dalletool"},{"title":"Vision Tool","icon":"eye","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/visiontool"},{"title":"AI Mind Tool","icon":"brain","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/aimindtool"},{"title":"LlamaIndex Tool","icon":"address-book","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/llamaindextool"},{"title":"LangChain Tool","icon":"link","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/langchaintool"},{"title":"RAG Tool","icon":"vector-square","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/ragtool"},{"title":"Code Interpreter","icon":"code-simple","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/codeinterpretertool"},{"title":"Daytona Sandbox Tools","icon":"box","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/daytona"},{"title":"E2B Sandbox Tools","icon":"box","mode":"wide","href":"/v1.15.18/en/tools/ai-ml/e2bsandboxtools"}]},{"group":"Cloud \u0026 Storage","icon":"cloud","pages":[{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/tools/cloud-storage/overview"},{"title":"S3 Reader Tool","icon":"aws","mode":"wide","href":"/v1.15.18/en/tools/cloud-storage/s3readertool"},{"title":"S3 Writer Tool","icon":"aws","mode":"wide","href":"/v1.15.18/en/tools/cloud-storage/s3writertool"},{"title":"Bedrock Knowledge Base Retriever","icon":"aws","mode":"wide","href":"/v1.15.18/en/tools/cloud-storage/bedrockkbretriever"}]},{"group":"Integrations","icon":"plug","pages":[{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/tools/integration/overview"},{"title":"Bedrock Invoke Agent Tool","icon":"aws","mode":"wide","href":"/v1.15.18/en/tools/integration/bedrockinvokeagenttool"},{"title":"CrewAI Run Automation Tool","icon":"robot","href":"/v1.15.18/en/tools/integration/crewaiautomationtool"},{"title":"Merge Agent Handler Tool","icon":"diagram-project","mode":"wide","href":"/v1.15.18/en/tools/integration/mergeagenthandlertool"}]},{"group":"Automation","icon":"bolt","pages":[{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/tools/automation/overview"},{"title":"Apify Actors","icon":"); -webkit-mask-image: url('https://upload.wikimedia.org/wikipedia/commons/a/ae/Apify.svg');/*","mode":"wide","href":"/v1.15.18/en/tools/automation/apifyactorstool"},{"title":"Composio Tool","icon":"gear-code","mode":"wide","href":"/v1.15.18/en/tools/automation/composiotool"},{"title":"MultiOn Tool","icon":"globe","mode":"wide","href":"/v1.15.18/en/tools/automation/multiontool"},{"title":"Wait Tool","icon":"hourglass-half","mode":"wide","href":"/v1.15.18/en/tools/automation/waittool"},{"title":"Zapier Actions Tool","icon":"bolt","mode":"wide","href":"/v1.15.18/en/tools/automation/zapieractionstool"}]}]},{"group":"Observability","pages":[{"title":"CrewAI Tracing","icon":"magnifying-glass-chart","mode":"wide","href":"/v1.15.18/en/observability/tracing"},{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/observability/overview"},{"title":"Arize Phoenix","icon":"magnifying-glass-chart","mode":"wide","href":"/v1.15.18/en/observability/arize-phoenix"},{"title":"Braintrust","icon":"magnifying-glass-chart","mode":"wide","href":"/v1.15.18/en/observability/braintrust"},{"title":"Datadog Integration","icon":"dog","mode":"wide","href":"/v1.15.18/en/observability/datadog"},{"title":"Galileo","icon":"telescope","mode":"wide","href":"/v1.15.18/en/observability/galileo"},{"title":"LangDB Integration","icon":"database","mode":"wide","href":"/v1.15.18/en/observability/langdb"},{"title":"Langfuse Integration","icon":"vials","mode":"wide","href":"/v1.15.18/en/observability/langfuse"},{"title":"Langtrace Integration","icon":"chart-line","mode":"wide","href":"/v1.15.18/en/observability/langtrace"},{"title":"Maxim Integration","icon":"infinity","mode":"wide","href":"/v1.15.18/en/observability/maxim"},{"title":"MLflow Integration","icon":"bars-staggered","mode":"wide","href":"/v1.15.18/en/observability/mlflow"},{"title":"Neatlogs Integration","icon":"magnifying-glass-chart","mode":"wide","href":"/v1.15.18/en/observability/neatlogs"},{"title":"OpenLIT Integration","icon":"magnifying-glass-chart","mode":"wide","href":"/v1.15.18/en/observability/openlit"},{"title":"Opik Integration","icon":"meteor","mode":"wide","href":"/v1.15.18/en/observability/opik"},{"title":"Patronus AI Evaluation","icon":"shield-check","mode":"wide","href":"/v1.15.18/en/observability/patronus-evaluation"},{"title":"Portkey Integration","icon":"key","mode":"wide","href":"/v1.15.18/en/observability/portkey"},{"title":"Weave Integration","icon":"radar","mode":"wide","href":"/v1.15.18/en/observability/weave"},{"title":"TrueFoundry Integration","icon":"chart-line","mode":"wide","href":"/v1.15.18/en/observability/truefoundry"}]},{"group":"Learn","pages":[{"title":"Overview","icon":"face-smile","mode":"wide","href":"/v1.15.18/en/learn/overview"},{"title":"Strategic LLM Selection Guide","icon":"brain-circuit","mode":"wide","href":"/v1.15.18/en/learn/llm-selection-guide"},{"title":"Conditional Tasks","icon":"diagram-subtask","mode":"wide","href":"/v1.15.18/en/learn/conditional-tasks"},{"title":"Coding Agents","icon":"rectangle-code","mode":"wide","href":"/v1.15.18/en/learn/coding-agents"},{"title":"Create Custom Tools","icon":"hammer","mode":"wide","href":"/v1.15.18/en/learn/create-custom-tools"},{"title":"Custom LLM Implementation","icon":"code","mode":"wide","href":"/v1.15.18/en/learn/custom-llm"},{"title":"Custom Manager Agent","icon":"user-shield","mode":"wide","href":"/v1.15.18/en/learn/custom-manager-agent"},{"title":"Customize Agents","icon":"user-pen","mode":"wide","href":"/v1.15.18/en/learn/customizing-agents"},{"title":"Image Generation with DALL-E","icon":"image","mode":"wide","href":"/v1.15.18/en/learn/dalle-image-generation"},{"title":"Force Tool Output as Result","icon":"wrench-simple","mode":"wide","href":"/v1.15.18/en/learn/force-tool-output-as-result"},{"title":"Hierarchical Process","icon":"sitemap","mode":"wide","href":"/v1.15.18/en/learn/hierarchical-process"},{"title":"Human Input on Execution","icon":"user-plus","mode":"wide","href":"/v1.15.18/en/learn/human-input-on-execution"},{"title":"Human-in-the-Loop (HITL) Workflows","icon":"user-check","mode":"wide","href":"/v1.15.18/en/learn/human-in-the-loop"},{"title":"Human Feedback in Flows","icon":"user-check","mode":"wide","href":"/v1.15.18/en/learn/human-feedback-in-flows"},{"title":"Kickoff Crew Asynchronously","icon":"rocket-launch","mode":"wide","href":"/v1.15.18/en/learn/kickoff-async"},{"title":"Kickoff Crew for Each","icon":"at","mode":"wide","href":"/v1.15.18/en/learn/kickoff-for-each"},{"title":"Streaming Runtime Contract","icon":"tower-broadcast","mode":"wide","href":"/v1.15.18/en/learn/streaming-runtime-contract"},{"title":"Consuming Streams","icon":"square-terminal","mode":"wide","href":"/v1.15.18/en/learn/consuming-streams"},{"title":"Connect to any LLM","icon":"brain-circuit","mode":"wide","href":"/v1.15.18/en/learn/llm-connections"},{"title":"Using CrewAI Without LiteLLM","icon":"shield-check","mode":"wide","href":"/v1.15.18/en/learn/litellm-removal-guide"},{"title":"Using Multimodal Agents","icon":"video","mode":"wide","href":"/v1.15.18/en/learn/multimodal-agents"},{"title":"Replay Tasks from Latest Crew Kickoff","icon":"arrow-right","mode":"wide","href":"/v1.15.18/en/learn/replay-tasks-from-latest-crew-kickoff"},{"title":"Sequential Processes","icon":"forward","mode":"wide","href":"/v1.15.18/en/learn/sequential-process"},{"title":"Using Annotations in crew.py","icon":"at","mode":"wide","href":"/v1.15.18/en/learn/using-annotations"},{"group":"Execution Hooks","pages":[{"title":"Execution Hooks","mode":"wide","href":"/v1.15.18/en/learn/execution-hooks"},{"title":"LLM Call Hooks","mode":"wide","href":"/v1.15.18/en/learn/llm-hooks"},{"title":"Tool Call Hooks","mode":"wide","href":"/v1.15.18/en/learn/tool-hooks"},{"title":"Execution Boundary Hooks","mode":"wide","href":"/v1.15.18/en/learn/execution-boundary-hooks"},{"title":"Step Hooks","mode":"wide","href":"/v1.15.18/en/learn/step-hooks"},{"title":"Before and After Kickoff Hooks","mode":"wide","href":"/v1.15.18/en/learn/before-and-after-kickoff-hooks"}]}]},{"group":"Telemetry","pages":[{"title":"Telemetry","icon":"signal-stream","mode":"wide","href":"/v1.15.18/en/telemetry"}]}]},{"tab":"AMP","icon":"briefcase","href":"https://docs-platform.crewai.com/platform/en/introduction"},{"tab":"API Reference","icon":"magnifying-glass","pages":[{"title":"API Reference","href":"/v1.15.18/en/api-reference/introduction"}]},{"tab":"Examples","icon":"code","pages":[{"title":"Examples","href":"/v1.15.18/en/examples/example"}]},{"tab":"Changelog","icon":"clock","pages":[{"title":"Changelog","href":"/v1.15.18/en/changelog"}]}]},{"version":"v1.15.17","pages":[{"title":"v1.15.17","href":"/v1.15.17/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.16","pages":[{"title":"v1.15.16","href":"/v1.15.16/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.15","pages":[{"title":"v1.15.15","href":"/v1.15.15/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.14","pages":[{"title":"v1.15.14","href":"/v1.15.14/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.13","pages":[{"title":"v1.15.13","href":"/v1.15.13/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.12","pages":[{"title":"v1.15.12","href":"/v1.15.12/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.11","pages":[{"title":"v1.15.11","href":"/v1.15.11/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.10","pages":[{"title":"v1.15.10","href":"/v1.15.10/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.9","pages":[{"title":"v1.15.9","href":"/v1.15.9/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.8","pages":[{"title":"v1.15.8","href":"/v1.15.8/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.7","pages":[{"title":"v1.15.7","href":"/v1.15.7/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.6","pages":[{"title":"v1.15.6","href":"/v1.15.6/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.5","pages":[{"title":"v1.15.5","href":"/v1.15.5/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.4","pages":[{"title":"v1.15.4","href":"/v1.15.4/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.3","pages":[{"title":"v1.15.3","href":"/v1.15.3/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.2","pages":[{"title":"v1.15.2","href":"/v1.15.2/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.1","pages":[{"title":"v1.15.1","href":"/v1.15.1/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.15.0","pages":[{"title":"v1.15.0","href":"/v1.15.0/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.14.7","pages":[{"title":"v1.14.7","href":"/v1.14.7/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.14.6","pages":[{"title":"v1.14.6","href":"/v1.14.6/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.14.5","pages":[{"title":"v1.14.5","href":"/v1.14.5/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.14.4","pages":[{"title":"v1.14.4","href":"/v1.14.4/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.14.3","pages":[{"title":"v1.14.3","href":"/v1.14.3/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.14.2","pages":[{"title":"v1.14.2","href":"/v1.14.2/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.14.1","pages":[{"title":"v1.14.1","href":"/v1.14.1/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.14.0","pages":[{"title":"v1.14.0","href":"/v1.14.0/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.13.0","pages":[{"title":"v1.13.0","href":"/v1.13.0/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.12.2","pages":[{"title":"v1.12.2","href":"/v1.12.2/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.12.1","pages":[{"title":"v1.12.1","href":"/v1.12.1/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.12.0","pages":[{"title":"v1.12.0","href":"/v1.12.0/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.11.1","pages":[{"title":"v1.11.1","href":"/v1.11.1/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.11.0","pages":[{"title":"v1.11.0","href":"/v1.11.0/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.10.1","pages":[{"title":"v1.10.1","href":"/v1.10.1/en/tools/web-scraping/stagehandtool"}]},{"version":"v1.10.0","pages":[{"title":"v1.10.0","href":"/v1.10.0/en/tools/web-scraping/stagehandtool"}]}],"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://crewai.com"},{"anchor":"Forum","icon":"discourse","href":"https://community.crewai.com"},{"anchor":"Blog","icon":"newspaper","href":"https://blog.crewai.com"},{"anchor":"CrewGPT","icon":"robot","href":"https://chatgpt.com/g/g-qqTuUWsBY-crewai-assistant"}]}},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/v1.15.18/pt-BR/tools/web-scraping/stagehandtool"}]},{"language":"ko","pages":[{"title":"ko","href":"/v1.15.18/ko/tools/web-scraping/stagehandtool"}]},{"language":"ar","pages":[{"title":"ar","href":"/v1.15.18/ar/tools/web-scraping/stagehandtool"}]}]},"title":"Stagehand Tool - CrewAI","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":[],"chunks":[]}