Skip to content

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

changed default compaction to 25 steps

Saurav Panda653d795f152b
diff --git a/browser_use/agent/views.py b/browser_use/agent/views.py
index c2f75d200..efd318531 100644
--- a/browser_use/agent/views.py
+++ b/browser_use/agent/views.py
@@ -35,7 +35,7 @@ class MessageCompactionSettings(BaseModel):
"""Summarizes older history into a compact memory block to reduce prompt size."""
enabled: bool = True
- compact_every_n_steps: int = 15
+ compact_every_n_steps: int = 25
trigger_char_count: int | None = None # Min char floor; set via trigger_token_count if preferred
trigger_token_count: int | None = None # Alternative to trigger_char_count (~4 chars/token)
chars_per_token: float = 4.0