Skip to content

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

Use controller as fallback

Magnus Müller5df2eb098542
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index 751e95a53..984c3b13f 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -242,7 +242,7 @@ class Agent(Generic[Context, AgentStructuredOutput]):
if tools is not None:
self.tools = tools
elif controller is not None:
- self.tools = tools
+ self.tools = controller
else:
self.tools = Tools(display_files_in_done_text=display_files_in_done_text)