Commit Graph

4710 Commits

Author SHA1 Message Date
Magnus Müller
330e4d9ab5 Simple example 2025-07-20 23:54:03 +02:00
Magnus Müller
d695a56923 fix temperature for reasoning models 2025-07-20 23:53:00 +02:00
Magnus Müller
d54749d8bb feat/speed-improvements-wait (#2496)
Auto-generated PR for branch: feat/speed-improvements-wait
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Improved speed and reliability by adding timeouts to LLM calls, browser
actions, and step execution, and refined the wait action to log accurate
wait times.

- **Performance and Reliability**
- Added configurable timeouts for LLM calls (default 60s) and step
execution (default 180s).
- Reduced timeouts for browser tab info and page title retrieval for
faster responses.
- Set explicit timeouts for browser actions like scroll, click, type,
and fill to prevent hangs.
- Updated the wait action to account for initial LLM wait time and
improved logging.

<!-- End of auto-generated description by cubic. -->
2025-07-20 23:30:34 +02:00
Magnus Müller
76b57a5586 Merge branch 'main' into feat/speed-improvements-wait 2025-07-20 23:23:50 +02:00
Mert Unsal
5fdd7fef29 lazy imports and bump some versions (#2501)
improve import times by setting up lazy imports
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Added lazy import logic across core modules to speed up import times and
reduce startup overhead. Updated several LLM-related dependencies to
newer versions.

- **Refactors**
- Replaced direct imports with lazy imports in main package entrypoints
and heavy modules.
- Moved some imports inside functions to avoid loading large
dependencies at startup.

- **Dependencies**
  - Bumped versions for google-genai, openai, anthropic, and groq.

<!-- End of auto-generated description by cubic. -->
2025-07-20 23:20:21 +02:00
mertunsall
5ed62da25f restored this to main 2025-07-20 23:14:07 +02:00
Magnus Müller
d9e6348a67 Include frequency_penalty 0.05 2025-07-20 23:11:23 +02:00
mertunsall
ce5bfe6195 lazy imports and bump some versions 2025-07-20 22:58:34 +02:00
Magnus Müller
7a619c3612 Refactor wait time logging in Controller to simplify message formatting 2025-07-20 16:34:27 +02:00
Magnus Müller
5b13195f56 Increase default temperature to 0.2 to avoid infinite generation 2025-07-20 16:24:41 +02:00
Magnus Müller
eafb170dec Merge branch 'main' into feat/speed-improvements-wait 2025-07-20 16:15:01 +02:00
Magnus Müller
af04b713d5 Fix lint errors 2025-07-20 16:14:42 +02:00
Mert Unsal
0b16795c1f feat: disable screenshots when vision is disabled (#2498)
Disables screenshot capture when vision is disabled to improve
performance
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Disabled screenshot capture when vision is turned off to improve
performance.

<!-- End of auto-generated description by cubic. -->
2025-07-20 16:14:16 +02:00
mertunsall
b8067da3d4 no screenshots if vision is disabled 2025-07-20 16:10:38 +02:00
Magnus Müller
c96121a98b Update wait test 2025-07-20 16:02:11 +02:00
Magnus Müller
2552825786 Update wait test 2025-07-20 15:59:20 +02:00
Magnus Müller
cbf2a783e2 Switch decorators order 2025-07-20 15:50:13 +02:00
Magnus Müller
34590509fa Change log 2025-07-20 15:45:12 +02:00
Magnus Müller
f7bd2c98e9 Run tests again 2025-07-20 15:23:14 +02:00
Magnus Müller
1531907b40 Enhance timeout handling in BrowserSession methods
- Added timeout parameters to scroll_into_view_if_needed, click, type, and fill methods to improve reliability and prevent potential hangs.
- Introduced debug observation for get_dom_element_by_index and _input_text_element_node methods to aid in tracking and debugging.
2025-07-19 20:56:30 +02:00
Magnus Müller
c7f266d52a Improved error for timeout 2025-07-19 20:55:19 +02:00
Magnus Müller
067b249da2 More tracking 2025-07-19 20:53:22 +02:00
Magnus Müller
724dc15b29 Fix timeout exception handling in Agent class
- Changed the exception type from asyncio.TimeoutError to TimeoutError for better clarity in timeout handling.
- Updated the error message to suggest generating fewer tokens in case of a timeout.
2025-07-19 20:36:56 +02:00
Magnus Müller
f436338207 Adjust timeout settings in BrowserSession for improved performance
- Reduced the retry timeout from 6 seconds to 3 seconds.
- Decreased the page title retrieval timeout from 3 seconds to 2 seconds.
- Enhanced timeout handling logic to prioritize user-defined timeouts while ensuring a minimum of 3000ms.
2025-07-19 20:32:59 +02:00
Magnus Müller
0e64c846ae Refactor wait action to adjust for initial wait time and simplify ActionResult return
- Updated the wait action to account for the initial 3 seconds already waited, ensuring accurate logging of total wait time.
- Simplified the ActionResult return by removing unnecessary parameters.
2025-07-19 19:50:13 +02:00
Magnus Müller
01f5854706 Inlcude timeout per step at 3min 2025-07-19 19:40:21 +02:00
Magnus Müller
6285bfeca0 Enable max tokens for openai and top_p 2025-07-19 19:36:49 +02:00
Magnus Müller
e43363cb0b Set maximum 1 min timeout for llm call 2025-07-19 18:56:50 +02:00
Magnus Müller
4158f20733 feature/optimize-browser-extensions (#2492)
Auto-generated PR for branch: feature/optimize-browser-extensions
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Updated the default browser extensions to use only fully automatic tools
for better single-session automation. Added Decentraleyes, ClearURLs,
and FastForward; removed extensions that require manual setup or
learning.

- **New Extensions**
 - Added Decentraleyes for CDN tracking protection.
 - Added ClearURLs to remove tracking parameters.
 - Added FastForward to bypass link shorteners.

<!-- End of auto-generated description by cubic. -->
2025-07-19 18:06:18 +02:00
Magnus Müller
bbd34cab80 Fix two extension-related bugs
1. Remove Reader View from description - extension not actually loaded
   - Updated enable_default_extensions description to only mention extensions that are actually loaded
   - Removed misleading reference to Reader View functionality

2. Resolve Chrome flag conflict for extension activity logging
   - Removed --disable-extension-activity-logging from CHROME_DEFAULT_ARGS
   - Keeps --enable-extension-activity-logging in _get_extension_args() when extensions enabled
   - Eliminates contradictory flags that caused unpredictable logging behavior
2025-07-19 16:07:52 +02:00
Magnus Müller
ec43c5c81e Fix misleading extension log message
- Track actual loaded extension names instead of hardcoding them
- Log message now accurately reflects which extensions loaded successfully
- Count and names will match even if some extensions fail to load
- Fixes bug where log mentioned 'Reader View' which was removed from extension list
2025-07-19 16:06:53 +02:00
Magnus Müller
7b87d3324f Only keep ClearURLs 2025-07-19 16:04:19 +02:00
Magnus Müller
42753241cf Add ClearURLs and Reader View extensions for improved extraction
- Add ClearURLs for automatic URL tracking parameter removal
- Add Reader View (Mozilla Readability-based) for content extraction
- Reader View requires manual activation but can be triggered via Playwright
- Update descriptions to reflect automation-optimized extension set
- These additions improve content extraction capabilities while maintaining clean automation
2025-07-19 16:00:35 +02:00
Magnus Müller
1a522b2251 Simplify to essential extensions only to prevent welcome tabs
- Remove Decentraleyes (nice-to-have performance boost, but uBlock Origin covers most tracking)
- Remove ClearURLs (URL cleaning, but not critical for automation)
- Remove FastForward (likely causing welcome tabs, most automation doesn't hit link shorteners)
- Keep only uBlock Origin (essential ad/tracker blocking) and I still don't care about cookies (essential cookie banner handling)
- Set default back to True since these 2 core extensions should not cause welcome tab issues
- Update descriptions to reflect minimal essential set

This gives maximum automation reliability with minimal extension overhead.
2025-07-19 15:56:32 +02:00
Magnus Müller
0ea8ccbff6 Add Chrome flags to suppress extension welcome tabs
- Add --disable-extensions-http-throttling to prevent extension communication issues
- Add --disable-extension-activity-logging to reduce extension logging overhead
- Add --extensions-on-chrome-urls to allow extensions on chrome:// pages
- Add --disable-default-apps to prevent default app welcome screens

These flags help prevent extensions from opening welcome/onboarding tabs that interfere with automation.
2025-07-19 15:53:19 +02:00
Magnus Müller
76adb03633 Merge remote-tracking branch 'origin/main' into feature/optimize-browser-extensions 2025-07-19 15:47:01 +02:00
Magnus Müller
296219f2ef staging (#2491)
Auto-generated PR for branch: staging
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Added support for default browser extensions (uBlock Origin and "I still
don't care about cookies") and improved browser state recovery,
performance, and debugging.

- **New Features**
- Option to enable default ad blocker and cookie banner extensions, with
automatic download and loading.
- Improved browser state recovery with a unified
`get_browser_state_with_recovery` method.
  - Parallelized browser setup tasks for faster startup.
  - Added more detailed debug logging to key browser and DOM methods.

- **Refactors**
- Reduced unnecessary screenshot captures to speed up multi-action
flows.
- Improved error handling and waiting logic during browser actions and
setup.
  - Cleaned up unused code and optimized extension management.

<!-- End of auto-generated description by cubic. -->
2025-07-19 15:43:29 +02:00
Magnus Müller
e0da77b545 Disable extensions by default 2025-07-19 15:41:04 +02:00
Magnus Müller
c3f2fbba1e True extension 2025-07-19 11:48:27 +02:00
Magnus Müller
0d18b198be Merge branch 'main' into staging 2025-07-19 11:47:41 +02:00
Magnus Müller
65f4c01bce Disable extension by default comparison 2025-07-19 11:02:21 +02:00
Nick Sweeting
e75be4f6bb fix linter 2025-07-18 23:03:40 -07:00
Nick Sweeting
845e83099b Update claude.yml 2025-07-19 02:03:30 -04:00
Magnus Müller
48b1c5d202 No extension 2025-07-19 03:25:37 +02:00
Magnus Müller
59992e236a Optimize browser extensions for automation
- Update 'I don't care about cookies' to 'I still don't care about cookies' (community-maintained)
- Add Decentraleyes for CDN tracking protection and performance
- Add ClearURLs for automatic URL tracking parameter removal
- Add FastForward for automatic link shortener bypass
- Remove Privacy Badger (requires learning over multiple sessions)
- Remove 'Don't track me Google' (redundant with other extensions)
- Remove 'Block image' (requires manual activation, unusable in automation)

Final extension set: 5 fully automatic extensions optimized for single-session browser automation
2025-07-19 02:29:31 +02:00
Magnus Müller
05fe25a454 Change cookie extension to i still dont care about cookies 2025-07-19 02:13:12 +02:00
Magnus Müller
c6447b745d Merge branch 'speed-improvements' into staging 2025-07-19 02:10:04 +02:00
Magnus Müller
b24f111f7e Remove _wait_for_page_and_frames_load 2025-07-19 02:08:25 +02:00
Magnus Müller
f347c8b472 Refactor DOM stability check in BrowserSession to use element count for stability verification, reducing max wait time and improving reliability of checks. 2025-07-19 01:49:45 +02:00
Magnus Müller
b7d29f54e8 Wait inside multiact 2025-07-19 01:40:41 +02:00