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
Set default parameter - no memory, actions per step 10, and extraction input size
Magnus Müller4844bd048fd4
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 877cfc4c1..e20bb1ce3 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -165,7 +165,7 @@ class Agent(Generic[Context]):'data-state','aria-checked',],- max_actions_per_step: int = 1,+ max_actions_per_step: int = 10,use_thinking: bool = True,page_extraction_llm: BaseChatModel | None = None,planner_llm: BaseChatModel | None = None,@@ -174,7 +174,7 @@ class Agent(Generic[Context]):extend_planner_system_message: str | None = None,injected_agent_state: AgentState | None = None,context: Context | None = None,- enable_memory: bool = True,+ enable_memory: bool = False,memory_config: MemoryConfig | None = None,source: str | None = None,file_system_path: str | None = None,diff --git a/browser_use/controller/service.py b/browser_use/controller/service.pyindex 243a306ba..da932e793 100644--- a/browser_use/controller/service.py+++ b/browser_use/controller/service.py@@ -224,7 +224,7 @@ class Controller(Generic[Context]):if params.index not in selector_map:# Return informative message with the new state instead of errormax_index = max(selector_map.keys()) if selector_map else -1- msg = f'Element with index {params.index} does not exist. Page has {len(selector_map)} interactive elements (indices 0-{max_index}). State has been refreshed - please use the updated element indices.'+ msg = f'Element with index {params.index} does not exist. Page has {len(selector_map)} interactive elements (indices 0-{max_index}). State has been refreshed - please use the updated element indices or scroll to see more elements'return ActionResult(extracted_content=msg, include_in_memory=True, success=False, long_term_memory=msg)element_node = await browser_session.get_dom_element_by_index(params.index)@@ -415,7 +415,7 @@ Only use this for extracting info from a single product/article page, not for encontent += iframe_markdown# limit to 60000 characters - remove text in the middle this is approx 20000 tokens- max_chars = 60000+ max_chars = 40000if len(content) > max_chars:content = (content[: max_chars // 2]