Commit Graph

6921 Commits

Author SHA1 Message Date
Magnus Müller
a50f2ca5b3 Small token changes 2025-10-12 13:09:10 -07:00
Magnus Müller
ac9301b0d6 Reduce string for todo.md 2025-10-12 13:08:54 -07:00
Magnus Müller
301fab0726 Reduce tokens for extract 2025-10-12 13:08:44 -07:00
Magnus Müller
1ac613ca0e Scroll return reduction 2025-10-12 13:08:22 -07:00
Magnus Müller
75b4fe58ba Result:\n to Result\n because :\ would be the token 2025-10-12 13:08:14 -07:00
Magnus Müller
d1d313f0f4 Remove </step> - 3 tokens x number of steps taken 2025-10-12 13:08:05 -07:00
Magnus Müller
d2bec91736 model-eval-google (#3312)
Auto-generated PR for branch: model-eval-google

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is
generating a summary for commit
7a463675ff. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-12 00:50:40 -07:00
Magnus Müller
7a463675ff Update LLM integration in evaluate_tasks.py to use ChatGoogle instead of ChatOpenAI for agent and judge initialization 2025-10-12 00:50:22 -07:00
Magnus Müller
997256de9f start-time-improvement (#3311)
Auto-generated PR for branch: start-time-improvement

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Eliminates the 200ms sleep after `CreateAgentSessionEvent` so
`CreateAgentTaskEvent` is dispatched immediately, improving startup
time.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
fb9e192c01. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-12 00:46:49 -07:00
Magnus Müller
fb9e192c01 Revert "Do not wait for start event, this runs in the background and will be awaited in downstream actions"
This reverts commit 96d17f3bc9.
2025-10-12 00:28:24 -07:00
Magnus Müller
e34c281fdb Revert "Remove wait"
This reverts commit f6c091f802.
2025-10-12 00:28:17 -07:00
Magnus Müller
f6c091f802 Remove wait 2025-10-12 00:10:41 -07:00
Magnus Müller
96d17f3bc9 Do not wait for start event, this runs in the background and will be awaited in downstream actions 2025-10-12 00:07:06 -07:00
Magnus Müller
1f1df8b9bb Remove brief delay in agent session initialization to streamline task dispatching 2025-10-11 23:46:16 -07:00
Magnus Müller
d507216377 fix-output-format (#3310)
Auto-generated PR for branch: fix-output-format

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Enhances task initialization by appending the provided output model
JSON schema to the task description for clearer LLM guidance.
> 
> - **Agent (`browser_use/agent/service.py`)**:
> - **Task Initialization**: `self.task` now includes output schema
details via `_enhance_task_with_schema(...)` when `output_model_schema`
is provided.
> - **New Helper**: `_enhance_task_with_schema` generates
`model_json_schema()`, appends its JSON to the task text, and logs debug
on failures.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f795d8e788. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-11 23:26:31 -07:00
Magnus Müller
f795d8e788 Merge branch 'main' into fix-output-format 2025-10-11 23:21:54 -07:00
Magnus Müller
938d89ce30 remove-activateTarget (#3309)
Auto-generated PR for branch: remove-activateTarget

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Removes redundant CDP Target.activateTarget calls, simplifies
multi_act signature, and updates session recovery/logging across
agents/watchdogs.
> 
> - **CDP/Session Management**:
> - Remove `Target.activateTarget` calls in
`browser_use/browser/session.py` (`get_or_create_cdp_session`) and
related flows.
> - On watchdog handler errors, recreate CDP sessions with new sockets
instead of re-foregrounding targets; adjust log messages in
`watchdog_base.py`.
> - **Actions/Watchdogs**:
> - Strip `Target.activateTarget` calls from scroll/type/click paths in
`default_action_watchdog.py` and `actor/mouse.py`.
> - Minor log message tweaks (remove checkmark on success) in watchdog
base.
> - **Agent API**:
> - Simplify `Agent.multi_act` signature to `multi_act(self, actions:
list[ActionModel])` and update initial actions invocation accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7a55f6e407. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-11 23:21:48 -07:00
Magnus Müller
02574dec45 Add output to task 2025-10-11 23:21:20 -07:00
Magnus Müller
7a55f6e407 Merge branch 'main' into remove-activateTarget 2025-10-11 23:07:05 -07:00
Magnus Müller
6568a4061f Remove activateTarget 2025-10-11 18:28:24 -07:00
Magnus Müller
87fadd0bca Remove check_for_new_elements 2025-10-11 18:26:52 -07:00
Magnus Müller
de72aeb622 remove-multiact-hash-check (#3308)
Auto-generated PR for branch: remove-multiact-hash-check

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is
generating a summary for commit
3d92c2061a. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-11 18:25:26 -07:00
Magnus Müller
3d92c2061a Default wait between actions 0.25 2025-10-11 17:27:46 -07:00
Magnus Müller
d42394b2b1 remove-multiact-hash-check 2025-10-11 17:27:35 -07:00
Magnus Müller
dc41244c99 get-live-coords (#3307)
Auto-generated PR for branch: get-live-coords

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds live DOM geometry retrieval and occlusion checks to
clicks/inputs, switches highlights to non-blocking, and simplifies
watchdog logging.
> 
> - **Interactions**:
> - Use live element coordinates via
`BrowserSession.get_element_coordinates()` (tries `DOM.getContentQuads`
→ `DOM.getBoxModel` → JS `getBoundingClientRect`).
> - Click flow: scroll into view first, compute rect via unified method,
pick visible quad, and if occluded fallback to JS `element.click()`.
> - Input flow: derive focus coordinates from unified method and skip
coordinate focus if occluded; improved error handling.
> - **Visual Highlights**:
> - `highlight_interaction_element` now resolves coordinates by
`backend_node_id`; tools trigger highlights with
`asyncio.create_task(...)` to be truly non-blocking.
> - **Logging**:
> - Watchdog base logs no longer use ANSI color codes; messages
simplified and standardized.
> - **APIs/Types**:
> - Import `DOMRect`; new
`BrowserSession.get_element_coordinates(backend_node_id, cdp_session)`
added and reused across interactions.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d6f646a450. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-11 17:25:36 -07:00
Magnus Müller
d6f646a450 Enable multiact break 2025-10-11 17:24:45 -07:00
Magnus Müller
53ec92fc36 Remove colours from watchdog logs 2025-10-11 17:21:56 -07:00
Magnus Müller
69220e2511 Remove multiact break 2025-10-11 16:54:41 -07:00
Magnus Müller
e30150acd7 Improve error 2025-10-11 16:54:16 -07:00
Magnus Müller
e643d3d5ae use contains for on top check 2025-10-11 16:45:38 -07:00
Magnus Müller
726301f3fc For input also make sure its the top element 2025-10-11 16:32:33 -07:00
Magnus Müller
ba11fff383 Check if element is top layer -> else js click 2025-10-11 16:25:14 -07:00
Magnus Müller
243a0523eb Merge branch 'main' into get-live-coords 2025-10-11 16:18:20 -07:00
Magnus Müller
dedd0db977 Not double parallel 2025-10-11 16:10:01 -07:00
Magnus Müller
8c4b7210fb Scroll first - then get coords 2025-10-11 16:05:37 -07:00
Magnus Müller
dc1901740e Input get coords update 2025-10-11 16:03:14 -07:00
Magnus Müller
40a591e4d2 Default function to get coords by backendnode id 2025-10-11 15:48:32 -07:00
Magnus Müller
48d8a8c0c4 remove-default-llm-fallback (#3306)
Auto-generated PR for branch: remove-default-llm-fallback

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is
generating a summary for commit
f531826119. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-11 15:38:58 -07:00
Magnus Müller
f531826119 Default to chatbrowseruse 2025-10-11 15:38:35 -07:00
Magnus Müller
72291dbc92 logging (#3304)
Auto-generated PR for branch: logging

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Refines agent and action logging (new pre-execution formatter,
promoted memory to info, simplified/trimmed messages) and adjusts token
usage and wait action logs.
> 
> - **Agent logging**:
> - Promote `🧠 Memory` to `info`; change task log emoji to `🎯` and
simplify startup text.
> - Trim noisy logs: remove some step/action completion/debug lines and
next-action summary output.
> - Refine failure handling: only reset `consecutive_failures` when > 0.
> - Add `_log_action` to format action logs with colored names/params;
integrate into `multi_act` and remove old inline formatting.
> - **Run loop/cleanup**:
> - Remove some debug logs (e.g., task completed, usage summary
collection, no remaining asyncio tasks).
> - **Tokens**:
>   - Remove per-model breakdown header line in usage summary logging.
> - **Tools**:
> - Update `wait` action message to "waited for X second(s)" (with
pluralization); log requested seconds instead of split +3s note.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a4e8eebdd1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-11 13:11:46 -07:00
Magnus Müller
a4e8eebdd1 Wait log 2025-10-11 12:53:43 -07:00
Magnus Müller
cb384f11b0 Logs 2025-10-11 12:51:33 -07:00
Magnus Müller
150e1e7a65 Number of actions 2025-10-11 12:43:31 -07:00
Magnus Müller
9d3de916b6 Action logging 2025-10-11 12:42:29 -07:00
Magnus Müller
6c8effee41 Improve logging 2025-10-11 12:15:09 -07:00
Magnus Müller
9b24f57463 Improve logging 2025-10-11 12:07:46 -07:00
Magnus Müller
5c4adb2903 Clean logs 2025-10-11 11:42:40 -07:00
Magnus Müller
db97772981 include todo in files (#3302)
Auto-generated PR for: include todo in files

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Stop excluding todo.md so it is now displayed and attached in
DoneAction outputs.
> 
> - **Done action attachments**:
> - Removed exclusion of `todo.md`; it will now be displayed and
included in `attachments` when provided.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f09004ebd5. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-11 10:53:23 -07:00
Magnus Müller
f09004ebd5 include todo in files 2025-10-11 10:52:44 -07:00
Gregor Žunič
6d3e276875 BU model pricing (#3299)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Adds custom model pricing and model name mapping to improve token cost
accuracy and usage logging.

- **New Features**
  - Custom pricing for browser-use/fast and browser-use/smart.
- Model mapping: gemini-flash-latest -> gemini/gemini-flash-latest for
LiteLLM pricing.
  - Pricing lookup checks custom data first, then mapped LiteLLM name.

- **Bug Fixes**
  - Usage tracking now logs with llm.name instead of llm.model.

<!-- End of auto-generated description by cubic. -->
2025-10-10 11:10:27 -07:00