{"record":{"id":"e94e4431c8f50ab0","repo":"crewAIInc/crewAI","slug":"browserbase-api-key-environment-variable-is-requir","errorCode":null,"errorMessage":"BROWSERBASE_API_KEY environment variable is required for initialization","messagePattern":"BROWSERBASE_API_KEY environment variable is required for initialization","errorType":"exception","errorClass":"EnvironmentError","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/browserbase_load_tool/browserbase_load_tool.py","lineNumber":49,"sourceCode":"                name=\"BROWSERBASE_PROJECT_ID\",\n                description=\"Project ID for Browserbase services\",\n                required=False,\n            ),\n        ]\n    )\n\n    def __init__(\n        self,\n        api_key: str | None = None,\n        project_id: str | None = None,\n        text_content: bool | None = False,\n        session_id: str | None = None,\n        proxy: bool | None = None,\n        **kwargs: Any,\n    ) -> None:\n        super().__init__(**kwargs)\n        if not self.api_key:\n            raise EnvironmentError(\n                \"BROWSERBASE_API_KEY environment variable is required for initialization\"\n            )\n        try:\n            from browserbase import Browserbase\n        except ImportError:\n            import click\n\n            if click.confirm(\n                \"`browserbase` package not found, would you like to install it?\"\n            ):\n                import subprocess\n\n                subprocess.run([\"uv\", \"add\", \"browserbase\"], check=True)  # noqa: S607\n                from browserbase import Browserbase\n            else:\n                raise ImportError(\n                    \"`browserbase` package not found, please run `uv add browserbase`\"\n                ) from None","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/browserbase_load_tool/browserbase_load_tool.py#L31-L67","documentation":"Error \"BROWSERBASE_API_KEY environment variable is required for initialization\" thrown in crewAIInc/crewAI.","triggerScenarios":"Thrown at lib/crewai-tools/src/crewai_tools/tools/browserbase_load_tool/browserbase_load_tool.py:49 when the library encounters an invalid state.","commonSituations":"Occurs when BrowserbaseLoadTool is initialized without an API key. Set the BROWSERBASE_API_KEY environment variable or pass api_key to the constructor.","solutions":["Set the BROWSERBASE_API_KEY environment variable.","Pass the api_key directly to the tool constructor."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}