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
make markdownify non-blocking async
Nick Sweetinga8eb2bac2f01
diff --git a/browser_use/agent/memory/service.py b/browser_use/agent/memory/service.pyindex 4c12dc92f..34b100bc2 100644--- a/browser_use/agent/memory/service.py+++ b/browser_use/agent/memory/service.py@@ -3,6 +3,7 @@ from __future__ import annotationsimport loggingimport osimport warnings+from concurrent.futures import ThreadPoolExecutor, TimeoutErrorfrom langchain_core.language_models.chat_models import BaseChatModelfrom langchain_core.messages import (@@ -137,8 +138,17 @@ class Memory:if len(messages_to_process) <= 1:self.logger.debug('π Not enough non-memory messages to summarize')return- # Create a procedural memory- memory_content = self._create([m.message for m in messages_to_process], current_step)+ # Create a procedural memory with timeout+ try:+ with ThreadPoolExecutor(max_workers=1) as executor:+ future = executor.submit(self._create, [m.message for m in messages_to_process], current_step)+ memory_content = future.result(timeout=5)+ except TimeoutError:+ self.logger.warning('π Procedural memory creation timed out after 30 seconds')+ return+ except Exception as e:+ self.logger.error(f'π Error during procedural memory creation: {e}')+ returnif not memory_content:self.logger.warning('π Failed to create procedural memory')