Commit Graph

95 Commits

Author SHA1 Message Date
Alezander9
faf06f8edb remove broken example file 2025-07-05 20:55:12 -07:00
Alezander9
7b5ea73b4d fix ruff errors 2025-07-05 20:48:37 -07:00
mertunsall
220f0bc994 update models to gpt-4.1 2025-07-05 10:32:49 +02:00
mertunsall
8880a2db37 add sensitive data example 2025-07-02 10:40:58 +02:00
mertunsall
6ab1093627 fix more tests 2025-06-29 23:18:10 +02:00
mertunsall
32569460b4 no screenshot in the beginning blank page 2025-06-27 15:08:01 +02:00
Gregor Žunič
7a10ae0c96 Squashed commit langchain to native 2025-06-24 12:26:55 +02:00
Nick Sweeting
3209fd95f7 lint and hint fixes 2025-06-21 06:07:21 -07:00
Nick Sweeting
aad78d93ab more type hint fixes 2025-06-21 05:44:49 -07:00
Nick Sweeting
f878b8f07c type hint fixes 2025-06-21 05:16:02 -07: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
8a9b69420c Merge branch 'main' into more-fixes 2025-06-13 17:10:40 -07:00
Nick Sweeting
531527b83f fix parallel_agents example 2025-06-13 16:52:44 -07:00
Saurav Panda
4b0cdec738 fix: remove non-functional save_recording_path parameter
fix: remove non-functional save_recording_path parameter

- Remove save_recording_path field from BrowserProfile class
- Remove documentation for save_recording_path parameter
- Add migration note directing users to use record_video_dir instead

The save_recording_path parameter was defined in BrowserProfile but never actually
processed by the browser launch methods. Users should use the standard Playwright
record_video_dir parameter instead, which is properly implemented and functional.

Fixes user reports of video recording not working when using save_recording_path.
2025-06-10 19:07:44 -07:00
Nick Sweeting
767a75e2bf rename downloads_dir to downloads_path 2025-06-05 02:17:57 -07:00
Nick Sweeting
3c1e2a59d1 remove save_playwright_script_path entirely 2025-06-05 02:06:23 -07:00
Nick Sweeting
ff791997af Fix available vector providers, local logic, and example (#1858) 2025-05-31 17:00:04 -07:00
EnzoFanAccount
6477fca147 Fix vector providers and example 2025-05-29 20:45:06 -03:00
Nick Sweeting
a85ae8ca3c merge save_downloads_path and downloads_dir duplicate options 2025-05-29 14:51:21 -07:00
Nick Sweeting
d546c3d8bd move multiple agents example into browser dir 2025-05-27 22:31:32 -07:00
Nick Sweeting
f19adf9bb3 remove dead code, cleanup examples and tests 2025-05-26 18:37:52 -07:00
Nick Sweeting
241b4e076b fix examples issues 2025-05-26 03:43:17 -07:00
Nick Sweeting
ef49ec1682 more examples updating 2025-05-25 14:44:29 -07:00
Nick Sweeting
a5b99f9b7f fix re-use of BrowserSession between agents by copying on Agent init 2025-05-25 06:38:43 -07:00
Nick Sweeting
2328986236 fix BrowserSession init on reuse case 2025-05-25 06:00:25 -07:00
2pac
ac1e8f5471 ruff format 2025-05-24 19:35:25 +02:00
2pac
dd23030bc5 cubic comments 2025-05-24 19:33:37 +02:00
2pac
9200d1f197 ran ruff 2025-05-24 19:27:44 +02:00
2pac
6a5b6ead1b fix: Binding already registered issue on follow-up task 2025-05-24 19:26:21 +02:00
Enzo Biondo
2c7b718767 Merge branch 'main' into docs/document-memory-customizability 2025-05-23 09:04:13 -03:00
EnzoFanAccount
b303568164 lint example 2025-05-23 07:56:04 -03:00
EnzoFanAccount
1a90fc4d60 Add example script 2025-05-23 07:43:55 -03:00
Nick Sweeting
187641f695 add support for nested sensitive_data 2025-05-22 04:58:23 -07:00
Nick Sweeting
63382d8bfc update examples to use new BrowserProfile and BrowserSession 2025-05-20 02:32:43 -07:00
Nick Sweeting
f17cf4de75 linter fixes 2025-05-13 17:25:08 -07:00
Nick Sweeting
3e66046046 linter 2025-05-13 17:18:50 -07:00
Nick Sweeting
bfcd8a0140 make examples imports more consistent 2025-05-13 17:18:09 -07:00
Nick Sweeting
d08b402101 finish updating last few locations where nested window_size was used 2025-05-04 00:29:29 +08:00
Nick Sweeting
2be4ba4f70 more pyupgrade changes 2025-05-02 20:50:21 +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
Nick Sweeting
51f09b85aa Merge branch 'main' into feat/playwright-script-generation 2025-04-28 20:11:41 -07:00
Christian Clauss
0f0d7b5c39 await asyncio.sleep(0.1) 2025-04-22 08:46:34 +02:00
Christian Clauss
fc59265654 ruff rule FAST002 FastAPI dependency without 'Annotated' 2025-04-22 08:10:49 +02:00
Nick Sweeting
02fb682d04 Merge pull request #1310 from cclauss/ruff_check_--select=ASYNC 2025-04-21 15:10:57 -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
Christian Clauss
fb3282527d Detect blocking synchronous commands in asyncio code 2025-04-21 22:30:43 +02: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
PaperBoardOfficial
ae4a423e3d lint 2025-04-01 08:14:15 +05:30
Nick Sweeting
298db41c4a Merge branch 'main' into drag_drop 2025-03-31 19:33:28 -07:00