Skip to main content

Overview

Laminar provides session replay for browser agents. Alongside your trace, you get a recording of the browser run synced with your spans (LLM calls, tool calls, and browser automation steps). This makes it much easier to debug failed automations and understand why the agent took a specific action.

Session replay for browser agents

Laminar traces LLM calls via auto-instrumentation, and records browser sessions via native integrations with common browser automation frameworks: In the Laminar trace view, you can scrub the recording and correlate moments in the browser with the spans that produced them.

Getting started

If you don’t have a project API key, you can get one by signing up on Laminar or spinning up a self-hosted instance and getting a key from the project settings.
Follow the integration guide for your framework to enable tracing + session replay:

Privacy: masking inputs

If your agent interacts with sensitive forms, configure session replay input masking so typed values aren’t recorded.
import { Laminar } from '@lmnr-ai/lmnr';

Laminar.initialize({
  projectApiKey: process.env.LMNR_PROJECT_API_KEY,
  sessionRecordingOptions: {
    maskInputOptions: {
      text: true,
      textarea: true,
      email: true,
      tel: true,
      number: true,
    },
  },
});
See also: SessionRecordingOptions and Laminar.initialize.

What it looks like

When you open a trace, you’ll see a session replay panel below the timeline. Scrubbing the recording keeps the trace timeline in sync, so you can jump between what happened in the browser and the spans that produced it. This works similarly for other supported browser-agent frameworks (Stagehand, Playwright, Puppeteer, Skyvern) when instrumented via their Laminar integrations.