From 48e94def72b9f2c10514788c6e1baf54441d2c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20M=C3=BCller?= <67061560+MagMueller@users.noreply.github.com> Date: Wed, 21 May 2025 11:59:38 +0200 Subject: [PATCH 1/3] Added DEFAULT_BROWSER_PROFILE as fallback for browser_profile in Agent class initialization --- browser_use/agent/service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py index 55517bdaf..4cf998bb8 100644 --- a/browser_use/agent/service.py +++ b/browser_use/agent/service.py @@ -13,6 +13,8 @@ from typing import Any, Generic, TypeVar from dotenv import load_dotenv +from browser_use.browser.session import DEFAULT_BROWSER_PROFILE + load_dotenv() from langchain_core.language_models.chat_models import BaseChatModel @@ -291,7 +293,7 @@ class Agent(Generic[Context]): assert not (browser_profile and browser_context), 'Cannot provide both browser_profile and browser_context' assert not (browser and browser_context), 'Cannot provide both browser and browser_context' assert not (browser_session and browser_context), 'Cannot provide both browser_session and browser_context' - + browser_profile = browser_profile or DEFAULT_BROWSER_PROFILE self.browser_session = browser_session or BrowserSession( profile=browser_profile, browser=browser, browser_context=browser_context ) From b9911e0dc822934c623f1718b44daf1e4df8ffb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20M=C3=BCller?= <67061560+MagMueller@users.noreply.github.com> Date: Wed, 21 May 2025 11:59:50 +0200 Subject: [PATCH 2/3] Update .gitignore to include 'temp' and 'tmp' directories --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2136e926e..c26532221 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,5 @@ private_example.py private_example uv.lock +temp +tmp From d401cc77abaf56abc9062e29984928531e658d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20M=C3=BCller?= <67061560+MagMueller@users.noreply.github.com> Date: Wed, 21 May 2025 12:02:07 +0200 Subject: [PATCH 3/3] Update task description in simple.py to specify a one-way flight search in 3 weeks instead of a round trip on a specific date. --- examples/simple.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/simple.py b/examples/simple.py index de29003ba..c42bd1dda 100644 --- a/examples/simple.py +++ b/examples/simple.py @@ -17,8 +17,7 @@ llm = ChatOpenAI( model='gpt-4o', temperature=0.0, ) -task = 'Go to kayak.com and find the cheapest flight from Zurich to San Francisco on 2025-05-01' - +task = 'Go to kayak.com and find the cheapest one-way flight from Zurich to San Francisco in 3 weeks.' agent = Agent(task=task, llm=llm)