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
improve the pdf viewer prompt
mertunsall0a924437d6e4
diff --git a/browser_use/agent/prompts.py b/browser_use/agent/prompts.pyindex 1b0ad76f8..42ef64926 100644--- a/browser_use/agent/prompts.py+++ b/browser_use/agent/prompts.py@@ -265,7 +265,8 @@ class AgentMessagePrompt:# Check if current page is a PDF viewer and add appropriate messagepdf_message = ''if self.browser_state.is_pdf_viewer:- pdf_message = 'PDF viewer cannot be rendered. In this page, DO NOT use the extract_structured_data action as PDF content cannot be rendered. Use the read_file action on the downloaded PDF in available_file_paths to read the full content.\n\n'+ pdf_message = 'PDF viewer cannot be rendered. In this page, DO NOT use the extract_structured_data action as PDF content cannot be rendered. '+ pdf_message += 'Use the read_file action on the downloaded PDF in available_file_paths to read the full text content or scroll in the page to see images/figures if needed.\n\n'# Add recent events if available and requestedrecent_events_text = ''