22 lines
No EOL
559 B
Python
22 lines
No EOL
559 B
Python
import asyncio
|
|
from dotenv import load_dotenv
|
|
load_dotenv()
|
|
from browser_use import Agent, Browser, BrowserConfig
|
|
from langchain_openai import ChatOpenAI
|
|
|
|
config = BrowserConfig(
|
|
proxy={"server": "http://127.0.0.1:3000"},
|
|
disable_security=True
|
|
)
|
|
|
|
browser = Browser(config=config)
|
|
|
|
async def main():
|
|
agent = Agent(
|
|
task="go to the website https://supabase.com and extract the client login URL and click github login button",
|
|
llm=ChatOpenAI(model="gpt-4o"),
|
|
browser=browser,
|
|
)
|
|
await agent.run()
|
|
|
|
asyncio.run(main()) |