Commit Graph

1452 Commits

Author SHA1 Message Date
mertunsall 03c80a7493 Reduce max actions per step in Agent class from 10 to 1 for improved control over action execution. 2025-06-19 16:34:34 +02:00
Nick Sweeting f463a9383c init and config fixes 2025-06-19 07:20:43 -07:00
mertunsall 9bc619877c small change to system prompt 2025-06-19 15:20:37 +02:00
mertunsall 129590672d small update to descriptions 2025-06-19 14:09:06 +02:00
Nick Sweeting 778536a3ce move all sync code into sync dir 2025-06-19 01:28:22 -07:00
Nick Sweeting ccd11e26f5 remove unneeded event_type fields 2025-06-19 01:19:30 -07:00
Magnus Müller 0b6ebea431 Merge branch 'main' into mert/new_everything 2025-06-19 09:49:43 +02:00
Yasith Jayawardana e2e11966d3 Merge branch 'main' into typing-improvements 2025-06-18 21:20:47 -04:00
mertunsall 927b286d71 Handle sensitive data in agent state and handle user request being visible in agent history in case of update 2025-06-18 15:53:35 +02:00
mertunsall 463f147e6a Refactor add_new_task method in service.py to update agent history description with new user requests, removing the previous message creation logic. 2025-06-18 14:30:04 +02:00
mertunsall bbc8d26f63 - Updated ActionResult to include an attachments field for displaying files in the done message.
- Enhanced logging in the Agent class to inform users about available attachments after task completion.
- Revised system prompt guidelines to clarify the use of text and files_to_display in the done action.
2025-06-18 14:24:27 +02:00
mertunsall 600febfc63 Add guideline for format specification in done action of system prompt 2025-06-18 13:19:04 +02:00
Nick Sweeting 474476f0ae switch to external bubus lib 2025-06-18 01:41:16 -07:00
Nick Sweeting f35ea5be4d fixes 2025-06-17 22:38:59 -07:00
Nick Sweeting d0ec528802 fixed events 2025-06-17 22:38:59 -07:00
mertunsall b8621e1089 Improve logging and action result handling: update messages for new elements detection and adjust success flag in action results so that agent doesn't stop. 2025-06-17 18:58:17 +02:00
mertunsall a0e60a1503 Update prompts and service files: increase max clickable elements length and enhance file writing instructions to specify allowed extensions. 2025-06-17 16:01:21 +02:00
mertunsall f7a8e99f13 Enhance user guidance in data extraction: add reminder to save information during read state and refine instructions for structured data extraction to clarify usage and file saving practices. 2025-06-17 15:10:07 +02:00
mertunsall 95fcd75832 Refine system prompt instructions: clarify transient data display conditions, update terminology for data extraction, and emphasize the importance of saving information during the read state. 2025-06-17 14:51:42 +02:00
mertunsall 2a7985df5f Update prompts.py to enhance user guidance in scrolling and data extraction, improve formatting of agent and browser state descriptions, and streamline the structure of the output for better readability. 2025-06-17 14:49:22 +02:00
mertunsall 34d2894d56 Refactor MessageManager initialization: remove unnecessary agent history description, adjust message formatting, and clean up commented-out code for clarity. 2025-06-17 14:49:03 +02:00
mertunsall 0c34c399db Merge branch 'main' into mert/new_everything 2025-06-17 11:19:06 +02: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 d728148200 tweak logger emoji 2025-06-14 01:28:47 -07:00
Nick Sweeting 66fbb8b282 Merge branch 'main' into eventbus 2025-06-14 01:19:15 -07:00
Nick Sweeting b3ed9cbbba Update browser_use/agent/cloud_events.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-06-14 03:42:42 -04:00
Nick Sweeting 3c65acf225 improve conversation saving 2025-06-13 17:02:29 -07:00
Nick Sweeting 582c039c15 make save_context and other file operations async, setup traces and other dirs on startup 2025-06-12 18:38:12 -07:00
Magnus Müller e8f2467ab2 Refactor action result handling in message_manager and controller services
Updated the logic for processing action results in service.py files. Changed the conditional check for memory in message_manager to use 'elif' for clarity. In controller, modified the return statement to handle errors more effectively by returning an ActionResult with the error message instead of memory, improving error logging and debugging capabilities.
2025-06-11 11:36:06 +02:00
Nick Sweeting 656a129fba include original LLM status_code in raised exception 2025-06-10 05:33:08 -07:00
Nick Sweeting 9a08e3b031 add better logging with reference ids for each object 2025-06-10 02:10:57 -07:00
Nick Sweeting fd4d7ea07a use llm.ainvoke non-blocking async call 2025-06-10 02:03:02 -07:00
Nick Sweeting a8eb2bac2f make markdownify non-blocking async 2025-06-10 02:01:16 -07:00
Nick Sweeting 023c702f4d pass logger object down the chain to sub-objects for re-use 2025-06-10 00:38:38 -07:00
Nick Sweeting 930a7aa4de use self.logger for timing log lines 2025-06-10 00:24:50 -07:00
Magnus Müller 18a97acf76 Enhance agent state representation and update system prompt documentation
Refactored the agent state output in prompts.py to include XML-like tags for user requests, file system details, and state descriptions, improving structure and readability. Updated system prompt documentation to clarify memory tracking instructions, emphasizing the importance of counting pages visited and items found for better progress tracking.
2025-06-10 08:51:04 +02:00
Magnus Müller 1875c34416 Refactor argument naming and enhance success message in service.py
Updated the key from 'arguments' to 'args' for consistency in the tool call structure. Revised the success message to specify that data was written to 'todo.md' and 'github.md', improving clarity and user feedback.
2025-06-10 08:04:02 +02:00
Magnus Müller 1c7b41eacd Update argument naming and message content in service.py
Changed the key 'args' to 'arguments' for clarity in the tool call structure. Additionally, updated the success message to reflect that data was written to both 'todo.md' and 'github.md', improving the accuracy of feedback provided to users.
2025-06-10 07:59:35 +02:00
Magnus Müller c0df2feb11 Enhance system prompt and message formatting in service.py
Updated the system prompt documentation to clarify user request handling and added specific instructions for open-ended tasks. Modified message formatting in service.py to include XML-like tags for context, sensitive data, and user requests, improving structure and readability of messages. This change aims to enhance the clarity of communication between the agent and users.
2025-06-10 07:51:12 +02:00
Nick Sweeting 1c7eb2b849 add some newlines in logging output to visually separate steps 2025-06-09 22:05:37 -07:00
Nick Sweeting f0df1f195f tweak mem0 warning 2025-06-09 22:04:54 -07:00
Nick Sweeting 64e2476f22 gracefully degrade when mem0 db is corrupt 2025-06-09 21:00:04 -07:00
Nick Sweeting 39bc9327f7 silence faiss-cpu swig deprecation warnings 2025-06-09 20:34:45 -07:00
Nick Sweeting 5a70f1f1ce dont reset BrowserSession foreground page on Agent.__init__ 2025-06-09 18:51:30 -07:00
Nick Sweeting 0cd31c8b2a throw a hard error requiring BrowserSession to be initialized before passing it in if keep_alive=True 2025-06-09 18:35:44 -07:00
Magnus Müller 8481e2cc04 Add control character handling in JSON extraction utility
Enhance the `extract_json_from_model_output` function to fix control characters in JSON strings before parsing. Introduced a new helper function, `_fix_control_characters_in_json`, to ensure valid JSON formatting by escaping control characters within string values. This improves the robustness of JSON parsing and error handling in the utility.
2025-06-09 23:11:46 +02:00
Magnus Müller d998e95ac0 Improve error handling in LLM API calls by appending exception messages to LLMException. This change enhances the clarity of error logs in both utils.py and service.py, facilitating better debugging and traceability. 2025-06-09 22:47:03 +02:00
Magnus Müller db74f1ade3 Refactor response logging in service.py to improve emoji representation based on evaluation state. Updated checks to be case-insensitive for 'success' and 'failure', enhancing robustness in response handling. 2025-06-09 22:19:25 +02:00
Magnus Müller 7c038ae944 Update system prompt documentation to improve clarity and consistency in reasoning patterns. Standardized references to user requests and enhanced instructions for evaluating previous actions and preparing tool calls. Emphasized the importance of tracking progress and verifying completeness before finalizing actions. 2025-06-09 22:19:20 +02:00
Magnus Müller 7298617f02 Update system prompt documentation to enhance clarity and structure. Revised definitions for User Request, Agent State, and Browser State, and emphasized the importance of user satisfaction in task completion. Improved readability of action and reasoning rules to facilitate better understanding of user interactions. 2025-06-09 22:02:48 +02:00