One of the most powerful features of using Index through the Laminar platform is the comprehensive tracing and observability it provides. When you run browser agent tasks through the API, you get:

  1. Full Browser Session Replay: Watch exactly what the browser agent saw and did during execution
  2. Synchronized Traces: See the agent’s internal reasoning process alongside browser actions
  3. Performance Metrics: Track duration, token usage, and other performance indicators
  4. Error Analysis: Easily identify and debug failures or unexpected behaviors

Setting Up Tracing

To ensure your browser agent sessions are properly traced when using the Index API, make sure you’ve initialized Laminar at the start of your application:

import { Laminar as L } from '@lmnr-ai/lmnr';

// Initialize Laminar with your project API key
L.initialize({ projectApiKey: "YOUR_PROJECT_API_KEY" });

All browser agent activities will automatically be traced and recorded in the Laminar platform, where you can access the session replays and analysis.

Viewing Session Replays

Once you run an agent through the Index API, you can access the session recording in the Traces tab of the Laminar platform.

The session replay interface provides:

  • A timeline showing the agent’s activity
  • The browser viewport showing exactly what the agent saw
  • The agent’s internal reasoning and decision-making process
  • A list of actions taken by the agent
  • Extracted data and final results

Debugging Failed Sessions

When a browser agent session fails or produces unexpected results, the trace and session replay become invaluable debugging tools:

  1. Navigate to the Traces tab in the Laminar platform
  2. Find the failed session (you can filter by status or search by metadata)
  3. Open the trace to view the session replay
  4. Examine the agent’s reasoning and decision points
  5. Look for error messages or unexpected behaviors in the browser view
  6. Check the final state and any error details

The visual replay gives you unprecedented insight into how the browser agent interprets and executes your instructions, making it easier to refine your prompts and build robust web automation workflows.

Learn More

Learn more about tracing on Laminar here.