🔧 AI Nachrichten Debian is Voting on Whether to Allow AI-Assisted Contributions(23.08.2026 um 09:34 Uhr)
🔧 AI Nachrichten The Linux Kernel Is Approaching 2,000 CVEs Per Release(29.08.2026 um 20:00 Uhr)
⚠️ Malware / Trojaner / VirenCitrix Adds a Linux-Powered Escape Hatch For Compromised Windows PCs(30.08.2026 um 17:34 Uhr)
🔧 ProgrammierungZaku 26.0 beta - Local-first, open-source API client(11.09.2026 um 22:38 Uhr)
🔧 Programmierung[$] Stabilizing Rust's never type(08.09.2026 um 15:34 Uhr)
🕵️ SicherheitslückenForgejo 16.0.4 and 15.0.8 address critical security vulnerability(10.09.2026 um 22:05 Uhr)
🔧 AI Nachrichten Debian is Voting on Whether to Allow AI-Assisted Contributions(23.08.2026 um 09:34 Uhr)
🔧 AI Nachrichten The Linux Kernel Is Approaching 2,000 CVEs Per Release(29.08.2026 um 20:00 Uhr)
⚠️ Malware / Trojaner / VirenCitrix Adds a Linux-Powered Escape Hatch For Compromised Windows PCs(30.08.2026 um 17:34 Uhr)
🔧 ProgrammierungZaku 26.0 beta - Local-first, open-source API client(11.09.2026 um 22:38 Uhr)
🔧 Programmierung[$] Stabilizing Rust's never type(08.09.2026 um 15:34 Uhr)
🕵️ SicherheitslückenForgejo 16.0.4 and 15.0.8 address critical security vulnerability(10.09.2026 um 22:05 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 3 Min Lesezeit
0

Web Automation in Plain English: Browser Use Changes Everything

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht
📺
dev.to




Introduction



Hey everyone! Today we're diving into Browser Use, an incredible new library that's revolutionizing web automation. If you've ever struggled with Selenium or Playwright, dealing with selectors and timeouts, you're going to love this. Let's build something cool together!




Prefer video content? Check out my detailed walkthrough on YouTube: https://youtu.be/RsGTT7J7Po8







Setup Section



First, let's get our environment ready. I'll walk you through this step by step:




  1. Create a fresh project folder and open your favorite IDE

  2. Install UV - it's a super fast alternative to pip




CODE
curl -LsSf https://astral.sh/uv/install.sh | sh







  1. Create a virtual environment with Python 3.11 (Browser Use requirement):




CODE
uv venv --python 3.11
source .venv/bin/activate







  1. Install Browser Use and Playwright:




CODE
uv pip install browser-use
playwright install









Creating Our First Agent



Let's write our first Browser Use agent. Here's the minimal code you need:




CODE
from browser_use import Agent
from langchain_openai import ChatOpenAI

agent = Agent(
task="Search for latest news about AI",
llm=ChatOpenAI(model="gpt-4o"),
)






What's cool here is that we only need two main parameters:





  • task: Just tell it what you want to do in plain English


  • llm: Specify which language model to use






Advanced Configuration



Now, let's look at some powerful features. Browser Use gives us tons of configuration options:




CODE
agent = Agent(
task="your task",
llm=llm,
controller=custom_controller, # For custom tool calling
use_vision=True, # Enable vision capabilities
save_conversation_path="logs/conversation.json" # Save chat logs
)






The use_vision parameter is particularly interesting - it lets your agent actually see and understand what's on the webpage. Just keep in mind that for GPT-4o, each image processed costs about 800-1000 tokens (roughly $0.002 USD).






Working with Browser Sessions



One of the coolest features is the ability to connect to your existing Chrome instance. This is super helpful for situations where you need to be logged in. Here's how:




CODE
from browser_use import Agent, Browser

# Create and reuse a browser instance
browser = Browser()
agent = Agent(
task=task1,
llm=llm,
browser=browser # Browser instance will be reused
)

await agent.run()

# Don't forget to close when done
await browser.close()









Structured Output



If you need structured data, Browser Use has you covered. You can define custom output formats using Pydantic:




CODE
from pydantic import BaseModel

class Post(BaseModel):
post_title: str
post_url: str
num_comments: int
hours_since_post: int

class Posts(BaseModel):
posts: List[Post]

controller = Controller(output_model=Posts)









Getting Results and History



After running your agent, you get access to tons of useful information:




CODE
history = await agent.run()

# Access various types of information
urls = history.urls() # URLs visited
screenshots = history.screenshots() # Screenshot paths
actions = history.action_names() # Actions taken
content = history.extracted_content() # Extracted data
errors = history.errors() # Any errors
model_actions = history.model_actions() # All actions with parameters









Bonus: Using a Planner Model



For complex tasks, you can even use a separate model for high-level planning:




CODE
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(model='gpt-4o')
planner_llm = ChatOpenAI(model='o3-mini')

agent = Agent(
task="your task",
llm=llm,
planner_llm=planner_llm, # Planning model
use_vision_for_planner=False, # Disable vision for planner
planner_interval=4 # Plan every 4 steps
)






This setup lets you use a smaller, cheaper model for planning while keeping the powerful GPT-4o for execution.






Closing



That's it for today's tutorial! We've covered everything from basic setup to advanced features like browser session management and structured output. Drop a comment below if you'd like to see more Browser Use tutorials, maybe something about custom functions or system prompts?

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Debian is Voting on Whether to Allow AI-Assisted Contributions
1 Quelle
The Linux Kernel Is Approaching 2,000 CVEs Per Release
1 Quelle
Citrix Adds a Linux-Powered Escape Hatch For Compromised Windows PCs
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Web Automation in Plain English: Browser Use Changes Everything

Thematisch verwandte Begriffe: Automation, Plain, English, Browser · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...