AIAny
AI Client2026
GitHub

playwright-cli

Command-line tool for browser automation: record and generate Playwright scripts, inspect selectors, capture screenshots. Writes snapshots and screenshots to disk rather than into an LLM's context, cutting token use ~4x versus Playwright MCP.

Introduction

The fastest way to blow a coding agent's budget is to hand it a browser. Every accessibility snapshot and screenshot an MCP server streams back lands in the model's context, and a single automation task can burn ~114k tokens. This tool inverts that contract: artifacts go to disk, and the agent reads only the fragments it decides it needs — the same task drops to ~27k tokens.

What Sets It Apart
  • Disk-first, not context-first. Snapshots, DOM, and screenshots are written to files; the agent pulls slices on demand instead of paying for the whole tree every step. That is the ~4x token reduction Playwright's own benchmarks report.
  • No schema tax. Unlike an MCP server, there is no large tool schema to load up front — commands are discovered like any CLI, which fits the SKILL-style workflows that Claude Code and GitHub Copilot now favor.
  • Real Playwright underneath. Recording emits actual Playwright code you can commit as a test, so exploratory clicking becomes a maintainable script rather than a throwaway transcript.
Where It Fits

The CLI and Playwright MCP attack the same problem from opposite ends. MCP keeps browser state resident and introspectable, which pays off for self-healing tests and long autonomous loops where continuous page context matters more than token cost. The CLI assumes the agent is already juggling a large codebase and a tight context window, and optimizes for getting in, acting, and getting out cheaply.

Who It's For

Great fit if you run high-throughput coding agents that automate browsers alongside heavy code reasoning, or if MCP token bills have become the bottleneck. Look elsewhere if your workflow leans on persistent, continuously-introspected browser state — a long exploratory or self-healing loop — where MCP's resident context is the point rather than the cost.

Information

  • Websitegithub.com
  • OrganizationsMicrosoft
  • AuthorsMicrosoft Corporation
  • Published date2026/01/23

Categories

More Items

GitHub
AI Agent2026

Runs persistent, self-hosted AI teammates that retain conversation, memory, routines and a sandboxed browser/shell. Supports bring-your-own models, local or remote sandbox providers, voice, team computers and integrations for auditable, controllable agent workflows.

GitHub
AI Client2024

Unifies visual creator tools, reusable Skills, and a Codex-powered Agent to handle video translation, image/video generation, voiceovers, and editing in one local multimodal workspace. Desktop and web clients share a synchronized state machine and keep data local by default.

GitHub
AI Client2025

Private, local-first desktop assistant for voice and text conversations that runs models on your hardware. Uses local model servers (Ollama or OpenAI-compatible endpoints), offers personal memory, dictation, TTS/STT, MCP integrations and automatic redaction; free for personal use.