Browser Automation & AI Agents
From record-and-replay to AI agents that use the web for you: Playwright basics, computer-use and browser agents, deep research agents, real PM and analyst workflows, safety, and how to evaluate and productise browser agents.
Browser Automation & AI Agents
From record-and-replay to AI agents that use the web for you: Playwright basics, computer-use and browser agents, deep research agents, real PM and analyst workflows, safety, and how to evaluate and productise browser agents.
In one line
Browser automation means getting software, and now AI, to use websites for you: open pages, click, type, fill forms, collect data and complete tasks. Classic scripts follow fixed steps; AI browser agents take a goal in plain English and decide each step themselves.
The 8 classes
What browser automation is (and when to use it)
Understand the three generations of web automation and pick the right one for a task.
- Scripts, RPA and AI agents each fit different tasks.
- Always prefer an official API when one exists.
- Keep humans in the loop for anything irreversible.
No-code browser automation
Automate simple web tasks without writing code.
- Record-and-replay is the fastest start.
- Zapier, Make and n8n connect apps through APIs, not clicks.
- Use test accounts and log every run.
Playwright for PMs and analysts
Read and write a simple browser script, so you can work with engineers and automate small tasks.
- codegen turns your clicks into code.
- Prefer role, label and test-id locators.
- Playwright powers both testing and AI browser tools (Playwright MCP).
AI browser agents and computer use
Understand how AI agents use browsers and computers, and how to give them good instructions.
- Agents loop: observe → decide → act → observe.
- Give goal, allowed sites, limits and output format.
- Stop points (payment, sending, deleting) must need your approval.
Deep research agents and web research workflows
Use AI research agents for market and competitor research, and verify what they find.
- Research agents give you a fast first draft, not final truth.
- Always verify key numbers in the original source.
- Combine research agents (breadth) with browser checks (depth).
Real workflows: PM, analyst, marketing and ops
Design end-to-end automations that combine agents, scripts and no-code tools.
- Mix scripts (stable steps) with agents (messy steps).
- An orchestrator schedules, retries and notifies.
- Store results and screenshots for audit.
Safety, security, ethics and the law
Prevent the main risks of browser agents: injection, wrong actions, data leaks and rule-breaking.
- Prompt injection is the number-one agent risk.
- Use an approval matrix by action type.
- Respect terms, robots.txt, CAPTCHAs and the DPDP Act.
Evaluating and productising browser agents
Measure agent quality and write a PRD for a browser-agent feature; complete the final project.
- Measure success, reliability, cost and safety.
- Test on sandbox tasks with known end states.
- Ship agents with approvals, logs and a human fallback.
Interview questions
What is browser automation?
Software (scripts, RPA bots or AI agents) using websites to do tasks: navigate, click, type, extract data. Scripts follow fixed steps; AI agents pursue goals.
Script vs AI agent: when do you use which?
Scripts for stable, repeated, high-volume steps (cheap, reliable). Agents for varied or messy tasks where steps change. Prefer an API over both when available.
How does a computer-use agent work?
It loops: observe the screen or page, decide the next action, act (click/type/scroll), observe again, until the goal is met or it needs a human.
Biggest risk with browser agents?
Prompt injection from web content, plus irreversible actions. Controls: allow-listed sites, treat page text as data, approval before submit/pay/send, no secrets in prompts.
How would you evaluate a browser agent?
Sandbox tasks with known end states; measure task success, reliability over repeated runs, steps, time, cost per success, safety violations and human takeover rate.
Give a PM use case.
Weekly competitor pricing tracker, release smoke tests of key flows, research for a PRD, or QA of onboarding across devices.
What is Playwright codegen?
A tool that records your browser actions and writes the equivalent Playwright code, a quick way to start a script.
Is scraping legal?
It depends on the site's terms, the data and the law. Avoid personal data without a lawful basis (DPDP Act), respect robots.txt and rate limits, never bypass CAPTCHAs, and prefer official APIs.
