aixsam.dev Follow

aixsam.dev / tools / browser-use

browser-use

Give an AI a real browser and one line of instructions: it opens websites, reads them, clicks, types and fills forms by itself. Free, open source, MIT.

Reel keyword: BROWSERPythonFree libraryMIT

What is browser-use?

browser-use is a free, open-source (MIT) library that gives an AI model a real web browser. You describe a task in one line, like "find the cheapest flight to Goa next Friday", and the agent opens sites, reads them, clicks, types and fills in forms by itself.

You can run it entirely on your own computer from Python, with any AI model, including a free local one through Ollama. The same team also sells an optional cloud service with hosted browsers; you don't need it for anything in this guide.

There are three ways in: a Python library (this guide), a command-line tool that plugs into agents like Claude Code, or their hosted cloud.

What browser-use can do

  • Do web tasks for you search, compare, fill forms, collect information across several sites.
  • Any model OpenAI, Claude, Gemini, or a free local model with Ollama.
  • Your code, your browser it's a normal Python library (Python 3.11+), so you can build it into your own scripts.
  • Works with coding agents the CLI path registers a skill so Claude Code or Codex can drive a browser.
browser-use reel cover by aixsam.dev
From the reel · keyword BROWSER

What you need

Setup, step by stepcopy each command with the button on the right

01 · Installbrowser-use
  1. Make a project and add browser-use

    In a new, empty folder:

    uv init --python 3.12
    uv add browser-use

    No uv? pip install browser-use works too.

02 · The brainpick one
  1. Free: a local model with Ollama

    Install Ollama, start it, and download a model (about 4.9 GB):

    ollama serve

    Then in a second terminal:

    ollama pull llama3.1:8b

    It runs on your own computer, so speed depends on your hardware.

  2. Or: a paid API key

    Make a file called .env in the folder:

    OPENAI_API_KEY=your-key

    You pay OpenAI for what you use. Claude and Gemini work too.

03 · Your first agentagent.py
  1. Save this as agent.py

    This version uses the free Ollama model from step 2:

    import asyncio
    from browser_use import Agent, ChatOllama
    
    async def main():
        llm = ChatOllama(model="llama3.1:8b")
        agent = Agent(task="Find the number of stars of the browser-use repo", llm=llm)
        history = await agent.run()
        print(history.final_result())
    
    asyncio.run(main())

    Using an OpenAI key instead? Swap the import and model line for the ones in the README quickstart.

  2. Run it

    uv run agent.py

    A browser opens, the agent looks up the repo and prints the answer.

  3. Give it your own task

    Change the task="..." line to anything you'd tell a person, for example the README's own: Fill in this job application with my resume and information.

Heads up: it clicks real buttons on real websites. Watch it the first few times, keep it away from banking, payments and passwords, and check every form before it's submitted. The library is free; Browser Use Cloud and paid model providers charge per use, and you don't need either.

Stuck?

The local model does strange things

Small local models sometimes return actions in the wrong format. Try a bigger model in Ollama, or give the task in very clear, simple steps.

Install fails

browser-use needs Python 3.11 or newer. Check with python --version; with uv, uv init --python 3.12 sets the right one for you.

Is it really free?

The library is free and MIT. A local Ollama model is free too. GPT, Claude, Gemini and Browser Use's own models and cloud browsers are paid per use.

Questions people ask

Is browser-use free?

The library is free and MIT licensed. You pay only for the AI model if you use a paid one; Ollama models are free. The cloud browsers are a separate, optional paid service.

Is it safe to let an AI control my browser?

Treat it like giving someone your mouse. Use a separate browser profile, don't let it log in to your bank or email, and watch what it does the first few times.

Can it solve CAPTCHAs?

The paid cloud browsers advertise CAPTCHA handling. Running locally, expect it to stop at CAPTCHAs, and respect each site's rules.

Which model works best?

Bigger models follow multi-step tasks better. Small local models are free and private but slower and make more mistakes on long tasks.

Still stuck?

DM me on Instagram with a screenshot of the error and which step you're on.

DM @aixsamdev

More setup guides