crewAIInc/crewAI · error · EnvironmentError

BROWSERBASE_API_KEY environment variable is required for ini

Error message

BROWSERBASE_API_KEY environment variable is required for initialization

What it means

Error "BROWSERBASE_API_KEY environment variable is required for initialization" thrown in crewAIInc/crewAI.

Source

Thrown at lib/crewai-tools/src/crewai_tools/tools/browserbase_load_tool/browserbase_load_tool.py:49

                name="BROWSERBASE_PROJECT_ID",
                description="Project ID for Browserbase services",
                required=False,
            ),
        ]
    )

    def __init__(
        self,
        api_key: str | None = None,
        project_id: str | None = None,
        text_content: bool | None = False,
        session_id: str | None = None,
        proxy: bool | None = None,
        **kwargs: Any,
    ) -> None:
        super().__init__(**kwargs)
        if not self.api_key:
            raise EnvironmentError(
                "BROWSERBASE_API_KEY environment variable is required for initialization"
            )
        try:
            from browserbase import Browserbase
        except ImportError:
            import click

            if click.confirm(
                "`browserbase` package not found, would you like to install it?"
            ):
                import subprocess

                subprocess.run(["uv", "add", "browserbase"], check=True)  # noqa: S607
                from browserbase import Browserbase
            else:
                raise ImportError(
                    "`browserbase` package not found, please run `uv add browserbase`"
                ) from None

View on GitHub (pinned to 754d7323be)

Solutions

  1. Set the BROWSERBASE_API_KEY environment variable.
  2. Pass the api_key directly to the tool constructor.

When it happens

Trigger: Thrown at lib/crewai-tools/src/crewai_tools/tools/browserbase_load_tool/browserbase_load_tool.py:49 when the library encounters an invalid state.

Common situations: Occurs when BrowserbaseLoadTool is initialized without an API key. Set the BROWSERBASE_API_KEY environment variable or pass api_key to the constructor.


AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15). Data as JSON: /api/errors/e94e4431c8f50ab0. Report an issue: GitHub.