Browser automation agent for $0: playwright + browser-use, wired together in an afternoon
Browser automation agent for $0: playwright + browser-use, wired together in an afternoon
I needed an agent that could navigate a government procurement portal, find awarded contracts matching certain criteria, extract the key fields, and dump them to a spreadsheet — automatically, every morning. The portal has no API, no data export, just an old HTML table with pagination.
I spent an afternoon wiring together two free listings from ai-supply.store and it now runs unattended.
The listings
- playwright-browser-automation — headless browser control; reliable, fast, great async support
- browser-use-web-agent — LLM-driven web agent layer; turns natural-language instructions into Playwright actions
Both free to install from the catalog. For anything doing browser automation I always check the security scan for unexpected egress patterns — both were clean.
The setup
from browser_use import Agent
from browser_use.browser.browser import Browser, BrowserConfig
from langchain_community.llms import Ollama # free local LLM
browser = Browser(config=BrowserConfig(headless=True))
llm = Ollama(model="llama3.2:3b") # running locally via ollama listing
agent = Agent(
task="""
Go to https://procurement.example.gov/awards.
Find all contracts awarded in the last 7 days with value > £50,000.
Extract: award date, supplier name, contract value, description.
Return as a JSON array.
""",
llm=llm,
browser=browser
)
async def run():
result = await agent.run()
return result
What it actually does
The browser-use layer uses the LLM to reason about the current DOM, decide which elements to interact with, handle pagination, and extract structured data. It's not brittle XPath scraping — it adapts when the page layout shifts slightly.
| Metric | Value |
|---|---|
| Daily runtime | ~4 minutes |
| Success rate (30-day) | 91% (failures mostly on portal downtime) |
| Records extracted per run | 15–40 |
| Cost per run | $0 |
I run this on a VPS on a cron job. The LLM reasoning happens locally via Ollama so there's no API cost even for the intelligence layer.
The combination of Playwright's reliability and browser-use's LLM steering is genuinely powerful. Both listings are in the agentic category — worth exploring if you have any browser automation needs.