Files
browser-use/examples/simple.py
Magnus Müller 8ee41dbb5f Simple example
2025-08-18 18:05:41 -07:00

30 lines
489 B
Python

import asyncio
import os
import sys
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, ChatOpenAI
async def main():
# Choose your model
llm = ChatOpenAI(model='gpt-5-mini')
# Define your task
task = 'Go and find the founders of browser-use'
# Create the agent
agent = Agent(task=task, llm=llm)
# Start
await agent.run()
if __name__ == '__main__':
asyncio.run(main())