Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Updated Laminar docs

Robert Kim5f4ee0c4a385
diff --git a/docs/development/monitoring/observability.mdx b/docs/development/monitoring/observability.mdx
index 65ecd2c34..937bad736 100644
--- a/docs/development/monitoring/observability.mdx
+++ b/docs/development/monitoring/observability.mdx
@@ -1,42 +1,47 @@
---
title: "Observability"
-description: "Trace Browser Use's agent execution steps and browser sessions"
+description: "Trace Browser Use's agent execution steps and capture browser session recording"
icon: "eye"
mode: "wide"
---
## Overview
-Browser Use has a native integration with [Laminar](https://lmnr.ai) - open-source platform for tracing, evals and labeling of AI agents.
-Read more about Laminar in the [Laminar docs](https://docs.lmnr.ai).
+Browser Use has a native integration with [Laminar](https://laminar.sh) - open-source platform for monitoring and analyzing error patterns in AI agents.
+Laminar SDK automatically captures **agent execution steps, costs and browser session recordings** of Browser Use agent.
+Browser session recordings allows developers to see full video replay of the browser session, which is useful for debugging Browser Use agent.
## Setup
+Install Laminar python SDK.
+```bash
+pip install lmnr
+```
-
-Register on [Laminar Cloud](https://lmnr.ai) and get the key from your project settings.
-Set the `LMNR_PROJECT_API_KEY` environment variable.
+Register on [Laminar Cloud](https://laminar.sh) or [self-host Laminar](https://github.com/lmnr-ai/lmnr), create a project and get the project API key from your project settings. Set the `LMNR_PROJECT_API_KEY` environment variable.
```bash
-pip install 'lmnr[all]'
export LMNR_PROJECT_API_KEY=<your-project-api-key>
```
## Usage
-Then, you simply initialize the Laminar at the top of your project and both Browser Use and session recordings will be automatically traced.
+Then, you simply initialize the Laminar at the top of your project and both Browser Use agent traces and session recordings will be automatically captured.
-```python {5-8}
-from browser_use import Agent, ChatBrowserUse
+```python {7-9}
+from browser_use import Agent, ChatGoogle
import asyncio
-from lmnr import Laminar, Instruments
-# this line auto-instruments Browser Use and any browser you use (local or remote)
-Laminar.initialize(project_api_key="...", disabled_instruments={Instruments.BROWSER_USE_SESSION})
+from lmnr import Laminar
+import os
+
+# At initialization time, Laminar auto-instruments
+# Browser Use and any browser you use (local or remote)
+Laminar.initialize(project_api_key=os.getenv('LMNR_PROJECT_API_KEY'))
async def main():
agent = Agent(
- task="open google, search Laminar AI",
- llm=ChatBrowserUse(),
+ task="go to ycombinator.com, summarize 3 startups from the latest batch",
+ llm=ChatGoogle(model="gemini-2.5-flash"),
)
await agent.run()
@@ -48,14 +53,14 @@ asyncio.run(main())
You can view traces in the Laminar UI by going to the traces tab in your project.
When you select a trace, you can see both the browser session recording and the agent execution steps.
-Timeline of the browser session is synced with the agent execution steps, timeline highlights indicate the agent's current step synced with the browser session.
-In the trace view, you can also see the agent's current step, the tool it's using, and the tool's input and output. Tools are highlighted in the timeline with a yellow color.
+Timeline of the browser session is synced with the agent execution steps.
+In the trace view, you can also see the agent's current step, the tool it's using, and the tool's input and output.
<img className="block" src="/images/laminar.png" alt="Laminar" />
## Laminar
-To learn more about tracing and evaluating your browser agents, check out the [Laminar docs](https://docs.lmnr.ai).
+To learn more about how you can trace and evaluate your Browser Use agent with Laminar, check out [Laminar docs](https://docs.lmnr.ai).
## Browser Use Cloud Authentication
diff --git a/docs/images/laminar.png b/docs/images/laminar.png
index abea110b3..5d6f3cdf6 100644
Binary files a/docs/images/laminar.png and b/docs/images/laminar.png differ