Skip to content

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

Change example browser live time

magmueller87fe4c0a840e
diff --git a/examples/agent_output_processing.py b/examples/agent_output_processing.py
index e97e16591..e59a8dc53 100644
--- a/examples/agent_output_processing.py
+++ b/examples/agent_output_processing.py
@@ -1,5 +1,6 @@
import os
import sys
+from pprint import pprint
from browser_use.controller.service import Controller
@@ -17,13 +18,12 @@ llm = ChatOpenAI(model='gpt-4o')
agent = Agent(
task="go to google.com and type 'OpenAI' click search and give me the first url",
llm=llm,
- controller=Controller(keep_open=False, headless=True),
+ controller=Controller(keep_open=True, headless=False),
)
async def main():
history: AgentHistoryList = await agent.run()
- from pprint import pprint
print('Final Result:')
pprint(history.final_result(), indent=4)