Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata in history #830

Merged
merged 4 commits into from
Feb 23, 2025
Merged

Metadata in history #830

merged 4 commits into from
Feb 23, 2025

Conversation

MagMueller
Copy link
Collaborator

@MagMueller MagMueller commented Feb 23, 2025

This pull request includes several changes to the browser_use/agent module, focusing on improving token management, adding step metadata, and enhancing telemetry. Below is a summary of the most important changes:

Token Management Improvements:

  • Changed references from total_tokens to current_tokens in browser_use/agent/message_manager/service.py to better reflect the current token count. [1] [2] [3]
  • Updated MessageHistory class to use current_tokens instead of total_tokens in browser_use/agent/message_manager/views.py. [1] [2] [3]

Step Metadata Enhancements:

  • Added StepMetadata class to store metadata for each step, including timing and token information, in browser_use/agent/views.py.
  • Modified AgentHistory and AgentHistoryList classes to include and utilize StepMetadata for better tracking and reporting of step durations and token usage. [1] [2] [3]

Miscellaneous Changes:

  • Added import statements for time and StepMetadata in browser_use/agent/service.py. [1] [2]
  • Included step start and end times in the step method and passed metadata to _make_history_item in browser_use/agent/service.py. [1] [2] [3] [4] [5]

@MagMueller MagMueller merged commit fdb868e into main Feb 23, 2025
3 checks passed
@MagMueller MagMueller deleted the Metadata-in-history branch February 23, 2025 06:41
AryamanParida pushed a commit to AryamanParida/browser-use that referenced this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant