Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Update maximum length constants in cloud_events.py to accommodate larger data sizes: MAX_STRING_LENGTH increased to 100K, MAX_URL_LENGTH and MAX_TASK_LENGTH adjusted to 10K.

mertunsall0c2de169f8a6
diff --git a/browser_use/agent/cloud_events.py b/browser_use/agent/cloud_events.py
index 00aa331f5..0a507323a 100644
--- a/browser_use/agent/cloud_events.py
+++ b/browser_use/agent/cloud_events.py
@@ -4,9 +4,9 @@ from bubus import BaseEvent
from pydantic import Field, field_validator
from uuid_extensions import uuid7str
-MAX_STRING_LENGTH = 10000 # 10K chars for most strings
-MAX_URL_LENGTH = 2000
-MAX_TASK_LENGTH = 5000
+MAX_STRING_LENGTH = 100000 # 100K chars ~ 25k tokens should be enough
+MAX_URL_LENGTH = 10000
+MAX_TASK_LENGTH = 10000
MAX_COMMENT_LENGTH = 2000
MAX_FILE_CONTENT_SIZE = 50 * 1024 * 1024 # 50MB