diff --git a/browser_env/browser_use_runner.py b/browser_env/browser_use_runner.py index 08ed6b42..dd201943 100644 --- a/browser_env/browser_use_runner.py +++ b/browser_env/browser_use_runner.py @@ -6,6 +6,13 @@ from urllib import error, request from browser_use import Agent, Browser, ChatOpenAI +SPEED_OPTIMIZATION_PROMPT = """ +Speed optimization instructions: +- Be extremely concise and direct in your responses +- Get to the goal as quickly as possible +- Use multi-action sequences whenever possible to reduce steps +""" + def _json_response(handler, status_code, payload): data = json.dumps(payload, ensure_ascii=False).encode("utf-8") @@ -29,7 +36,13 @@ async def run_browser_task(task): temperature=0.0, ) - agent = Agent(task=task, llm=llm, browser=browser) + agent = Agent(task=task, + llm=llm, + browser=browser, + flash_mode=True, + use_vision=False, + extend_system_message=SPEED_OPTIMIZATION_PROMPT, + ) try: history = await agent.run()