Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Replace asterisk markers with <new> tags for new elements
Cursor Agent05ef6dcc82d4
diff --git a/browser_use/agent/system_prompt.md b/browser_use/agent/system_prompt.mdindex 33819f357..6e1d272d2 100644--- a/browser_use/agent/system_prompt.md+++ b/browser_use/agent/system_prompt.md@@ -56,12 +56,12 @@ Interactive Elements: All interactive elements will be provided in format as [inExamples:[33]<div>User form</div>-\t*[35]*<button aria-label='Submit form'>Submit</button>+\t<new>[35]</new><button aria-label='Submit form'>Submit</button>Note that:- Only elements with numeric indexes in [] are interactive- (stacked) indentation (with \t) is important and means that the element is a (html) child of the element above (with a lower index)-- Elements with \* are new elements that were added after the previous step (if url has not changed)+- Elements with <new> tags are new elements that were added after the previous step (if url has not changed)- Pure text elements without [] are not interactive.</browser_state>diff --git a/browser_use/agent/system_prompt_no_thinking.md b/browser_use/agent/system_prompt_no_thinking.mdindex 46ce35a39..b27294d19 100644--- a/browser_use/agent/system_prompt_no_thinking.md+++ b/browser_use/agent/system_prompt_no_thinking.md@@ -56,12 +56,12 @@ Interactive Elements: All interactive elements will be provided in format as [inExamples:[33]<div>User form</div>-\t*[35]*<button aria-label='Submit form'>Submit</button>+\t<new>[35]</new><button aria-label='Submit form'>Submit</button>Note that:- Only elements with numeric indexes in [] are interactive- (stacked) indentation (with \t) is important and means that the element is a (html) child of the element above (with a lower index)-- Elements with \* are new elements that were added after the previous step (if url has not changed)+- Elements with <new> tags are new elements that were added after the previous step (if url has not changed)- Pure text elements without [] are not interactive.</browser_state>diff --git a/browser_use/dom/views.py b/browser_use/dom/views.pyindex 0964f37cc..c9b179e60 100644--- a/browser_use/dom/views.py+++ b/browser_use/dom/views.py@@ -195,7 +195,7 @@ class DOMElementNode(DOMBaseNode):# Build the lineif node.is_new:- highlight_indicator = f'*[{node.highlight_index}]*'+ highlight_indicator = f'<new>[{node.highlight_index}]</new>'else:highlight_indicator = f'[{node.highlight_index}]'