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
Magnus Müller
cf37b1b656
Update system prompt documentation to clarify state definitions and improve readability. Adjusted descriptions for Agent State, Browser State, and Browser Rules to enhance understanding of user interactions and expectations.
2025-06-09 21:46:54 +02:00
Magnus Müller
543ee984b3
Improve error handling in JSON parsing by including the exception message in the ValueError. Added debug logging for successful model output parsing in utils.py to enhance traceability and debugging.
2025-06-09 18:47:37 +02:00
Magnus Müller
469e859647
Enhance JSON extraction in utils.py to support function parameter retrieval. Added logic to extract the value of 'params', 'args', 'kwargs', or 'parameters' when the 'function' key is present, improving the handling of model outputs.
2025-06-09 18:38:39 +02:00
Magnus Müller
574c2b23b6
Improve parameter logging in Agent class by truncating long values to 30 characters for better readability in action summaries.
2025-06-09 15:51:17 +02:00
Magnus Müller
90a4d858f1
Enhance JSON extraction in utils.py to handle stray characters and ensure valid JSON parsing. Added logic to count braces and trim content to the last valid JSON position if necessary, improving robustness in JSON handling.
2025-06-09 11:47:19 +02:00
Magnus Müller
52d4191ba9
Merge branch 'main' into mert/new_everything
2025-06-07 17:58:09 +02:00
Nick Sweeting
6d2826b37a
show 4 chars of id instead of 3
2025-06-05 23:28:53 -07:00
Nick Sweeting
48a63fa3af
whoops dont mix branch changes
2025-06-05 23:02:16 -07:00
Nick Sweeting
67b9a267db
force-start browser is is_connected is false when create_new_tab
2025-06-05 22:58:33 -07:00
Nick Sweeting
f85ca0022c
fix browser_session initialization based on old browser= arg
2025-06-05 22:57:07 -07:00
Nick Sweeting
8f057d9a12
use dedicated per-object logger for Agent and BrowserSession
2025-06-05 22:56:43 -07:00
Nick Sweeting
0c954791b1
Merge branch 'main' into eventbus
2025-06-05 22:37:36 -07:00
Nick Sweeting
c9f7aec8ce
Merge branch 'main' into eventbus
2025-06-05 22:33:49 -07:00
Nick Sweeting
80e5b03c15
Merge branch 'main' into sensitive_data
2025-06-05 22:32:25 -07:00
Nick Sweeting
c29353078d
Merge branch 'main' into bump_langchain
2025-06-05 22:30:31 -07:00