Why use Laminar with Kernel?
- No local browser management: Run automations in the cloud while maintaining full observability
- Scalability: Launch multiple browser sessions with independent traces
- Debugging: Use Kernel’s live view during development and Laminar’s session recordings for post-execution analysis
- Cost optimization: Track LLM costs across all your browser automations
- Performance tuning: Identify slow operations and optimize your agent workflows
Prerequisites
Before integrating Laminar with Kernel, you’ll need:- A Kernel account with a Kernel API Key
- A Laminar account and project
- Your Laminar project API key from the Project Settings page
Installation
Getting your Laminar API key
- Log in to your Laminar dashboard
- Navigate to Project Settings
- Generate a new API key in your project
- Copy your Project API Key
- Set it as an environment variable:
You will also need to generate a
KERNEL_API_KEY from your Kernel dashboard to authenticate with Kernel’s browser infrastructure.Browser Agent Framework Examples
Select your browser automation framework to enable Laminar tracing with Kernel:Always call
Laminar.flush() or ensure your traced functions complete to submit traces to Laminar.Playwright
Playwright is a popular low-level browser automation framework. Here’s how to use it with Laminar and Kernel:The Playwright examples include
waitForTimeout() calls to help ensure Laminar traces populate properly for these short, fast code snippets.Browser Use
Browser Use is an AI browser agent framework. Here’s how to integrate it with Laminar and Kernel:python
Stagehand
Stagehand is an AI browser automation framework. Here’s how to use it with Laminar and Kernel:Stagehand v3 requires
@lmnr-ai/lmnr@0.7.11 or later.Tracing Kernel Apps & Computer Controls
When you use Kernel’s App platform or Computer controls, Laminar will automatically trace the computer and process interactions. In addition, you don’t have to manuallyobserve your kernel app.actions or worry about manual trace flushing inside your Kernel apps.
Example Kernel app with Laminar tracing
To deploy this example on Kernel, follow the steps in Kernel’s app deployment guide.Viewing traces in Laminar
View your traces in the Laminar UI’s traces tab to see synchronized browser session recordings and agent execution steps. After running your automation:- Log in to your Laminar dashboard
- Navigate to the Traces tab
- Find your recent trace to view:
- Full execution timeline
- LLM calls and responses
- Browser session recordings
- Computer and process interactions (for Kernel apps)
- Token usage and costs
- Latency metrics
Next steps
- Explore Laminar’s tracing structure to understand how traces are organized
- Learn about Laminar’s evaluations for validating and testing your AI application outputs
- Learn about stealth mode for avoiding detection
- Learn how to deploy your app to Kernel’s platform