Skip to content

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

no need for screenshot tool when use_vision is True

mertunsall8dc9a883d20c
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index cc6438a8d..b6db1a5f2 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -254,8 +254,8 @@ class Agent(Generic[Context, AgentStructuredOutput]):
elif controller is not None:
self.tools = controller
else:
- # Exclude screenshot tool when use_vision=False
- exclude_actions = ['screenshot'] if use_vision is False else []
+ # Exclude screenshot tool when use_vision=True
+ exclude_actions = ['screenshot'] if use_vision != 'auto' else []
self.tools = Tools(exclude_actions=exclude_actions, display_files_in_done_text=display_files_in_done_text)
# Structured output