Production Integrations
Use this sub-skill when the user wants Browser Use running in production or wired into another product, service, or agent platform. Keep advice safe by default: use environment variables for secrets, constrain domains when secrets are present, prefer cloud profiles for authentication, and validate every external service dependency before launching long-running tasks.
Quick Routing
| User need |
Read |
@sandbox, cloud browser execution, profile sync, Cloud REST/API flows |
references/cloud-and-sandbox.md |
| MCP server/client setup, hosted skills, cloud skill parameter/cookie validation |
references/mcp-and-skills.md |
| Slack, Discord, email/2FA, app webhooks, monitoring, telemetry opt-out |
references/integrations-and-monitoring.md |
| Production failure triage and recovery checklists |
references/troubleshooting.md |
Boundaries
- For Python
Agent(...), run loops, history, callbacks, initial actions, or task prompt design, route to ../agent-programming/SKILL.md.
- For
Browser(...), BrowserSession, BrowserProfile, local Chrome, CDP, proxy, download, HAR, recording, or domain/session parameters, route to ../browser-control/SKILL.md.
- For custom
Tools, ActionResult, parameter injection, file tools, sensitive data, and action security guardrails, route to ../tools-and-actions/SKILL.md.
- For
ChatBrowserUse, provider credentials, structured output schemas, cost calculation, or fallback model selection, route to ../llm-and-output/SKILL.md.
- For persistent terminal sessions,
browser-use/bu CLI commands, --mcp help, doctor/setup/init, and CLI cloud commands, route to ../cli-and-sessions/SKILL.md.
Production Defaults
- Recommend
ChatBrowserUse() for Browser Use automation unless the user has already selected another model; do not replace user-specified model names.
- Require
BROWSER_USE_API_KEY for Browser Use Cloud, @sandbox, cloud skills, profile sync, and cloud MCP.
- Use hosted cloud browsers for production when the user wants speed, captcha resistance, geo proxies, live streaming, or avoiding local Chromium setup.
- Use
Browser(use_cloud=True) for Python workflows that need a hosted browser but still run locally; use @sandbox when the whole browser automation function should execute in Browser Use managed infrastructure.
- Use cloud profiles for authenticated production workflows instead of embedding passwords in prompts.
- With secrets, add
allowed_domains or equivalent domain restrictions in the owning Browser/Cloud configuration.
- Keep API keys, app tokens, signing secrets, OAuth client files, and cookies out of code snippets, logs, final output, and committed files.
Minimal Cloud Browser Pattern
Use this when the app code stays local but the browser should run on Browser Use Cloud:
import asyncio
from browser_use import Agent, Browser, ChatBrowserUse
async def main():
browser = Browser(use_cloud=True)
agent = Agent(
task="Check the current page title and summarize it.",
browser=browser,
llm=ChatBrowserUse(),
)
history = await agent.run(max_steps=10)
print(history.final_result())
asyncio.run(main())
Validation before running:
python - <<'PY'
import os
from browser_use import Agent, Browser, ChatBrowserUse, sandbox
print('browser-use imports ok')
print('BROWSER_USE_API_KEY set:', bool(os.getenv('BROWSER_USE_API_KEY')))
PY
If the task also needs low-level Browser parameters such as cdp_url, allowed_domains, record_video_dir, or proxy objects, read ../browser-control/SKILL.md.
Minimal @sandbox Pattern
Use this when the user wants the function itself deployed to managed infrastructure with live browser view callbacks:
import asyncio
from browser_use import Agent, Browser, ChatBrowserUse, sandbox
@sandbox(log_level="INFO")
async def run_task(browser: Browser, task: str) -> str | None:
agent = Agent(task=task, browser=browser, llm=ChatBrowserUse())
history = await agent.run(max_steps=20)
return history.final_result()
asyncio.run(run_task("Find the top Hacker News story title."))
Operational notes:
- The decorated function must accept injected
browser as its first argument and the caller should not pass it.
- Configure
cloud_profile_id for authenticated sessions, cloud_proxy_country_code for geo/captcha needs, and cloud_timeout to cap session runtime.
- Use callbacks such as
on_browser_created, on_log, on_result, and on_error when the host app needs live URL, progress logs, or failure alerts.
@sandbox serializes the function and captured inputs for remote execution; keep captured objects small and serializable.
Cloud Task REST Pattern
Use direct REST when a service wants task-in/result-out cloud execution without embedding the Python library:
curl -X POST https://api.browser-use.com/api/v2/tasks \
-H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"task":"Search for the top Hacker News post and return title and URL."}'
Then fetch the returned session to watch live execution:
curl "https://api.browser-use.com/api/v2/sessions/$SESSION_ID" \
-H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY"
Stop a session when it is no longer needed:
curl -X PATCH "https://api.browser-use.com/api/v2/sessions/$SESSION_ID" \
-H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"stop"}'
Authentication and Profiles
- For cloud task authentication, prefer Browser Use profile sync:
export BROWSER_USE_API_KEY=... && curl -fsSL https://browser-use.com/profile.sh | sh.
- Store the returned cloud profile id in a secret manager or deployment variable, then pass it as
cloud_profile_id or Cloud API profile_id.
- If a user asks how to handle production login, recommend profile sync first, then domain-restricted secrets or custom tools only when profile sync is impossible.
- Do not tell future agents to read original repo examples for profile setup; use
references/cloud-and-sandbox.md.
MCP and Hosted Skills
- Local MCP server exposes Browser Use automation to MCP clients via stdio; details live in
references/mcp-and-skills.md.
- Cloud MCP exposes Browser Use hosted tools over HTTP and requires the Browser Use API key header.
MCPClient can register external MCP tools into a Browser Use Tools registry; if the tool is domain/file/security-sensitive, read ../tools-and-actions/SKILL.md.
- Cloud
SkillService fetches and executes hosted skills and validates inputs with Pydantic; missing cookies are explicit failures to recover via login/profile setup.
App Integration Pattern
For Slack, Discord, email, or webhook apps, use this shape:
- Verify the inbound request signature or bot token before accepting the task.
- Deduplicate event ids or message ids to avoid duplicate browser runs.
- Acknowledge quickly if the platform has a short response deadline.
- Run Browser Use asynchronously in a worker or background task.
- Use headless or cloud browser defaults in production; use cloud profiles for logged-in accounts.
- Return
history.final_result() or structured output, not raw chain-of-thought or secrets.
Read references/integrations-and-monitoring.md for platform-specific patterns.
Observability
- For Browser Use anonymous telemetry, set
ANONYMIZED_TELEMETRY=false before importing Browser Use to opt out.
- For cloud sync and hosted run views, authenticate with Browser Use Cloud and keep sync enabled.
- For third-party monitoring, Laminar and OpenLIT patterns are evidence-backed; keep vendor keys in environment variables.
- For production support tickets, collect task id/session id, live URL if safe, timestamps, model name, Browser Use version, and sanitized error logs.
Troubleshooting Entry Points
ValueError: BROWSER_USE_API_KEY environment variable is not set: set it in the process environment used by the app, worker, MCP client, or sandbox caller.
MCP SDK not installed: install Browser Use with CLI/MCP-capable extras or add mcp to the environment; then retry the MCP command.
- Sandbox has no live URL: add
on_browser_created callback and check API key/cloud connectivity.
- Cloud skill reports missing cookie: run with an authenticated cloud profile or navigate/login so required cookies are available.
- App integration times out: acknowledge immediately and move Browser Use work to a background task.
- Telemetry concerns: set
ANONYMIZED_TELEMETRY=false and restart the process.
Read references/troubleshooting.md for step-by-step diagnostics.
Handoff Checklist
Before returning a production integration answer:
- State which runtime mode is being used: local code plus cloud browser,
@sandbox, REST Cloud API, MCP, hosted skills, or external app integration.
- List required env vars without revealing values.
- Include one short validation command or import check.
- Mention safe defaults:
ChatBrowserUse, profile sync for auth, domain restrictions with secrets, and runtime/session caps.
- Cross-link sibling sub-skills only for their owned details.
1---2name: production-integrations3description: "Deploy and integrate Browser Use with sandbox execution, Browser4 Use Cloud, MCP, hosted skills, profile sync, observability, telemetry, and5 external app integrations. Use for production deployment prompts, cloud6 profiles/proxies, live session monitoring, MCP server/client setup, cloud7 skill execution, Slack/Discord/email app patterns, and monitoring/telemetry."8disable-model-invocation: true9metadata:10 source: https://skillmd.com/skills/vectorspacelab/production-integrations11 disco-role: operating12license: MIT13---1415# Production Integrations1617Use this sub-skill when the user wants Browser Use running in production or wired into another product, service, or agent platform. Keep advice safe by default: use environment variables for secrets, constrain domains when secrets are present, prefer cloud profiles for authentication, and validate every external service dependency before launching long-running tasks.1819## Quick Routing2021| User need | Read |22| --- | --- |23| `@sandbox`, cloud browser execution, profile sync, Cloud REST/API flows | `references/cloud-and-sandbox.md` |24| MCP server/client setup, hosted skills, cloud skill parameter/cookie validation | `references/mcp-and-skills.md` |25| Slack, Discord, email/2FA, app webhooks, monitoring, telemetry opt-out | `references/integrations-and-monitoring.md` |26| Production failure triage and recovery checklists | `references/troubleshooting.md` |2728## Boundaries2930- For Python `Agent(...)`, run loops, history, callbacks, initial actions, or task prompt design, route to `../agent-programming/SKILL.md`.31- For `Browser(...)`, `BrowserSession`, `BrowserProfile`, local Chrome, CDP, proxy, download, HAR, recording, or domain/session parameters, route to `../browser-control/SKILL.md`.32- For custom `Tools`, `ActionResult`, parameter injection, file tools, sensitive data, and action security guardrails, route to `../tools-and-actions/SKILL.md`.33- For `ChatBrowserUse`, provider credentials, structured output schemas, cost calculation, or fallback model selection, route to `../llm-and-output/SKILL.md`.34- For persistent terminal sessions, `browser-use`/`bu` CLI commands, `--mcp` help, doctor/setup/init, and CLI cloud commands, route to `../cli-and-sessions/SKILL.md`.3536## Production Defaults3738- Recommend `ChatBrowserUse()` for Browser Use automation unless the user has already selected another model; do not replace user-specified model names.39- Require `BROWSER_USE_API_KEY` for Browser Use Cloud, `@sandbox`, cloud skills, profile sync, and cloud MCP.40- Use hosted cloud browsers for production when the user wants speed, captcha resistance, geo proxies, live streaming, or avoiding local Chromium setup.41- Use `Browser(use_cloud=True)` for Python workflows that need a hosted browser but still run locally; use `@sandbox` when the whole browser automation function should execute in Browser Use managed infrastructure.42- Use cloud profiles for authenticated production workflows instead of embedding passwords in prompts.43- With secrets, add `allowed_domains` or equivalent domain restrictions in the owning Browser/Cloud configuration.44- Keep API keys, app tokens, signing secrets, OAuth client files, and cookies out of code snippets, logs, final output, and committed files.4546## Minimal Cloud Browser Pattern4748Use this when the app code stays local but the browser should run on Browser Use Cloud:4950```python51import asyncio52from browser_use import Agent, Browser, ChatBrowserUse5354async def main():55 browser = Browser(use_cloud=True)56 agent = Agent(57 task="Check the current page title and summarize it.",58 browser=browser,59 llm=ChatBrowserUse(),60 )61 history = await agent.run(max_steps=10)62 print(history.final_result())6364asyncio.run(main())65```6667Validation before running:6869```bash70python - <<'PY'71import os72from browser_use import Agent, Browser, ChatBrowserUse, sandbox73print('browser-use imports ok')74print('BROWSER_USE_API_KEY set:', bool(os.getenv('BROWSER_USE_API_KEY')))75PY76```7778If the task also needs low-level `Browser` parameters such as `cdp_url`, `allowed_domains`, `record_video_dir`, or proxy objects, read `../browser-control/SKILL.md`.7980## Minimal `@sandbox` Pattern8182Use this when the user wants the function itself deployed to managed infrastructure with live browser view callbacks:8384```python85import asyncio86from browser_use import Agent, Browser, ChatBrowserUse, sandbox8788@sandbox(log_level="INFO")89async def run_task(browser: Browser, task: str) -> str | None:90 agent = Agent(task=task, browser=browser, llm=ChatBrowserUse())91 history = await agent.run(max_steps=20)92 return history.final_result()9394asyncio.run(run_task("Find the top Hacker News story title."))95```9697Operational notes:9899- The decorated function must accept injected `browser` as its first argument and the caller should not pass it.100- Configure `cloud_profile_id` for authenticated sessions, `cloud_proxy_country_code` for geo/captcha needs, and `cloud_timeout` to cap session runtime.101- Use callbacks such as `on_browser_created`, `on_log`, `on_result`, and `on_error` when the host app needs live URL, progress logs, or failure alerts.102- `@sandbox` serializes the function and captured inputs for remote execution; keep captured objects small and serializable.103104## Cloud Task REST Pattern105106Use direct REST when a service wants task-in/result-out cloud execution without embedding the Python library:107108```bash109curl -X POST https://api.browser-use.com/api/v2/tasks \110 -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \111 -H "Content-Type: application/json" \112 -d '{"task":"Search for the top Hacker News post and return title and URL."}'113```114115Then fetch the returned session to watch live execution:116117```bash118curl "https://api.browser-use.com/api/v2/sessions/$SESSION_ID" \119 -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY"120```121122Stop a session when it is no longer needed:123124```bash125curl -X PATCH "https://api.browser-use.com/api/v2/sessions/$SESSION_ID" \126 -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \127 -H "Content-Type: application/json" \128 -d '{"action":"stop"}'129```130131## Authentication and Profiles132133- For cloud task authentication, prefer Browser Use profile sync: `export BROWSER_USE_API_KEY=... && curl -fsSL https://browser-use.com/profile.sh | sh`.134- Store the returned cloud profile id in a secret manager or deployment variable, then pass it as `cloud_profile_id` or Cloud API `profile_id`.135- If a user asks how to handle production login, recommend profile sync first, then domain-restricted secrets or custom tools only when profile sync is impossible.136- Do not tell future agents to read original repo examples for profile setup; use `references/cloud-and-sandbox.md`.137138## MCP and Hosted Skills139140- Local MCP server exposes Browser Use automation to MCP clients via stdio; details live in `references/mcp-and-skills.md`.141- Cloud MCP exposes Browser Use hosted tools over HTTP and requires the Browser Use API key header.142- `MCPClient` can register external MCP tools into a Browser Use `Tools` registry; if the tool is domain/file/security-sensitive, read `../tools-and-actions/SKILL.md`.143- Cloud `SkillService` fetches and executes hosted skills and validates inputs with Pydantic; missing cookies are explicit failures to recover via login/profile setup.144145## App Integration Pattern146147For Slack, Discord, email, or webhook apps, use this shape:1481491. Verify the inbound request signature or bot token before accepting the task.1502. Deduplicate event ids or message ids to avoid duplicate browser runs.1513. Acknowledge quickly if the platform has a short response deadline.1524. Run Browser Use asynchronously in a worker or background task.1535. Use headless or cloud browser defaults in production; use cloud profiles for logged-in accounts.1546. Return `history.final_result()` or structured output, not raw chain-of-thought or secrets.155156Read `references/integrations-and-monitoring.md` for platform-specific patterns.157158## Observability159160- For Browser Use anonymous telemetry, set `ANONYMIZED_TELEMETRY=false` before importing Browser Use to opt out.161- For cloud sync and hosted run views, authenticate with Browser Use Cloud and keep sync enabled.162- For third-party monitoring, Laminar and OpenLIT patterns are evidence-backed; keep vendor keys in environment variables.163- For production support tickets, collect task id/session id, live URL if safe, timestamps, model name, Browser Use version, and sanitized error logs.164165## Troubleshooting Entry Points166167- `ValueError: BROWSER_USE_API_KEY environment variable is not set`: set it in the process environment used by the app, worker, MCP client, or sandbox caller.168- `MCP SDK not installed`: install Browser Use with CLI/MCP-capable extras or add `mcp` to the environment; then retry the MCP command.169- Sandbox has no live URL: add `on_browser_created` callback and check API key/cloud connectivity.170- Cloud skill reports missing cookie: run with an authenticated cloud profile or navigate/login so required cookies are available.171- App integration times out: acknowledge immediately and move Browser Use work to a background task.172- Telemetry concerns: set `ANONYMIZED_TELEMETRY=false` and restart the process.173174Read `references/troubleshooting.md` for step-by-step diagnostics.175176## Handoff Checklist177178Before returning a production integration answer:179180- State which runtime mode is being used: local code plus cloud browser, `@sandbox`, REST Cloud API, MCP, hosted skills, or external app integration.181- List required env vars without revealing values.182- Include one short validation command or import check.183- Mention safe defaults: `ChatBrowserUse`, profile sync for auth, domain restrictions with secrets, and runtime/session caps.184- Cross-link sibling sub-skills only for their owned details.