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
Include empty tool mesage for openai
magmueller717e60b77ccd
diff --git a/browser_use/agent/message_manager/service.py b/browser_use/agent/message_manager/service.pyindex 832437216..5cd95320a 100644--- a/browser_use/agent/message_manager/service.py+++ b/browser_use/agent/message_manager/service.py@@ -148,6 +148,12 @@ class MessageManager:self._add_message_with_tokens(msg)# empty tool response+ tool_message = ToolMessage(+ content='',+ tool_call_id=str(self.tool_id),+ )+ self._add_message_with_tokens(tool_message)+ self.tool_id += 1def get_messages(self) -> List[BaseMessage]:"""Get current message list, potentially trimmed to max tokens"""