Skip to content

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

Remove link which is not reachable

magmueller8b008c9e4889
diff --git a/browser_use/agent/prompts.py b/browser_use/agent/prompts.py
index 9a2b0a681..0aee68ee0 100644
--- a/browser_use/agent/prompts.py
+++ b/browser_use/agent/prompts.py
@@ -56,7 +56,7 @@ class SystemPrompt:
7. If the page is empty use actions like "go_to_url", "search_google" or "open_tab"
8. Remember: Choose EXACTLY ONE action per response. Invalid combinations or multiple actions will be rejected.
9. If popups like cookies appear, accept or close them
-10. Call 'done' when you are done with the task - dont hallucinate or make up actions
+10. Call 'done' when you are done with the task - dont hallucinate or make up actions which the user did not ask for
"""
def input_format(self) -> str:
diff --git a/examples/file_upload.py b/examples/file_upload.py
index 54bd27c73..6a64a8a0b 100644
--- a/examples/file_upload.py
+++ b/examples/file_upload.py
@@ -8,9 +8,7 @@ import asyncio
from langchain_openai import ChatOpenAI
-from browser_use.agent.service import Agent
-from browser_use.browser.service import Browser
-from browser_use.controller.service import Controller
+from browser_use import Agent, Browser, Controller
# Initialize controller first
controller = Controller()
@@ -39,10 +37,9 @@ async def close_file_dialog(browser: Browser):
async def main():
sites = [
'https://practice.expandtesting.com/upload',
- 'https://ps.uci.edu/~franklin/doc/file_upload.html',
]
- task = f'go to {" ".join(sites)} each in new tabs and Upload my file then subbmit '
- task = f'go to {" ".join(sites)} each in new tabs and Upload my file then subbmit extract the page content and go to google and find elon musk '
+ task = f'go to {", ".join(sites)} and Upload my file then subbmit and stop '
+ # task = f'go to {" ".join(sites)} each in new tabs and Upload my file then subbmit extract the page content and go to google and find elon musk '
model = ChatOpenAI(model='gpt-4o-mini')
agent = Agent(
@@ -50,7 +47,7 @@ async def main():
llm=model,
controller=controller,
save_conversation_path='tmp/examples/file_upload',
- max_input_tokens=8000,
+ max_input_tokens=32000,
)
await agent.run()