Commit Graph

867 Commits

Author SHA1 Message Date
EnzoFanAccount 1a90fc4d60 Add example script 2025-05-23 07:43:55 -03:00
Nick Sweeting 5410fd5664 improve google sheets example prompt 2025-05-23 03:31:58 -07:00
Nick Sweeting 22bf1c30c6 Merge branch 'main' into bug-bash 2025-05-23 01:40:58 -07:00
Nick Sweeting 9032787752 add stagehand back and forth example 2025-05-23 01:37:36 -07:00
Nick Sweeting f6ca4e13a3 massively improve logging experience and add loading animation on browser startup 2025-05-23 00:48:52 -07:00
Nick Sweeting 6b8360c475 better logging 2025-05-22 23:17:21 -07:00
Nick Sweeting 187641f695 add support for nested sensitive_data 2025-05-22 04:58:23 -07:00
Nick Sweeting b92fffae2e fix google sheets example 2025-05-22 02:30:43 -07:00
Magnus Müller e16653b150 Example/simple (#1724)
### Example Task Update:
*
[`examples/simple.py`](diffhunk://#diff-7fc9f71ba0fe3a9a223587549462f41d40b57cb9d9097a0349eb7abeb9d04e39L20-R20):
Modified the example task description to specify finding the cheapest
one-way flight in 3 weeks, making it more realistic and time-relative.
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Updated the example task to search for the cheapest one-way flight in 3
weeks, added a default browser profile fallback, and ignored temp
directories in git.

<!-- End of auto-generated description by cubic. -->
2025-05-21 13:10:49 +02:00
Magnus Müller 9021e83c15 Update advanced_search.py to change include_in_memory parameter to False in ActionResult and modify task description for concurrent processing of search queries. 2025-05-21 13:02:22 +02:00
Magnus Müller 18c13bda26 Refactor advanced_search.py to use SERP API for web search and improve error handling for API keys. Added logging for debugging and updated agent initialization with BrowserProfile. 2025-05-21 12:20:51 +02:00
Magnus Müller d401cc77ab Update task description in simple.py to specify a one-way flight search in 3 weeks instead of a round trip on a specific date. 2025-05-21 12:02:07 +02:00
yasithdev b491c87144 fix few bugs due to api changes, conditional logics, and null type-checks 2025-05-21 01:38:04 -05:00
Nick Sweeting 9190a908a5 stealth comments 2025-05-20 06:09:28 -07:00
Nick Sweeting c6504da9ea more stealth browser launch tuning 2025-05-20 06:05:35 -07:00
Nick Sweeting 2f002b4c22 rename session.py profile.py, fix stealth example, fix tests 2025-05-20 05:34:47 -07:00
Nick Sweeting 63382d8bfc update examples to use new BrowserProfile and BrowserSession 2025-05-20 02:32:43 -07:00
yrk 3b392581d8 modify some details 2025-05-14 11:25:02 +08:00
Nick Sweeting edb4d760a8 fix path level 2025-05-13 17:41:42 -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
yrk bdc60097aa Add ModelScope example and documentation 2025-05-13 17:31:28 +08:00
Nick Sweeting 96682d8910 switch back from patchright to playwright until issues are resolved 2025-05-09 18:14:07 -07:00
2pac 384fc3fde0 chore: Bedrock optional dependencies 2025-05-05 21:39:48 +02:00
Nick Sweeting 23252192a0 remove non-functional group tabs code 2025-05-04 19:40:27 +08: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 4b1e15d8bd remove BrowserWindowContextSize in favor of window_width and window_height attrs 2025-05-03 15:32:42 +08: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
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
Nick Sweeting fa461585f1 Merge pull request #1456 from Anirudha619/fix-test_vision 2025-04-26 02:28:04 -07:00
Anirudha619 2cea6aef79 run pre-commit 2025-04-25 23:42:23 +05:30
paul2048 e2abbe7f3c rename the Ollama example file 2025-04-22 14:24:36 +01:00
Nick Sweeting ca8aed227a Merge branch 'main' into chore/replace-playwright-with-patchright 2025-04-22 01:58:45 -07:00
lynn 192b42ff79 chore: replace playwright with patchright 2025-04-22 15:43:01 +08: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
Nick Sweeting 8b165d5997 fix ruff errors in other files 2025-04-21 10:56:06 -07:00
Nick Sweeting ae3bfadc0b Merge pull request #1424 from dha-aa/add-grok-model-docs-and-example 2025-04-21 10:12:31 -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
dha-aa 9fbfd91d28 add grok.py in examples/models 2025-04-19 00:09:37 +00:00
Daniel Fang 72f3d347fb Update azure_openai.py 2025-04-18 16:34:20 +10:00
Nick Sweeting 49ef4fca50 Merge branch 'main' into fix-web-voyager-example 2025-04-16 16:04:08 -07:00
Nick Sweeting fd87ad3166 Merge pull request #1348 from azhengzz/fix-deepseek-expamle 2025-04-16 14:59:05 -07:00