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
Add 'Costs' documentation to monitoring section and update JSON configuration
kalil0321115a542fab9c
diff --git a/docs/development/monitoring/costs.mdx b/docs/development/monitoring/costs.mdxnew file mode 100644index 000000000..1701f28c1--- /dev/null+++ b/docs/development/monitoring/costs.mdx@@ -0,0 +1,29 @@+---+title: "Costs"+description: "Track token usage and API costs for your browser automation tasks"+icon: "dollar-sign"+mode: "wide"+---++## Cost Tracking++To track token usage and costs, enable cost calculation:++```python+from browser_use import Agent, ChatOpenAI++agent = Agent(+ task="Search for latest news about AI",+ llm=ChatOpenAI(model="gpt-4.1-mini"),+ calculate_cost=True # Enable cost tracking+)++history = await agent.run()++# Get usage from history+print(f"Token usage: {history.usage}")++# Or get from usage summary+usage_summary = await agent.token_cost_service.get_usage_summary()+print(f"Usage summary: {usage_summary}")+```diff --git a/docs/docs.json b/docs/docs.jsonindex f8c2c0dff..d68d77ed4 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -249,7 +249,8 @@"isDefaultOpen": false,"pages": ["development/monitoring/observability",- "development/monitoring/telemetry"+ "development/monitoring/telemetry",+ "development/monitoring/costs"]},"development/get-help"