Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
observability docs
Robert Kim8ecb7212cc77
diff --git a/docs/development/observability.mdx b/docs/development/observability.mdxnew file mode 100644index 000000000..d8d988c29--- /dev/null+++ b/docs/development/observability.mdx@@ -0,0 +1,65 @@+---+title: "Observability"+description: "Trace Browser Use's agent execution steps and browser sessions"+icon: "eye"+---++## 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).++<Note>+ Laminar excels at tracing browser agents by providing unified visibility into both browser session recordings and agent execution steps.+</Note>++## Setup++To setup Laminar, you need to install the `lmnr` package and set the `LMNR_PROJECT_API_KEY` environment variable.++To get your project API key, you can either:+- Register on [Laminar Cloud](https://lmnr.ai) and get the key from your project settings+- Or spin up a local Laminar instance and get the key from the settings page++```bash+pip install lmnr+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.++```python {5-8}+from langchain_openai import ChatOpenAI+from browser_use import Agent+import asyncio++from lmnr import Laminar+# this line auto-instruments Browser Use and any browser you use (local or remote)+Laminar.initialize(project_api_key="...") # you can also pass project api key here++async def main():+ agent = Agent(+ task="open google, search Laminar AI",+ llm=ChatOpenAI(model="gpt-4o-mini"),+ )+ result = await agent.run()+ print(result)++asyncio.run(main())+```++## Viewing Traces++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.++<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).\ No newline at end of filediff --git a/docs/images/laminar.png b/docs/images/laminar.pngnew file mode 100644index 000000000..78795c8d0Binary files /dev/null and b/docs/images/laminar.png differdiff --git a/docs/mint.json b/docs/mint.jsonindex a57d5b70b..bb3f060bc 100644--- a/docs/mint.json+++ b/docs/mint.json@@ -60,6 +60,7 @@"pages": ["development/local-setup","development/telemetry",+ "development/observability","development/roadmap"]}