Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Delete page_summary

Magnus Müller6dfe07f1a322
diff --git a/browser_use/agent/message_manager/service.py b/browser_use/agent/message_manager/service.py
index ace4210f6..2e7c3b856 100644
--- a/browser_use/agent/message_manager/service.py
+++ b/browser_use/agent/message_manager/service.py
@@ -75,7 +75,6 @@ class MessageManager:
'name': 'AgentOutput',
'args': {
'current_state': {
- 'page_summary': 'On the page are company a,b,c wtih their revenue 1,2,3.',
'evaluation_previous_goal': 'Success - I opend the first page',
'memory': 'Starting with the new task. I have completed 1/10 steps',
'next_goal': 'Click on company a',
diff --git a/browser_use/agent/prompts.py b/browser_use/agent/prompts.py
index fa17276c8..c7083c435 100644
--- a/browser_use/agent/prompts.py
+++ b/browser_use/agent/prompts.py
@@ -22,7 +22,6 @@ class SystemPrompt:
1. RESPONSE FORMAT: You must ALWAYS respond with valid JSON in this exact format:
{
"current_state": {
- "page_summary": "Quick detailed summary of new information from the current page which is not yet in the task history memory. Be specific with details which are important for the task. This is not on the meta level, but should be facts. If all the information is already in the task history memory, leave this empty.",
"evaluation_previous_goal": "Success|Failed|Unknown - Analyze the current elements and the image to check if the previous goals/actions are successful like intended by the task. Ignore the action result. The website is the ground truth. Also mention if something unexpected happened like new suggestions in an input field. Shortly state why/why not",
"memory": "Description of what has been done and what you need to remember. Be very specific. Count here ALWAYS how many times you have done something and how many remain. E.g. 0 out of 10 websites analyzed. Continue with abc and xyz",
"next_goal": "What needs to be done with the next actions"
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index 3c15f8142..f24a87e28 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -63,7 +63,7 @@ def log_response(response: AgentOutput) -> None:
emoji = '⚠'
else:
emoji = '🤷'
- logger.debug(f'🤖 {emoji} Page summary: {response.current_state.page_summary}')
+
logger.info(f'{emoji} Eval: {response.current_state.evaluation_previous_goal}')
logger.info(f'🧠 Memory: {response.current_state.memory}')
logger.info(f'🎯 Next goal: {response.current_state.next_goal}')
diff --git a/browser_use/agent/tests.py b/browser_use/agent/tests.py
index 3787e447e..15c47357d 100644
--- a/browser_use/agent/tests.py
+++ b/browser_use/agent/tests.py
@@ -69,7 +69,6 @@ def sample_history(action_registry):
AgentHistory(
model_output=AgentOutput(
current_state=AgentBrain(
- page_summary='I need to find the founders of browser-use',
evaluation_previous_goal='None',
memory='Started task',
next_goal='Click button',
@@ -88,7 +87,6 @@ def sample_history(action_registry):
AgentHistory(
model_output=AgentOutput(
current_state=AgentBrain(
- page_summary="This is a sample page summary.",
evaluation_previous_goal='Clicked button',
memory='Button clicked',
next_goal='Extract content',
@@ -113,7 +111,6 @@ def sample_history(action_registry):
AgentHistory(
model_output=AgentOutput(
current_state=AgentBrain(
- page_summary='I found out that the founders are John Doe and Jane Smith. I need to draft them a message.',
evaluation_previous_goal='Extracted content',
memory='Content extracted',
next_goal='Finish task',
@@ -167,12 +164,12 @@ def test_all_screenshots(sample_history: AgentHistoryList):
def test_all_model_outputs(sample_history: AgentHistoryList):
outputs = sample_history.model_actions()
- print(f"DEBUG: {outputs[0]}")
+ print(f'DEBUG: {outputs[0]}')
assert len(outputs) == 3
# get first key value pair
assert dict([next(iter(outputs[0].items()))]) == {'click_element': {'index': 1}}
- assert dict([next(iter(outputs[1].items()))]) == {'extract_page_content': {'value': 'text'}}
- assert dict([next(iter(outputs[2].items()))]) == {'done': {'text': 'Task completed'}}
+ assert dict([next(iter(outputs[1].items()))]) == {'extract_page_content': {'value': 'text'}}
+ assert dict([next(iter(outputs[2].items()))]) == {'done': {'text': 'Task completed'}}
def test_all_model_outputs_filtered(sample_history: AgentHistoryList):
diff --git a/browser_use/agent/views.py b/browser_use/agent/views.py
index f58418c85..cb4f04c96 100644
--- a/browser_use/agent/views.py
+++ b/browser_use/agent/views.py
@@ -96,7 +96,6 @@ class ActionResult(BaseModel):
class AgentBrain(BaseModel):
"""Current state of the agent"""
- page_summary: str
evaluation_previous_goal: str
memory: str
next_goal: str