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
Merge branch 'main' into kalil0321/codeagent-api-improv
Mert Unsal7851657dedc7
diff --cc browser_use/code_use/service.pyindex ec8e901bb,d7673f085..d86bbbe02--- a/browser_use/code_use/service.py+++ b/browser_use/code_use/service.py@@@ -35,8 -37,8 +37,9 @@@ from .formatting import format_browser_from .namespace import EvaluateError, create_namespacefrom .utils import detect_token_limit_issue, extract_code_blocks, extract_url_from_task, truncate_message_contentfrom .views import (+ CellType,CodeAgentHistory,+ CodeAgentHistoryList,CodeAgentModelOutput,CodeAgentResult,CodeAgentState,@@@ -591,13 -652,9 +653,13 @@@ class CodeAgentexcept Exception as log_e:logger.error(f'Failed to log telemetry event: {log_e}', exc_info=True)+ # Store history data in session for history property+ self.session._complete_history = self.complete_history+ self.session._usage_summary = self.usage_summary+return self.session- async def _get_code_from_llm(self) -> tuple[str, str]:+ async def _get_code_from_llm(self, step_number: int | None = None) -> tuple[str, str]:"""Get Python code from the LLM.Returns: