Skip to content

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

Simplify to 1 line of code

Magnus Müller15f30214b4db
diff --git a/examples/simple.py b/examples/simple.py
index e56170cbb..3ae799bf8 100644
--- a/examples/simple.py
+++ b/examples/simple.py
@@ -1,19 +1,3 @@
-import asyncio
-import os
-import sys
+from browser_use import Agent
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-
-from dotenv import load_dotenv
-
-load_dotenv()
-
-from browser_use import Agent, default_llm
-
-
-async def main():
- await Agent('Find the founders of browser-use', default_llm).run()
-
-
-if __name__ == '__main__':
- asyncio.run(main())
+Agent('Summarize the most recent issue of browser-use library')()