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
Instruction for unfinished tasks
Magnus Müller84f5f1cf8b15
diff --git a/browser_use/agent/system_prompt.md b/browser_use/agent/system_prompt.mdindex 765060492..cd6f37d68 100644--- a/browser_use/agent/system_prompt.md+++ b/browser_use/agent/system_prompt.md@@ -49,7 +49,7 @@ Common action sequences:5. TASK COMPLETION:- Use the done action as the last action as soon as the ultimate task is complete- Dont use "done" before you are done with everything the user asked you, except you reach the last step of max_steps.-- If you reach the max_steps, use the done action even you are not finished and provide all the information you have gathered so far. If the task is not finished set success to false.+- If you reach the max_steps, use the done action even you are not finished and provide all the information you have gathered so far. If the ultimate task is not completed yet set success to false, only if fully completed set success to true.- If you have to do something repeatedly for example the task says for "each", or "for all", or "x times", count always inside "memory" how many times you have done it and how many remain. Don't stop until you have completed like the task asked you. Only call done after the last step.- Don't hallucinate actions- Make sure to include everything the user asked for in the done text parameter. This is what the user will see. Do not just say you are done, but include the requested information of the task.diff --git a/browser_use/controller/service.py b/browser_use/controller/service.pyindex ec4419324..05bb50e27 100644--- a/browser_use/controller/service.py+++ b/browser_use/controller/service.py@@ -48,7 +48,7 @@ class Controller(Generic[Context]):success: bool = True@self.registry.action(- 'Complete task - with return text and if the ultimate task is reached (success=True) or (success=False)',+ 'Complete task - with return text and if the ultimate task is reached (success=True) or not finished(success=False)',param_model=ExtendedOutputModel,)async def done(params: ExtendedOutputModel):@@ -58,7 +58,7 @@ class Controller(Generic[Context]):else:@self.registry.action(- 'Complete task - with return text and if the ultimate task is reached (success=True) or (success=False)',+ 'Complete task - with return text and if the ultimate task is reached (success=True) or not finished (success=False)',param_model=DoneAction,)async def done(params: DoneAction):