The fastest way to record what your AI browser agent did is to use a CLI-native recorder that drives the browser and captures the session in one command. Tools like Vercel’s agent-browser and Playwright CLI make agents act on the web cheaply and headlessly — but they output logs and accessibility snapshots, not video. screencli closes that gap: npx screencli record <url> -p "<task>" runs an AI-driven browser session and returns a polished MP4 with a shareable link — no manual screen recording, no editor.
This guide explains why the 2026 wave of browser-agent CLIs created a recording problem, and the four ways to solve it.
The problem: agents got efficient, and invisible
Browser agents in 2026 are optimized to run without a human watching — which means there’s nothing to watch. The whole point of the latest tooling is to strip the session down to machine-readable text and run it headless.
The numbers show how aggressive this shift is:
- agent-browser (Vercel Labs) generates accessibility-tree snapshots that use roughly 200–400 tokens per page, according to its GitHub repository. Its latest release, v0.27.1, shipped June 1, 2026.
- Playwright CLI cut a 10-step browser task from about 114,000 tokens (the older MCP server) to roughly 27,000 tokens — a ~4x reduction — per a March 2026 benchmark by ytyng.com. The MCP tool definitions alone cost about 13,700 tokens per request.
- The Model Context Protocol (MCP) was donated to the Linux Foundation in December 2025 and is now supported across Claude, ChatGPT, Gemini, Cursor, VS Code, and GitHub Copilot — standardizing how agents drive browsers via text.
None of this produces a video. A token-efficient agent run leaves behind a transcript and maybe a final screenshot. That’s fine for the model — and useless when a teammate, a customer, or a launch post needs to see what the agent actually did.
Why a watchable artifact still matters
Even in an agent-first workflow, the output that convinces humans is video — not a log file. Demos move decisions: product demo videos boost purchase likelihood by 1.81x and can lift landing-page conversions by up to 86%, according to 2026 industry reporting compiled by ngram and ContentBeta.
So the question isn’t whether to capture the session — it’s how to do it without bolting a manual screen recorder onto an automated pipeline.
4 ways to record an AI browser agent session
Here are the practical options in 2026, from most manual to most automated.
| Approach | How it’s triggered | Output | Post-production | Agent/CLI-native | Shareable link |
|---|---|---|---|---|---|
| Manual recorder (Loom, Screen Studio) | You hit record by hand | Raw video | Manual editing | No | Loom: yes |
| Raw Playwright video | recordVideo flag in script | Low-res .webm, no effects | DIY with FFmpeg | Partially | No |
| Per-step screenshots | Built into agent-browser / Playwright CLI | Image sequence | Stitch yourself | Yes | No |
| screencli | One CLI command | Polished MP4 (zoom, cursor, gradient) | Automatic | Yes | Yes |
1. Manual screen recorders
Loom and Screen Studio produce great video, but they assume a human is sitting at the screen pressing record. That breaks the moment your agent runs headless or in CI. They’re built for people, not pipelines.
2. Raw Playwright video capture
Playwright can record a session to .webm via its recordVideo context option. It works, but you get a flat, full-frame, low-polish clip with no zoom, no click highlights, and no trimming — then you’re hand-rolling an FFmpeg pipeline to make it presentable.
3. Per-step screenshots
Both agent-browser and Playwright CLI can dump a screenshot at each step. Useful for debugging; not a demo. You’re left stitching stills into something watchable.
4. screencli: record the session in one command
screencli is an open-source CLI built specifically to turn an AI-driven browser session into a finished demo video. Instead of attaching a recorder to your agent, you describe the task in plain English and screencli drives the browser and records it:
npx screencli record https://yourapp.com -p "Sign up, create a project, and invite a teammate"
You get back a composed MP4 with automatic post-production — idle time trimmed, the camera auto-zoomed to each action, click highlights, a cursor trail, and a gradient background — uploaded to a shareable link. No editor, no retakes.
Pick a background or record a private app behind a login:
# Choose a gradient background
npx screencli record https://yourapp.com -p "Toggle dark mode" --background nebula
# Log in first, then let the agent take over (credentials stay off the recording)
npx screencli record https://app.internal.com -p "Show the dashboard" --login --auth myapp
Because it’s CLI-native, screencli fits the same headless, scriptable workflows as agent-browser and Playwright CLI — drop it into CI, a release script, or hand it to your coding agent directly:
npx skills add https://github.com/usefulagents/screencli --skill screencli
That installs screencli as a skill for Claude Code, Cursor, Windsurf, or any agent that supports skills — so the agent can record its own work autonomously.
How to choose
- Demoing to humans, on a pipeline or from an agent? Use screencli — it’s the only option here that’s both CLI-native and outputs a polished, shareable video automatically.
- Quick async clip you record by hand? Loom is fine.
- Just debugging the agent? Per-step screenshots from agent-browser or Playwright CLI are enough.
The trend is clear: as the driving layer of browser agents gets leaner and more headless, the capture layer has to become just as automated. A token-efficient agent that no one can see isn’t a demo — it’s a log file.
FAQ
What’s the difference between agent-browser and screencli? agent-browser (Vercel Labs) is a browser-automation CLI that lets an AI agent act on a page using token-efficient accessibility snapshots. screencli is a recording CLI that captures an AI-driven session as a polished, shareable demo video. One drives; the other documents.
Can I record a headless agent run? Yes. screencli runs as a CLI command, so it works in headless and scripted environments like CI — exactly where manual screen recorders such as Loom or Screen Studio can’t.
Do I need an Anthropic API key?
screencli works with your own ANTHROPIC_API_KEY, or you can log in to the screencli cloud and let it proxy the agent calls. Either way the recording and post-production run locally and the result uploads to a shareable link.
Is screencli open source? Yes. screencli is an open-source, MIT-licensed CLI published on npm, purpose-built for recording AI-driven browser sessions. See screencli.sh.
Why not just use raw Playwright video?
Playwright’s recordVideo gives you an unedited, full-frame .webm with no zoom, trimming, or click highlights. screencli runs a single FFmpeg-based post-production pass to produce a demo-grade MP4 automatically — no DIY editing pipeline.