Commit Graph

6751 Commits

Author SHA1 Message Date
Magnus Müller
6944d4a533 Null checks 2025-10-05 20:36:23 -07:00
Magnus Müller
3aaafa7bf8 Remove required from prompt 2025-10-05 20:30:36 -07:00
Magnus Müller
038ab1c8ce Linter 2025-10-05 20:05:51 -07:00
Magnus Müller
fc36b6f8b4 System prompt flash 2025-10-05 19:59:44 -07:00
Magnus Müller
3eed1345c5 Increase descriptions 2025-10-05 19:41:29 -07:00
Magnus Müller
6d941a5dcc Rename Clear existing to clear 2025-10-05 19:32:39 -07:00
Magnus Müller
36bbf1ee23 Update outdated function names 2025-10-05 19:30:10 -07:00
Magnus Müller
473dab2874 Linter 2025-10-05 19:23:34 -07:00
Magnus Müller
324ac74204 Linter 2025-10-05 19:21:12 -07:00
Magnus Müller
b53a7c116a Update outdated function names 2025-10-05 19:12:52 -07:00
Magnus Müller
a3a811e3be Remove create_gemini_optimized_schema 2025-10-05 19:03:10 -07:00
Magnus Müller
6381d6794f Remove create_gemini_optimized_schema 2025-10-05 19:03:05 -07:00
Magnus Müller
586dcc0a82 Input index can be 0 2025-10-05 19:00:33 -07:00
Magnus Müller
8023733bb9 Update test 2025-10-05 15:24:54 -07:00
Magnus Müller
1b6b674796 Update sensitive data 2025-10-05 15:24:47 -07:00
Magnus Müller
84b07cce8c Update parameter dict 2025-10-05 15:24:37 -07:00
Magnus Müller
86a5bbe103 Update test 2025-10-05 15:24:23 -07:00
Magnus Müller
8daca53589 Fix linter 2025-10-05 15:11:40 -07:00
Magnus Müller
90d414042a Update docs 2025-10-05 15:09:35 -07:00
Magnus Müller
47bf973285 Default value for extract_links 2025-10-05 13:46:31 -07:00
Magnus Müller
0d731cfb26 Replace tool names like go_to_url wtih navigate 2025-10-05 13:32:16 -07:00
Magnus Müller
f0acb6b338 Replace tool names like go_to_url wtih navigate 2025-10-05 13:31:38 -07:00
Magnus Müller
50f97000e4 file parameter naming 2025-10-05 13:21:14 -07:00
Magnus Müller
ae3b2a5926 Remove descripitons 2025-10-05 13:06:19 -07:00
Magnus Müller
1248c07e83 Remove descripitons 2025-10-05 13:02:43 -07:00
Magnus Müller
968414b982 Compress gemini schema 2025-10-05 12:48:25 -07:00
Magnus Müller
ad9b174762 Fix param 2025-10-05 12:18:21 -07:00
Magnus Müller
18b7dd95a4 Fix param 2025-10-05 12:16:13 -07:00
Magnus Müller
55d10605fd Shorter tools 2025-10-05 11:59:12 -07:00
Magnus Müller
7b995b7fc1 Refactor action field descriptions in AgentOutput models
- Removed redundant description from action field in AgentOutput and its subclasses.
- Updated action extraction documentation in Tools to clarify usage and limitations.
- Enhanced search_engine field description in SearchAction for better clarity on default behavior.
2025-10-05 11:29:19 -07:00
Magnus Müller
22acf58424 Shorter tools 2025-10-05 11:22:54 -07:00
Magnus Müller
9a655e56c5 Shorter tool description 2025-10-05 11:09:15 -07:00
Magnus Müller
50fb58284a short-systemprompt 2025-10-05 00:00:28 -07:00
Magnus Müller
e2168a4db0 bump-anthropic-version-for-linter (#3241)
Auto-generated PR for: bump-anthropic-version-for-linter

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Bumps `anthropic` dependency to `>=0.68.1,<1.0.0` in `pyproject.toml`.
> 
> - **Dependencies**:
> - Update `anthropic` version constraint in `pyproject.toml` from
`>=0.58.2,<1.0.0` to `>=0.68.1,<1.0.0`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3bbdcb1e97. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-04 13:05:59 -07:00
Magnus Müller
2fac898384 Merge branch 'main' into bump-anthropic-version-for-linter 2025-10-04 13:05:52 -07:00
Magnus Müller
a75547626e screenshot-tool (#3240)
Auto-generated PR for branch: screenshot-tool

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds an auto vision mode that includes screenshots only when requested
via a new take_screenshot action, updating agent logic, prompts,
telemetry, and docs.
> 
> - **Vision behavior**:
> - Add `use_vision` mode `"auto"` (default) across `Agent`,
`MessageManager`, `AgentSettings`, and telemetry; supports `bool |
Literal['auto']`.
> - Conditionally include `browser_state_summary.screenshot` only when
requested via action metadata `{"include_screenshot": true}` or when
`use_vision=True`; pass `effective_use_vision` to `.get_user_message()`.
> - Exclude `take_screenshot` tool from `Tools` when `use_vision=False`.
> - **New tool**:
> - Add `take_screenshot` action in `browser_use/tools/service.py` that
returns metadata to request a screenshot in the next observation.
> - **Prompts**:
> - Update system prompts to note `browser_vision` screenshot is present
only after `take_screenshot`; instruct to use `take_screenshot` when
unsure.
> - **Telemetry**:
> - Update `AgentTelemetryEvent.use_vision` type to `bool |
Literal['auto']`.
> - **Docs**:
> - Update `use_vision` parameter docs (default `"auto"` and behavior)
and add `take_screenshot` to available tools.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8ee687fd2d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-04 13:05:46 -07:00
Magnus Müller
3bbdcb1e97 bump-anthropic-version-for-linter 2025-10-04 13:05:30 -07:00
Magnus Müller
8ee687fd2d Merge branch 'main' into screenshot-tool 2025-10-04 13:01:12 -07:00
Magnus Müller
50f2bd578b added option to interactive elements (#3239)
### 🐛 Summary
Fixes [#3238](https://github.com/browser-use/browser-use/issues/3238)
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Added role="option" to the interactive roles in the DOM serializer so
these nodes are kept instead of excluded. This fixes missing bounding
boxes for option-like items in listboxes/selects.

<!-- End of auto-generated description by cubic. -->
2025-10-04 13:00:45 -07:00
Magnus Müller
d014474998 Linter 2025-10-04 12:59:11 -07:00
Magnus Müller
d3abbcb2c7 Include use_vision auto 2025-10-04 12:56:40 -07:00
Prakhar Jain
e9e19f785d added option to interactive elements 2025-10-04 20:46:41 +05:30
Magnus Müller
889efd3ee2 System prompt 2025-10-03 23:55:19 -07:00
Magnus Müller
461bce7b22 Request screenshot 2025-10-03 23:55:15 -07:00
Magnus Müller
a36cdf4c56 less-quality-image (#3235)
Auto-generated PR for: less-quality-image

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Replaces PNG with JPEG for screenshots and image data URLs across
capture, messaging, serializers, tests, and examples to reduce payload
size.
> 
> - **Images & Screenshots**:
> - Capture screenshots as JPEG (`quality=60`) via `ScreenshotWatchdog`
and embed as `data:image/jpeg;base64,...` in `CreateAgentStepEvent`.
> - Agent prompts now attach screenshots using JPEG URLs and media
types.
> - **LLM Serializers**:
>   - Google: decode data URLs and send images as `image/jpeg` bytes.
> - Anthropic: parse base64 URLs; default unrecognized media type to
`image/jpeg`.
>   - Ollama: parse base64 data URLs labeled as JPEG.
> - **Message Types**:
> - `ImageURL.media_type` default changed from `image/png` to
`image/jpeg`.
> - **Tests & Examples**:
> - Gemini image test and `add_image_context` example updated to
generate/use JPEG data URLs and media types.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4a78c64dcf. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-03 21:44:19 -07:00
Magnus Müller
4a78c64dcf Update default media type to JPEG in messages and serializer 2025-10-03 21:33:07 -07:00
Magnus Müller
a8e6af254e Switch all to jpeg 2025-10-03 21:32:47 -07:00
Magnus Müller
ee29003fa5 less-quality-image 2025-10-03 21:10:10 -07:00
Mert Unsal
9cfd94aae5 Make actions shorter, default to gemini-flash-latest, fix tests (#3233)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Simplified tool action descriptions and naming to make actions shorter
and easier to use. Renamed a few actions/params and set a default for
scrolling to reduce boilerplate without changing behavior.

- **Refactors**
- Shorter, clearer descriptions across actions (search, go_to_url,
click, input_text, upload_file, switch_tab, scroll, scroll_to_text,
execute_js).
- Renamed actions: click_element_by_index → click,
upload_file_to_element → upload_file.
  - Renamed ClickElementAction param: while_holding_ctrl → ctrl.
  - Set ScrollAction.num_pages default to 1.0.

- **Migration**
- Update ClickElementAction payloads to use ctrl instead of
while_holding_ctrl.
- If actions are referenced by function name, switch to click and
upload_file.
  - Scroll now defaults to one page when num_pages is omitted.

<!-- End of auto-generated description by cubic. -->
2025-10-04 02:25:21 +02:00
mertunsall
b154d906c7 fix tests 2025-10-04 02:15:32 +02:00