← Back to blog

Set Up Playwright

Give your agent full browser automation — headless Chromium, page navigation, form filling via Playwright.

tutorial·CrabTalk Team·

Give your agent full browser automation with Playwright. Unlike agent-browser (which uses accessibility tree snapshots), Playwright gives your agent direct control over a headless Chromium instance — click elements, fill forms, take screenshots, and run end-to-end workflows.

1. Install

crabtalk hub install microsoft/playwright

This installs the Playwright MCP server and downloads Chromium. The setup runs npx playwright install chromium automatically.

2. Verify

crabtalk attach
> Go to crabtalk.ai and take a screenshot

The agent launches a headless browser, navigates to the page, and returns a screenshot.

When to use Playwright vs. agent-browser

Use caseTool
Quick page reading, content extractionagent-browser
Complex multi-step browser workflowsPlaywright
Form filling and clicking specific elementsBoth work
Screenshots and visual verificationPlaywright
Token-efficient page summarizationagent-browser

agent-browser is lighter and more token-efficient for simple reads. Playwright is more powerful for complex automation and testing workflows.

What's next

  • Use Browser Tools — the lighter alternative with agent-browser
  • MCP Servers — how tool servers connect to the daemon
  • Hub — discover and install more packages