- Add max_clickable_elements_length parameter to Agent.__init__ with default 40000
- Add max_clickable_elements_length to AgentSettings
- Pass parameter through MessageManager to AgentMessagePrompt
- Bump version to 0.11.10a2
Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
Fixes#3970
The LLM was typing literal placeholder names (e.g., 'user_name') instead
of wrapping them in <secret> tags (e.g., '<secret>user_name</secret>').
Changes to _get_sensitive_data_description():
- Added clear 'SENSITIVE DATA' header to draw attention
- Changed placeholder list format from Python list to bullet points
- Added explicit 'MUST' instruction emphasizing the required format
- Added concrete example using the first actual placeholder name
- Added explanation that the system will replace tags with actual values
This makes it much clearer to the LLM that it needs to wrap placeholder
names in <secret> tags for the automatic replacement mechanism to work.
This change ensures that sensitive data in action results is filtered before being included in state messages sent to the LLM. This prevents accidental leakage of private information. New tests are added to verify this functionality.
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
- Updated page info text format to enhance readability and structure.
- Changed date format in agent state description to display only the current date.
- Simplified action results formatting in message manager for better clarity.
- Adjusted history item string representation to streamline output and remove unnecessary prefixes.
- Added `ignore_output=True` to the `@observe_debug` decorator in the Agent and BrowserSession classes to suppress output for specific methods.
- Updated the `@observe_debug` decorator in the MessageManager class to include `ignore_input=True` for better control over debug logging.