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 assertion for safety
mertunsall729fc798ca82
diff --git a/browser_use/agent/message_manager/service.py b/browser_use/agent/message_manager/service.pyindex 504b842d7..b48d1aff1 100644--- a/browser_use/agent/message_manager/service.py+++ b/browser_use/agent/message_manager/service.py@@ -116,6 +116,8 @@ class MessageManager:self.use_thinking = use_thinkingself.max_history_items = max_history_items+ assert max_history_items is None or max_history_items > 5, 'max_history_items must be None or greater than 5'+# Store settings as direct attributes instead of in a settings objectself.include_attributes = include_attributes or []self.message_context = message_context