Skip to content

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

cache the user message too, helps anthropic models

mertunsall9f874a805c3b
diff --git a/browser_use/agent/prompts.py b/browser_use/agent/prompts.py
index 672e97e9d..36802cea6 100644
--- a/browser_use/agent/prompts.py
+++ b/browser_use/agent/prompts.py
@@ -269,6 +269,6 @@ Available tabs:
)
)
- return UserMessage(content=content_parts)
+ return UserMessage(content=content_parts, cache=True)
- return UserMessage(content=state_description)
+ return UserMessage(content=state_description, cache=True)