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
Add Rust core source marker
Magnus Müllerdf54d6a4e163
diff --git a/browser_use/rust/service.py b/browser_use/rust/service.pyindex 1d83db545..91dbad3b0 100644--- a/browser_use/rust/service.py+++ b/browser_use/rust/service.py@@ -4612,7 +4612,7 @@ class Agent(Generic[Context, AgentStructuredOutput]):version=self.version or '',source=self.source,cdp_url=urlparse(cdp_url).hostname if cdp_url else None,- agent_type=None,+ agent_type='rust_core',action_errors=self.history.errors(),action_history=action_history_data,urls_visited=[url for url in self.history.urls() if url],diff --git a/tests/ci/test_rust_agent.py b/tests/ci/test_rust_agent.pyindex 2c0d508ec..a95ed4ac2 100644--- a/tests/ci/test_rust_agent.py+++ b/tests/ci/test_rust_agent.py@@ -4792,6 +4792,7 @@ async def test_rust_agent_exposes_logging_helper_methods(monkeypatch):assert captured_eventsassert captured_events[0].model == 'gpt-test'assert captured_events[0].model_provider == 'test-provider'+ assert captured_events[0].agent_type == 'rust_core'assert captured_events[0].cdp_url == 'browser.example'assert captured_events[0].action_history == [[{'done': {'text': 'done', 'success': True}}]]assert captured_events[0].urls_visited == ['https://example.com']@@ -4880,6 +4881,7 @@ def test_rust_agent_telemetry_records_cloud_cdp_hostname():agent._log_agent_event(max_steps=3)assert captured_events[0].name == 'agent_event'+ assert captured_events[0].agent_type == 'rust_core'assert captured_events[0].cdp_url == 'cloud-browser.example'assert captured_events[0].urls_visited == ['https://example.com']