safariBrowser-use Browser AI Agent

πŸ“Ί refer link :https://youtu.be/15LCeh46sMs?si=FZgEk4C-NsBmKfD4arrow-up-right

Github: https://github.com/browser-use/browser-usearrow-up-right

Setup

  • With pip (Python>=3.11):

pip install browser-use
  • Install Playwright:

playwright install chromium
  • Spin up your agent:

from langchain_openai import ChatOpenAI
from browser_use import Agent
import asyncio
from dotenv import load_dotenv
load_dotenv()

async def main():
    agent = Agent(
        task="Compare the price of gpt-4o and DeepSeek-V3",
        llm=ChatOpenAI(model="gpt-4o"),
    )
    await agent.run()

asyncio.run(main())
  • Add your API keys for the provider you want to use to your .env file:

Last updated