# Browser Recorder & Offline Replay

> Record and replay deterministic browser sessions offline using Playwright and CDP for bug reproduction and testing.

Browser Recorder & Offline Replay is a free AI agent skill on Agensi by Kalu Madari, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Kalu Madari](https://www.agensi.io/creators/kalu-madari)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.0
- Last updated: 2026-11-30
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/browser-recorder-offline-replay
- Tags: testing, playwright, python, automation, qa

## About this skill

Debugging flaky tests or reproducing production bugs is impossible when the live environment changes every minute. This skill records full browser sessions to disk, allowing you to replay them in a strictly offline environment for deterministic testing and analysis.

### What it does
- **Network Capture** records every HTTP/S request, response body, and WebSocket frame using Playwright and CDP.
- **Strict Mock Replay** serves sessions back from disk, blocking all live network access to ensure the environment is frozen.
- **DOM Snapshots** takes point-in-time snapshots of the document structure during the recording phase.
- **Interaction Tracking** logs clicks, inputs, and navigation events for accurate session reconstruction.
- **CLI & GUI Interfaces** provides both a terminal-based automation flow and a Tkinter-based dashboard for manual control.

### How it works
1. **Initialize** the recorder by providing a target URL and a capture duration.
2. **Execute** the `record_cli.py` script to generate a timestamped directory containing the manifest and response bodies.
3. **Verify** the capture by running `replay_cli.py` against the generated folder path.
4. **Analyze** the output report, which details fulfilled requests and any fatal errors or pending responses.

### Frameworks & tools
Built with Python, Playwright, and Chrome DevTools Protocol (CDP). It uses Tkinter for its optional graphical interface and writes data in JSONL format for easy parsing.

### Why this beats prompting it yourself
Building a reliable network interceptor that handles binary response bodies and WebSockets is complex and prone to race conditions. This skill provides a production-ready capture manifest and replay engine that enforces strict network isolation without manual mocking.

### Use cases
- Record a specific bug sequence to create a portable, reproducible test case for developers.
- Run regression tests in CI environments without providing access to internal staging backends.
- Snapshot a web application state for offline visual diffing and DOM audits.
- Archive the network state of a site for compliance or forensic analysis.

### Known limitations
Requires Chromium to be installed via Playwright. Record duration must be specified upfront in the CLI or stopped manually in the GUI.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Browser Recorder & Offline Replay skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill help with flaky tests and non-deterministic bugs?

This skill solves the 'flaky test' problem by capturing a live web session—including all network traffic and DOM states—and saving it to disk. You can then replay that exact session offline, ensuring that your tests or bug reproductions remain consistent even if the live website changes.

### What assets are included in this purchase?

You will receive the complete Python source code for the recorder and replayer, the CLI tools, the Tkinter GUI dashboard, and a README for quick setup. It also includes the manifest schema used for storing session data in JSONL format.

### Can I run the replayed sessions in a completely isolated environment without internet access?

Yes, the 'Strict Mock Replay' mode completely blocks live network access. The replayer serves data exclusively from the recorded local files, making it ideal for running tests in secure or air-gapped CI/CD environments where external backend access is restricted.

### What are the system requirements and compatibility for this skill?

The skill is designed for Python-based AI agents and automation frameworks. It requires Python 3.8+, Playwright, and a Chromium installation, making it compatible with most modern AI agent environments that support shell execution or Python scripting.

### How does this differ from manual network mocking in Playwright?

Unlike standard mocks that require manual effort, this skill automatically captures every HTTP/S request, binary response body, and WebSocket frame in real-time. It eliminates the need to manually write mock data, saving hours of development time when dealing with complex, data-heavy applications.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
