Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Limit Rust SDK browser API tools
Magnus Müller6d7ffdd00a9d
diff --git a/browser_use/rust/service.py b/browser_use/rust/service.pyindex d6be60e57..268f3d18d 100644--- a/browser_use/rust/service.py+++ b/browser_use/rust/service.py@@ -88,6 +88,8 @@ AgentNewStepCallback = (AgentDoneCallback = Callable[[AgentHistoryList], Awaitable[None]] | Callable[[AgentHistoryList], None]logger = logging.getLogger(__name__)+DEFAULT_RUST_SDK_TOOL_ALLOWLIST = ['browser', 'browser_script', 'done']+try:from lmnr import Laminar # type: ignoreexcept ImportError:@@ -6061,6 +6063,9 @@ class Agent(Generic[Context, AgentStructuredOutput]):'calculate_cost': bool(self.settings.calculate_cost),'use_vision': self.settings.use_vision,'max_actions_per_step': int(self.settings.max_actions_per_step),+ 'config_overrides': {+ 'tool_allowlist': list(DEFAULT_RUST_SDK_TOOL_ALLOWLIST),+ },}if self._sdk_agent_id:params['agent_id'] = self._sdk_agent_iddiff --git a/tests/ci/test_rust_agent.py b/tests/ci/test_rust_agent.pyindex c79147815..f85ce91f5 100644--- a/tests/ci/test_rust_agent.py+++ b/tests/ci/test_rust_agent.py@@ -2250,6 +2250,7 @@ def test_rust_agent_translates_browser_use_args_to_terminal(monkeypatch):assert params['llm'] == {'provider': 'browser-use', 'model': 'gpt-test', 'timeout': 75}assert params['browser']['cdp_url'] == 'wss://browser.example/devtools/browser/1'assert 'cdp_headers' not in params['browser']+ assert params['config_overrides']['tool_allowlist'] == ['browser', 'browser_script', 'done']assert "First navigate to 'https://example.com'" in params['task']