Commit Graph

243 Commits

Author SHA1 Message Date
mertunsall d490087a28 FLASH MODE 2025-07-12 21:46:48 +02:00
Magnus Müller 6407c10918 laminar-ignore input output 2025-07-09 22:27:22 +02:00
mertunsall c00f66d338 1. fix the bug that auto downloads were not available immediately to the agent
2. make available_file_paths a state of the agent instead of setting and update it regularly.
2025-07-09 15:27:08 +02:00
Magnus Müller 1eb6ea28c0 Update observability decorators in service classes
- 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.
2025-07-09 10:04:05 +02:00
Magnus Müller 6f221ec504 Refactor message management to categorize messages by type. Updated methods to handle system, state, and consistent messages separately, improving message retrieval and organization. 2025-07-08 23:09:38 +02:00
Magnus Müller 6cbace0321 Remove remove message 2025-07-08 22:47:11 +02:00
Magnus Müller ea481972b1 Merge branch 'main' into better-error-handling-and-lmnr-inclusion 2025-07-07 15:33:08 +02:00
mertunsall 188642a68e fix more 2025-07-07 14:42:15 +02:00
mertunsall e107bb4690 fix 2025-07-07 14:37:03 +02:00
Mert Unsal f5ee0d6097 Merge branch 'main' into cursor/make-tool-call-example-parameter-optional-3d84 2025-07-07 14:36:07 +02:00
mertunsall 3a6a3e5d75 move examples to system prompt 2025-07-07 14:32:49 +02:00
Mert Unsal 0a5612ba29 Revert "Make tool call example parameter optional" 2025-07-07 14:32:49 +02:00
Mert Unsal f7825bf176 Revert "Make tool call example parameter optional" 2025-07-07 13:35:37 +02:00
Cursor Agent 31718e982c Change default of include_tool_call_examples to False for reduced tokens
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-07-06 22:32:45 +00:00
Cursor Agent c72b9ddabd Add optional parameter to control tool call examples in Agent
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-07-06 21:53:00 +00:00
Magnus Müller d03196c09c Merge remote-tracking branch 'origin/main' into include-lmnr 2025-07-06 23:42:14 +02:00
mertunsall 734d9d0e9e fix format 2025-07-06 18:18:32 +02:00
Mert Unsal 1124e82cd3 Merge branch 'main' into mert/fix_encoding 2025-07-06 18:15:22 +02:00
mertunsall 993417b9b2 fix example order 2025-07-06 17:44:40 +02:00
Magnus Müller f85cb5ba89 Update screenshot handling in prompts and service modules to ensure proper filtering and usage of screenshots based on availability 2025-07-06 14:28:18 +02:00
Magnus Müller 625e9db2f5 Refactor agent_history_list handling to allow optional input and filter out None values from previous screenshots 2025-07-06 14:15:32 +02:00
Magnus Müller 25392d9cde add multiple last screenshots to llm input message 2025-07-06 13:50:31 +02:00
Magnus Müller ef36632ccf Refactor observability imports to maintain consistency across modules 2025-07-05 23:12:05 +02:00
Magnus Müller a4c9b992ba Add observability module for browser-use with optional lmnr integration and debug mode support 2025-07-05 23:08:00 +02:00
Magnus Müller 99ef62748f Add lmnr tracing 2025-07-05 15:23:38 +02:00
Magnus Müller 5ce6d23976 Fix potential error message duplicate 2025-07-04 17:34:45 +02:00
Magnus Müller bfb2083adb Improve error logging in action results
- Truncated error messages to a maximum of 100 characters at the beginning and end for better readability.
- Updated logging to reflect the new error message format.
2025-07-03 23:22:24 +02:00
mertunsall 729fc798ca add assertion for safety 2025-07-01 12:49:03 +02:00
mertunsall 63c0f5d086 convert to pydantic 2025-07-01 12:32:54 +02:00
mertunsall 2c465a898a - Introduce a max_history_items parameter to limit the memory of the model
- changed the system messages to have <sys> tag instead of <s> to avoid confusion with HTML
-  Got rid of MessageMetadata, SupportedMessageTypes and implemented cleaner MessageManagerState
- Implemented a HistoryItem class to cleanly reconstruct agent history description
2025-07-01 12:04:27 +02:00
Gregor Žunič 35bb5e8039 Add token caching for claude (#2108)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Added token caching support for Claude models, including accurate
tracking and cost calculation for cached, cache creation, and uncached
tokens.

- **New Features**
- Added `cache` flag to messages and updated Anthropic message
serialization to support Claude's token caching.
- Updated token usage and cost tracking to handle cached tokens, cache
creation tokens, and their costs.
- Improved token usage logs to show detailed breakdowns for cached and
uncached tokens.
  - Added tests for Anthropic cache serialization and cost calculation.

<!-- End of auto-generated description by cubic. -->
2025-06-25 21:28:42 +02:00
Gregor Žunič 2ee526d903 updated pricing for cached tokens support 2025-06-25 15:33:47 +02:00
Mert Unsal e8b0755aff Merge branch 'main' into mert/cloudrunner 2025-06-25 11:49:59 +02:00
Magnus Müller 6f2b2cac1a Save last state in message manager 2025-06-25 11:49:01 +02:00
Mert Unsal 39f7b0608c Update browser_use/agent/message_manager/service.py 2025-06-25 11:22:01 +02:00
Magnus Müller 3c5fbe9eb5 Save last state in message manager 2025-06-25 10:14:37 +02:00
mertunsall fa60e747d9 mr cloudrunner 2025-06-24 23:02:08 +02:00
Cursor Agent 7f369df0c8 Fix type hints and improve type safety in AgentOutput and service module 2025-06-24 14:48:16 +00:00
mertunsall b3e83d6d05 Fix 2025-06-24 16:39:14 +02:00
Cursor Agent 411af73f20 Refactor message manager example generation and update system prompt tag 2025-06-24 14:32:43 +00:00
Cursor Agent bf63d1843c Add optional thinking field with flexible system prompt configuration 2025-06-24 14:17:24 +00:00
Cursor Agent d57850639b Make thinking field optional in browser-use agent 2025-06-24 12:40:07 +00:00
Mert Unsal 1d47b15bfe Merge branch 'main' into feature/squashed-langchain-to-native 2025-06-24 13:09:18 +02:00
mertunsall e6d32b0017 fix format 2025-06-24 12:55:59 +02:00
mertunsall 27ac2354e1 fix sensitive data 2025-06-24 12:49:52 +02:00
Gregor Žunič 7a10ae0c96 Squashed commit langchain to native 2025-06-24 12:26:55 +02:00
mertunsall c40b5c89f4 Fix <available_file_paths> 2025-06-23 16:00:56 +02:00
mertunsall 8c4dc394ee Improve history 2025-06-23 13:53:25 +02:00
Nick Sweeting 6bc1f7985f more type hint fixes 2025-06-21 04:56:27 -07:00
Nick Sweeting 340bafdd29 move old tests to old folder 2025-06-21 04:47:46 -07:00