Commit Graph

969 Commits

Author SHA1 Message Date
Nick Sweeting db2271305a show massive security warning if sensitive_data is set without allowed_domains restriction 2025-05-04 17:51:09 +08:00
Dharmendra Singh b76265d36f Rebase the brach and include CLA 2025-05-04 11:40:02 +05:30
Alezander9 d754ba9f47 add urls_visited to posthog info 2025-05-03 14:41:56 -07:00
Alezander9 7082d33d2a refactor telemetry event to have only one event per agent run 2025-05-02 12:05:04 -07:00
Nick Sweeting 4f08369128 fix linter 2025-05-03 00:59:18 +08:00
Nick Sweeting 2b71f33f7e Support Azure OpenAI API GPT-4 (#1532) 2025-05-02 09:58:20 -07:00
Nick Sweeting 2be4ba4f70 more pyupgrade changes 2025-05-02 20:50:21 +08:00
Nick Sweeting 66b3c26df5 add pyupgrade to lint rules 2025-05-02 15:21:23 +08:00
Nick Sweeting 78148a96f9 remove unneeded noqas 2025-05-02 15:20:00 +08:00
Max Comperatore 9289e0f7f2 Support Azure OpenAI API GPT-4 2025-05-01 14:09:43 +00:00
Magnus Müller ffcde32832 Refactor _set_browser_use_version_and_source to accept an optional source parameter 2025-05-01 20:06:12 +08:00
Magnus Müller db29a1c9d5 Track the source with an parameter 2025-05-01 20:04:31 +08:00
Nick Sweeting 3f97915045 Merge branch 'main' into feat/playwright-script-generation 2025-04-30 03:53:33 -07:00
Nick Sweeting 38ab6c156c fix linter 2025-04-30 16:01:33 +08:00
RogelioRichmanAstronaut 0e5c676504 fix: Apply pre-commit linting fixes and improve Playwright example script execution
- Applied automated linting suggestions from pre-commit hooks, primarily updating type hints (e.g., Dict -> dict) and organizing imports.
- Refactored Playwright script execution in examples/features/playwright_script_generation.py to use asyncio.create_subprocess_exec for asynchronous handling and real-time log streaming, resolving ASYNC221 lint error and improving output visibility.
2025-04-30 00:05:36 -05:00
RogelioRichmanAstronaut c7fbc7e071 Chore: Remove unnecessary LLM comments
Remove comments automatically added by the LLM in agent-related files.

Removed comments from:
- browser_use/agent/playwright_script_generator.py
- browser_use/agent/service.py
- browser_use/agent/views.py

These comments were redundant and cluttered the code.
2025-04-29 20:23:44 -05:00
Nick Sweeting 05c89118ea Merge pull request #1257 from KamilU01/main 2025-04-29 09:40:19 -07:00
Nick Sweeting 51f09b85aa Merge branch 'main' into feat/playwright-script-generation 2025-04-28 20:11:41 -07:00
Nick Sweeting d781a3faab fix lint errors 2025-04-28 04:06:19 +08:00
Nick Sweeting 072de0dcf8 no need to make a dict just to unwrap it immediately 2025-04-27 16:02:17 -04:00
shyanilMishra c94e8e4f7c Handle empty model output action with retry and safe fallback part 2 2025-04-27 23:02:08 +05:30
Prenit Wankhede 0b21e50ca6 allow providing chrome_remote_debugging_port in browser config. fix launching user provided chrome browser. 2025-04-26 15:11:25 +04:00
Kamil Ujec b8a8170d2a Added support for gemma instruction-tuned models 2025-04-24 20:25:27 +02:00
paul2048 1bd95cf987 address comment 2025-04-22 23:21:48 +01:00
paul2048 015089cceb Add back new lines 2025-04-22 14:37:31 +01:00
paul2048 b07d0dc431 fix confusing error message 2025-04-22 14:25:51 +01:00
Nick Sweeting 3f97c7ec7b remove dead _verification_task code 2025-04-22 02:23:36 -07:00
Nick Sweeting a34d201eb4 simplify warning messages for bad API keys 2025-04-21 14:52:11 -07:00
Nick Sweeting 1cf4104ed3 fix async errors in features/pause_agent.py 2025-04-21 14:27:36 -07:00
Nick Sweeting a47c34d716 Merge pull request #1443 from Anirudha619/fix 2025-04-21 11:28:28 -07:00
Nick Sweeting 26d869c4f1 Merge branch 'main' into improve-eval-tool 2025-04-21 11:18:45 -07:00
Anirudha619 b43648b6ad Fix Error: 'AgentSettings' object has no attribute 'enable_memory' 2025-04-21 23:46:19 +05:30
Nick Sweeting 85586ef821 Merge branch 'main' into mathisarends-viadee/extend-system-prompt-for-planner-llm 2025-04-21 11:03:05 -07:00
Nick Sweeting 8b165d5997 fix ruff errors in other files 2025-04-21 10:56:06 -07:00
Nick Sweeting 738508d413 Merge branch 'main' into mathisarends-viadee/extend-system-prompt-for-planner-llm 2025-04-21 10:17:33 -07:00
Nick Sweeting b8859817b1 Merge pull request #834 from Shyanil/fix/439-max-steps-history 2025-04-21 09:58:57 -07:00
Nick Sweeting 1ac623f798 Merge pull request #857 from neo773/bot-detection-batch 2025-04-21 09:56:27 -07:00
Nick Sweeting ce584b0ca1 Merge pull request #1427 from zacka026/main 2025-04-21 09:54:11 -07:00
RogelioRichmanAstronaut 71400d93e6 feat: Add Playwright script generation from agent history
Implement the ability to generate executable Playwright scripts from an Agent's run history (`AgentHistoryList`).

This introduces the `PlaywrightScriptGenerator` class which translates recorded agent actions (clicks, inputs, navigation, etc.) into a Python script using Playwright's async API.

Key features:
- Uses XPath selectors derived from the agent's interaction history.
- Includes a robust helper function (`_try_locate_and_act`) with XPath prefix trimming for improved resilience on dynamic pages.
- Handles sensitive data placeholders by mapping them to environment variables in the generated script.
- Supports configuring the browser launch and context based on the original agent's `BrowserConfig` and `BrowserContextConfig`.
- Activated by setting the `save_playwright_script_path` option in `AgentSettings`.

Includes modifications to `Agent` service to trigger generation and `AgentHistoryList` view to add the saving method. Also adds a new example (`examples/features/playwright_script_generation.py`).

This feature enables reliable replay of agent runs, automated testing, and scripting of repetitive tasks discovered by the agent.
2025-04-21 11:05:06 -05:00
Dev-Khant 6b16855c11 Merge branch 'main' into fix-huggingface-issue 2025-04-20 11:55:47 +05:30
Zack A 9fbc669114 fix: update version retrieval method to use importlib.metadata 2025-04-19 08:38:17 -04:00
lynn 347b473ab7 fix: Make memory module optional for Python 3.13 compatibility 2025-04-18 14:54:48 +08:00
Alezander9 057a69e298 feat: allow eval script to use any model for BU agent, add vision disabling for XAI models, test all models work in eval script 2025-04-17 19:51:50 -07:00
Dev-Khant 52ac120e94 Merge branch 'main' into fix-huggingface-issue 2025-04-17 13:38:18 +05:30
Dev-Khant c4ea195ae4 address comments 2025-04-17 13:35:26 +05:30
Nick Sweeting df07566f3e auto-disable use_vision for deepseek models 2025-04-16 18:34:02 -07: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 96be634f4c fix context_lines split None error 2025-04-16 18:10:35 -07:00
Nick Sweeting 6f061e6787 log more info about the models at startup 2025-04-16 18:09:51 -07:00
Nick Sweeting 77314dc6f0 simplify model name getter 2025-04-16 17:12:39 -07:00