production-integrations
Deploy and integrate Browser Use with sandbox execution, Browser Use Cloud, MCP, hosted skills, profile sync, observability, telemetry, and external app integrations. Use for production deployment prompts, cloud profiles/proxies, live session monitoring, MCP server/client setup, cloud skill execution, Slack/Discord/email app patterns, and monitoring/telemetry.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- production-integrations
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Deploy and integrate Browser Use with sandbox execution, Browser Use Cloud, MCP, hosted skills, profile sync, observability, telemetry, and external app integrations. Use for production deployment prompts, cloud profiles/proxies, live session monitoring, MCP server/client setup, cloud skill execution, Slack/Discord/email app patterns, and monitoring/telemetry.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/cloud-and-sandbox.md8.2 KB
- 参考文档references/integrations-and-monitoring.md3.4 KB
- 参考文档references/mcp-and-skills.md8.0 KB
- 参考文档references/troubleshooting.md2.8 KB
03 SKILL.md 正文
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/buCLI commands,--mcphelp, 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_KEYfor 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@sandboxwhen 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_domainsor 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
browseras its first argument and the caller should not pass it. - Configure
cloud_profile_idfor authenticated sessions,cloud_proxy_country_codefor geo/captcha needs, andcloud_timeoutto cap session runtime. - Use callbacks such as
on_browser_created,on_log,on_result, andon_errorwhen the host app needs live URL, progress logs, or failure alerts. @sandboxserializes 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_idor Cloud APIprofile_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.
MCPClientcan register external MCP tools into a Browser UseToolsregistry; if the tool is domain/file/security-sensitive, read../tools-and-actions/SKILL.md.- Cloud
SkillServicefetches 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=falsebefore 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 addmcpto the environment; then retry the MCP command.- Sandbox has no live URL: add
on_browser_createdcallback 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=falseand 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.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).