- Updated the step method to consolidate LLM interaction and action execution into a single try block for improved performance.
- Introduced a fallback mechanism for state summary retrieval, logging errors more effectively.
- Enhanced error handling to manage InterruptedError and other exceptions uniformly.
- Refactored context preparation and action execution methods for clarity and consistency.
- Implemented a new method for creating history items to streamline history management.
- Added `@observe` decorators to various methods in `service.py`, `session.py`, and `controller.py` to improve tracking of actions and state changes.
- Updated method signatures to include observability features for better debugging and monitoring.
- Adjusted retry logic for certain actions to enhance reliability and performance.
- Increased step execution timeout from 60 seconds to 120 seconds for improved handling of longer operations.
- Reduced retry attempts in the screenshot logic from 3 to 2 to streamline error handling and reduce unnecessary retries.
- Updated timeouts for action execution, step processing, and screenshot operations to more aggressive values (e.g., reduced from 60s to 20s for actions, 30s to 10s for DOM processing).
- Adjusted retry logic and timeout settings for screenshot and iframe content extraction to enhance performance and reduce potential hangs.
- Improved logging for timeout events to provide clearer feedback on operation failures.
- Added detailed debug logging throughout the Agent class to track execution steps, including browser state retrieval, action model updates, and LLM calls.
- Improved error logging to capture failures during LLM calls and execution.
- Updated eval service to log task execution progress and final state, enhancing traceability and debugging capabilities.
- Introduced `_get_browser_state_with_recovery` method to handle state retrieval with fallback options.
- Implemented `_get_minimal_state_summary` for basic page info retrieval without DOM processing.
- Updated `step` method to utilize the new recovery method for improved resilience in state fetching.