Commit Graph

49 Commits

Author SHA1 Message Date
Nick Sweeting
6c695d0a42 more lint and hint fixes 2025-06-21 05:39:17 -07:00
Nick Sweeting
340bafdd29 move old tests to old folder 2025-06-21 04:47:46 -07:00
Nick Sweeting
3cf9f3410c fix config issues 2025-06-21 04:03:58 -07:00
Nick Sweeting
f4b1987761 fixes 2025-06-21 03:43:37 -07:00
Nick Sweeting
6ede8842e5 Update browser_use/utils.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-06-21 06:38:57 -04:00
Nick Sweeting
49e9fd4ff2 move env var config to utils file 2025-06-21 03:14:46 -07:00
Magnus Müller
ad446f5769 Merge branch 'main' into mert/new_everything 2025-06-19 23:45:41 +02:00
Nick Sweeting
36c88b760c Consolidate sync related code (#2009) 2025-06-19 07:41:28 -07:00
Nick Sweeting
778536a3ce move all sync code into sync dir 2025-06-19 01:28:22 -07:00
Magnus Müller
0b6ebea431 Merge branch 'main' into mert/new_everything 2025-06-19 09:49:43 +02:00
Yasith Jayawardana
e2e11966d3 Merge branch 'main' into typing-improvements 2025-06-18 21:20:47 -04:00
Nick Sweeting
474476f0ae switch to external bubus lib 2025-06-18 01:41:16 -07:00
mertunsall
0c34c399db Merge branch 'main' into mert/new_everything 2025-06-17 11:19:06 +02:00
yasithdev
8ea4b4c71a centralize playwright/patchwright imports, and update typing/checks to reduce lint errors 2025-06-16 22:57:20 -04:00
Nick Sweeting
eb2807e779 fix unbound logger 2025-06-10 02:24:27 -07:00
Nick Sweeting
930a7aa4de use self.logger for timing log lines 2025-06-10 00:24:50 -07:00
Magnus Müller
d998e95ac0 Improve error handling in LLM API calls by appending exception messages to LLMException. This change enhances the clarity of error logs in both utils.py and service.py, facilitating better debugging and traceability. 2025-06-09 22:47:03 +02:00
Magnus Müller
52d4191ba9 Merge branch 'main' into mert/new_everything 2025-06-07 17:58:09 +02:00
Nick Sweeting
885e3bcfba dont prepent v to version numbers 2025-06-05 22:47:16 -07:00
Nick Sweeting
cf6a0d9fbf improve chrome launch error handling when user_data_dir is bad 2025-06-05 18:22:02 -07:00
Nick Sweeting
a2b97b64a9 lint fixes 2025-06-05 02:33:57 -07:00
Nick Sweeting
8593eebf7a Update browser_use/utils.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-06-05 05:30:30 -04:00
Nick Sweeting
8f6f907247 use async lock to protect BrowserSession.start from race conditions 2025-06-05 02:24:07 -07:00
Magnus Müller
3a9788c1d5 Implement centralized LLM error handling in utils.py and update agent service to utilize this new functionality, improving error management and code clarity. 2025-06-02 15:16:31 +02:00
Nick Sweeting
d2f6dc71a3 Update browser_use/utils.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-05-29 21:47:50 -04:00
Nick Sweeting
2e3550ebec auto-load storage_state into remote browsers as well, use downloads_dir for everything 2025-05-29 17:58:47 -07:00
Nick Sweeting
bad374ba68 make logging more error resilient 2025-05-23 21:36:53 -07:00
Nick Sweeting
fd555173e9 shorter log lines around browsersession closing 2025-05-23 19:43:39 -07:00
Nick Sweeting
39ef1e5d09 more logging and emoji tweaks to improve navigation, page idle, loading messages 2025-05-23 01:31:55 -07:00
Nick Sweeting
831ecec1ab add emoji to timer results 2025-05-23 01:02:58 -07:00
Nick Sweeting
6b8360c475 better logging 2025-05-22 23:17:21 -07:00
Nick Sweeting
187641f695 add support for nested sensitive_data 2025-05-22 04:58:23 -07:00
Nick Sweeting
91c5ba4568 fix lint errors 2025-05-02 20:58:18 +08:00
Nick Sweeting
541eefa212 Fix: Terminal reset sequence when exiting with Ctrl+C (#1534) 2025-05-02 05:57:53 -07:00
Nick Sweeting
2be4ba4f70 more pyupgrade changes 2025-05-02 20:50:21 +08:00
Max Comperatore
acf5e4f3e2 Enhance terminal reset handling on second Ctrl+C for improved user experience 2025-05-01 15:08:07 +00:00
Nick Sweeting
dc59dedbb5 cleanup console colors on exit and silence some unneeded debug logs 2025-04-16 18:11:46 -07:00
Nick Sweeting
9aea342b21 Update utils.py to fix #1382 2025-04-15 15:39:15 -04:00
Christian Clauss
7604beab16 uv add --dev codespell 2025-03-31 07:50:12 +02:00
Nick Sweeting
eef56cb8da ignore signal registration errors in edge case environments 2025-03-30 15:46:03 -07:00
Nick Sweeting
fb6fa259a8 apply ruff safe fixes 2025-03-28 18:11:36 -07:00
Nick Sweeting
b5ec945b74 check platform at startup 2025-03-28 14:41:28 -07:00
Nick Sweeting
1d5e17de3d add windows support to ctrl+C handling 2025-03-28 11:16:14 -07:00
Nick Sweeting
363382a5bc better handling of cancelled tasks, more DRY second ctrlc handling, and colorized output 2025-03-27 17:32:12 -07:00
Nick Sweeting
ad3080353b refactor ctrl-c handling to separate class 2025-03-27 17:13:00 -07:00
Anish Hiranandani
c2332f0e96 added required env variables mapping + check env func in utils 2025-03-26 15:20:24 -07:00
Gregor Žunič
4f74170685 Added anonymized posthog telemetry (#22)
* added anonymized telemetry

* collect data with posthog readme
2024-11-17 01:17:01 +01:00
Gregor Žunič
89c63fdd63 Added custom actions registry and fixed extraction layer (#20)
* Validator

* Test mind2web

* Cleaned up logger

* Pytest logger

* Cleaned up logger

* Disable flag for human input

* Multiple clicks per button

* Multiple clicks per button

* More structured system prompt

* Fields with description

* System prompt example

* One logger

* Cleaner logging

* Log step in step function

* Fix critical clicking error - wrong argument used

* Improved thought process of agent

* Improve system prompt

* Remove human input message

* Custome action registration

* Pydantic model for custom actions

* Pydantic model for custome output

* Runs through, model outputs functions, but not called yet

* Work in progress - description for custome actions

* Description works, but schema not yet

* Model can call the right action - but is not executed

* Seperate is_controller_action  and is_custom_action

* Works! Model can call custom function

* Use registry for action, but result is not feed back to model

* Include result in messages

* Works with custom function - but typing is not correct

* Renamed registry

* First test cases

* Captcha tests

* Pydantic for tests

* Improve prompts for multy step

* System prompt structure

* Handle errors like validation error

* Refactor error handling in agent

* Refactor error handling in agent

* Improved logging

* Update view

* Fix click parameter to index

* Simplify dynamic actions

* Use run instead of step

* Rename history

* Rename AgentService to Agent

* Rename ControllerService to Controller

* Pytest file

* Rename get state

* Rename BrowserService

* reversed dom extraction recursion to while

* Rename use_vision

* Rename use_vision

* reversed dom tree items and made browser less anoying

* Renaming and fixing type errors

* Renamed class names for agent

* updated requirements

* Update prompt

* Action registration works for user and controller

* Fix done call by returning ActionResult

* Fix if result is none

* Rename AgentOutput and ActionModel

* Improved prompt Passes 6/8 tests from test_agent_actions

* Calculate token cost

* Improve display

* Simplified logger

* Test function calling

* created super simple xpath extraction algo

* Tests logging

* tiny fixes to dom extraction

* Remove test

* Dont log number of clicks

* Pytest file

* merged per element js checks

* Check if driver is still open

* super fast processing

* fixed agent planning and stuff

* Fix example

* Fix example

* Improve error

* Improved error correction

* New line for step

* small type error fixes

* Test for pydantic

* Fix line

* Removed sample

* fixed readme and examples

---------

Co-authored-by: magmueller <mamagnus00@gmail.com>
2024-11-15 21:42:02 +01:00
Gregor Žunič
68201df624 src -> browser_use 2024-11-06 18:18:00 +01:00