Browser Use
Lets an agent run real browser-automation tasks on Browser Use
Cloud - it drives a remote Chromium with an LLM, and you can watch it live and
take over (for logins, 2FA, CAPTCHA) in the live browser. Use FlyMyAI's configured
shared account, or save your own Browser Use key on the connection. Customer-key
usage is paid on your Browser Use account. In agent chats, platform-key usage is
billed through FlyMyAI with the provider service margin, and an idempotent replay
reuses the original billing observation. Direct REST/MCP and compiled-runtime
tool dispatch do not yet create the canonical ToolCall charge row; this release
deliberately leaves that shared billing boundary unchanged. live_url,
live_url_clean, and the compatibility share_url are bearer-like, full-control
links to the active browser. Never publish or log them as a public replay.
What it can do
- run_browser_task - start a task ("log into X and download the latest invoice", "fill out this form", "compare prices across these sites"); returns a session and credential-like live takeover links for the trusted requesting user.
- wait_for_browser_task - follow a running task (short waits; re-poll for long ones). It is a pure read and never creates durable agent files.
- get_browser_task - check bounded status, result, session configuration, step, token and cost evidence.
- list_browser_sessions - inspect this execution and connection's recent sessions with last-observed status/cost, without listing the shared provider account.
- get_browser_session_messages - page through visible activity summaries using exact returned cursors. Hidden messages, raw action data and signed screenshot URLs are intentionally omitted.
- get_browser_recording - after a task finishes, save ordered durable demos (MP4 recordings + final screenshot + downloaded output files) into your agent files.
- recover_browser_artifact - after a partial demo collection, recover exactly one missing durable recording index or screenshot without repeating the browser task or the bulk output-file collection.
- share_browser_session - get the clean compatibility live-takeover link for a trusted operator. It is not a public read-only share.
- send_task - a follow-up step on a kept-alive session (same logged-in browser).
- stop_browser_task - stop / cancel a session.
- list_browser_profiles - inspect the saved account of the selected connection, without listing other customers on the shared Browser Use account.
- get_browser_profile - inspect its name, saved cookie domains and bounded timestamps. Neither action returns cookie values; cookie presence does not prove a valid login.
Results come back as text (or typed JSON if you ask for a schema), bounded session evidence, and durable file references only after an explicitly approved collection.
Current Cloud MCP coverage
New sessions run on the Browser Use Cloud v4 runs API. Requests v4 cannot
serve (code_mode, use_own_llm_key, v3-only model ids) and sessions started
before the switch use the
Cloud v3 sessions API.
Public tool names follow FlyMyAI's existing catalog; no second MCP proxy or tool
registry is needed. Provider-wide listings are restricted to the exact authorized
execution and connection, and message output is a bounded projection.
| Browser Use Cloud v4 operation | FlyMyAI action |
|---|---|
| create run | run_browser_task |
| get session, run, browsers and cost | get_browser_task / wait_for_browser_task |
| create run in the same session | send_task |
| cancel run and stop browsers | stop_browser_task |
| run events (agent text and tool steps) | get_browser_session_messages |
| owned sessions of this run | list_browser_sessions |
| profiles | list_browser_profiles |
This is not a claim of support for every separate Browser Use product. The legacy v2 MCP, local direct-control MCP and project administration are distinct interfaces. Legacy skill creation and refinement are retired and are not exposed. Do not use an old MCP endpoint as a silent fallback or export raw cookies into an agent prompt.
Task controls
New sessions run on Browser Use Cloud v4 and pin the economical gpt-6-luna
model. Requests with code_mode=true, use_own_llm_key=true or a v3-only model id
(bu-mini, bu-max, bu-ultra, gpt-5.4-mini, claude-haiku-4.5, ...) run on
Cloud v3 with gpt-5.6-luna. model can override the default, and
thinking_level accepts disabled, low, medium or high; the provider rejects
unsupported combinations. browser_screen_width (320-6144) and
browser_screen_height (320-3456) must be supplied together. code_mode=true
requests a structured text/code result, not automatic execution of returned code
by FlyMyAI. use_own_llm_key=true uses a key already saved in the customer's
Browser Use project and requires that customer's Browser Use connection. It never
forwards a FlyMyAI model credential; specify it on each task that needs it.
max_cost_usd is the additional provider budget for each task, default $1. A
follow-up requires an idle kept-alive session, preserves its current model unless
overridden, and adds this allowance to the observed cumulative spend. Stop the
session when done; keeping a browser open can continue to incur costs.
A saved profile bound to the selected connection is used by default. Set
use_saved_profile=false and omit profile_id for an explicit logged-out session.
This changes only the browser state used by that run; it does not detach or delete
the connection's saved profile.
Omit proxy_country_code to use Browser Use's default proxy behavior. Pass an
explicit JSON null to disable the proxy for that task. A two-letter country code
requests that residential proxy location; use the user's real geography rather
than trying to evade a site's security checks.
Project-wide learned skills, script caching/automatic healing, provider schedules
and automatic mailbox creation are explicitly disabled. They are not substitutes
for tenant-isolated FlyMyAI files, accepted agent versions or scheduling. The
/browser-use page opens those existing chat and connection flows; it does not
maintain a separate browser-session database or scheduler.
Bounded task evidence
Task reads return the exact session_id, status, output, is_success,
needs_human, and a bounded note. Where Browser Use reports them, the response
also projects model, thinking_level, title, output_schema, profile_id,
workspace_id, proxy_country_code, viewport dimensions, max_cost_usd, and
creation/update timestamps. Progress and metering are separate fields:
step_count, bounded last_step_summary, total_input_tokens,
total_output_tokens, llm_cost_usd, proxy_cost_usd, browser_cost_usd,
proxy_used_mb, and total_cost_usd.
A missing optional field remains empty or null; it is not guessed. The raw
provider screenshot URL and ordered recordingUrls stay internal because they are
short-lived signed URLs. A successful status or prose summary is not proof that a
download, action, or durable file exists.
Record demos
Ask the agent to record a task and you get a clean MP4 of the whole session - handy for demos and walkthroughs.
- Turn on recording. Set
enable_recordingand you get an MP4 covering the entire run. - Approve sensitive capture. In agent chat or a compiled workflow, the first recording
request returns a signed
ALLOW_BROWSER_USE_SESSION_RECORDING ...line and does not start the browser. Send that exact line in a later user message, then the agent repeats the unchanged request withrecording_consent_token. The agent cannot approve on your behalf. - Durable MP4s in your agent files. Browser Use can return an ordered
recordingUrlsarray of short-lived presigned links (~1 hour). Those links stay internal. Durable/public media is never auto-saved: even a session without a saved profile can receive credentials or private data through live takeover. Call get_browser_recording explicitly - it downloads the bounded ordered recordings, final screenshot and requested output files into permanent agent files.recording_files[].public_urlis the durable read-only evidence. The singularrecording_fileis a compatibility alias and exists only when recording index 0 was persisted.recording_count,recording_urls_observed_truncated,recording_files_truncated,recording_files_missing_indices, andnext_recording_indexdescribe exact partial work. Recover one missing entry withrecover_browser_artifact(kind="recording", recording_index=...); do not rerun the browser task or bulk collection. Persisting the recording/screenshot and persisting output files have separate signed approval lines and one-time fields:durable_media_consent_tokenandoutput_file_consent_token. Both are required when both effects are requested. One collection has a 256 MiB aggregate durable-artifact budget plus count and time bounds; each returnedAgentFileremains valid if a later artifact cannot be saved. - Clean live takeover view.
live_url_cleanis the same interactive live session with the browser chrome (URL bar, tabs) hidden (ui=false). Pick a theme withlive_view_theme(lightordark). It grants the same control aslive_url, so expose either link only to the trusted requesting user and stop the session to revoke it. - Compatibility live link.
share_url(or share_browser_session) aliases the clean full-control live view. It is not a public read-only share or durable replay. - Output files. Files the agent downloads during the task are listed and saved into
your agent files as well (
output_files), so a demo can ship its artifacts. Each saved output includes the providersourceand original exactpath; these form its recovery identity even when directories or basenames overlap.
Keep a session open for manual testing
To keep a session open after the task finishes - for example to manually test a chat or
take over via the live view - set keep_alive=true. The session then stays alive so you
can interact via live_url (or send a follow-up step with send_task) instead of closing
right after the task ends.
A kept-alive session keeps reserving the browser and continues accruing the provider's browser, model and optional proxy usage. Rates depend on the Browser Use plan and can change; check current Browser Use pricing. Always call stop_browser_task when you are done - don't leave an idle session running.
Limitations (cloud)
The current FlyMyAI adapter uses Browser Use Cloud's v4 runs API for new sessions and the v3 session API for v3-only requests. Do not assume that its actions are identical to the separate Cloud MCP or local MCP contracts. Relevant limitations:
- No GIF export. Cloud produces an MP4 only; GIF is a self-hosted-only feature.
- No persistent public replay URL. Browser Use Cloud has no separate shareable replay
page -
live_url,live_url_clean, andshare_urlgrant full interaction with the live session while it is alive. For durable read-only evidence, share an authorizedrecording_files[].public_urlinstead. - Highlight overlays can't be turned off on cloud. The colored element-highlight boxes
the agent draws are always on; to record without them you would need to self-host Browser
Use (
highlight_elements=False). - Recording is whole-task. There is no manual start/stop - the MP4 covers the entire session.
- Presigned URLs expire fast. Provider recording URLs last about 1 hour and the final screenshot URL about 5 minutes. Workspace-file URLs last about 60 seconds; native browser-download URLs about 15 minutes. FlyMyAI keeps them out of normal results and saves approved durable copies into your agent files.
- Sensitive sessions. Any recording or screenshot may show logged-in or private
content, including credentials entered through live takeover without a saved profile.
FlyMyAI only persists media after an explicit
get_browser_recording(persist=true)request made after the task settles. Share such recordings carefully.
Logins, 2FA and your passwords
The agent never needs your password in chat. In the Browser Use connection's settings, choose Create saved browser. This creates a profile and binds it to that same connection. It becomes the default for subsequent tasks; you do not need to copy profile IDs into ordinary prompts. Creating a profile alone does not log you in.
Start a task using this connection, open its live view, and sign in yourself. Use
keep_alive=true when you need time for manual takeover. When finished, stop the
session with stop_browser_task(strategy="session"). A fresh session without a
bound profile must not be described as a saved account.
One mutable saved profile can back only one unresolved session at a time. FlyMyAI
reserves it before session creation. The lease is released only after the provider
confirms stopped, confirms timed_out inactivity cleanup, or returns exact-session
not-found evidence. A bare error does not prove sandbox cleanup, so the profile stays
locked for explicit stop or reconciliation. strategy="task" and an idle kept-alive
session also retain the lease. After timed_out, the latest browser-state changes may
not have reached the saved profile. A lost create or stop response remains blocked for
reconciliation instead of risking two browser snapshots overwriting cookies or local
storage.
For another account, add a second Browser Use connection and select it explicitly. Advanced users can inspect stable connection/profile IDs in Account details. The simple flow and explicit-ID flow use the same encrypted connection binding.
FlyMyAI does not accept the old domain-scoped secrets input or a
use_vision toggle. Those inputs are rejected, not silently weakened or sent as
unsupported provider fields. Never put a password in task or send_task text.
When a task hits 2FA / SMS / CAPTCHA / "verify it's you" / a forced password change, the agent pauses and hands you the live view to complete it - then carries on.
How to get credentials
No Browser Use credential is required when FlyMyAI's platform connection is enabled. To use your own Browser Use account and provider billing instead:
- Sign up at browser-use.com and open cloud.browser-use.com -> Settings -> API keys.
- Create a key (it starts with
bu_). - Save it on the exact Browser Use connection in FlyMyAI.
Fields to fill in FlyMyAI
| Field | Required | Notes |
|---|---|---|
BROWSER_USE_API_KEY | optional when platform credentials are configured | Your bu_... key uses your own provider account. Save key changes before creating a profile. |
BROWSER_USE_PROFILE_ID | optional | Bound automatically by Create saved browser. Advanced imports must belong to the same provider account; shared-account IDs must also carry the exact connection tag. |
Owner API and SDK
Read the binding with GET /api/v1/agents/tools/{id}/browser-profile/. Create the
initial profile with POST to that same route and {"name": "My browser"}.
The route is owner-authenticated and connection-scoped. A second tab or lost HTTP
response cannot start a second initial profile creation. status="unknown" or
HTTP 409 requires inspection, not another creation attempt. A concurrent
credential change or revocation is never overwritten by the older request.
When the original setup receipt contains an exact profile ID but the final local
write was interrupted, POST /api/v1/agents/tools/{id}/browser-profile-reconcile/
inspects only that profile, verifies its stable connection owner tag and binds it
atomically. It never lists profiles or creates another one.
Browser task calls also require an existing addressable agent execution. Both
POST /api/v1/agents/tools/{id}/call/ and POST /api/v1/agents/custom-tools/call/
accept execution_id; keep the same execution and exact connection for creation,
polling, files, follow-ups and stop. SDK client.tools.call(..., execution_id=...)
supports that context in sync and async clients. The browser adapter rejects
creation without it before starting a paid session; it does not create a second
chat behind your back. Profile setup itself does not require a chat.
Passing execution_id to a direct REST/MCP or compiled-runtime tool call
supplies authority and recovery context; it is not evidence that the call
created a wallet charge. Those surfaces currently do not create the canonical
ToolCall billing row. Agent-chat dispatch continues to use the existing shared
billing path, while customer-key provider usage remains on the customer's Browser
Use account. No provider-specific wallet or parallel billing ledger is introduced.
get_browser_recording, recover_browser_artifact, and download_browser_file
write durable agent files, even though their names describe retrieval. Direct callers must supply a stable
Idempotency-Key and reuse it for the same request after a lost response. An
unknown operation outcome requires inspection, not a fresh key and another write.
An authenticated owner making that exact direct REST request is the explicit
requester. Agent-chat and compiled calls instead require the signed two-turn
consent handshake described above. Each token expires after 15 minutes, is consumed
once, and is bound to the execution, exact connection, action and request arguments.
The candidate SDK exposes the same objects in sync and async clients:
connection = client.tools.create(mcp_tool="browser_use")
binding = client.tools.create_browser_profile(connection.id, name="My browser")
binding = client.tools.get_browser_profile(connection.id)
# If creation returned an unknown outcome, inspect and bind only its retained ID.
binding = client.tools.reconcile_browser_profile(connection.id)
These are owner connection setup methods. They do not create external principals, change customer mappings or switch the billing owner. FlyMyAI-managed mappings can explicitly grant the configured owner connection. Customer-managed mappings must provide their own exact customer connection and profile configuration; the owner setup route is not a fallback for missing customer authority.
Social media and downloaded files
Watching a video, a successful task status, or a browser recording is not proof
that the original media was downloaded. For transcription, require an actual
source-media file in output_files, then extract its audio and transcribe that
audio. A screenshot is not a video. Keep the source file and transcript linked.
File collection is bounded by page, file-count, byte and time limits. A partial
collection preserves files already saved and reports truncation/recovery; it does
not claim every download succeeded. Recover an absent MP4 index or screenshot with
recover_browser_artifact(session_id, kind="recording"|"screenshot", recording_index=...); omit recording_index only for the first recording or a
screenshot. Recovery is available only after a partial get_browser_recording
receipt and never repeats the browser task or bulk collection. Use list_browser_files with
source="workspace" or source="browser" to page beyond the automatic collection
limit. For workspace, FlyMyAI uses the official workspace-files endpoint selected
from the exact owned session's workspace_id. It uses the observed session-local
compatibility endpoint only when that ID is null; it never lists provider-wide
workspaces. The browser source resolves the exact session's child browser.
next_cursor opens the next page. To save one file, call
download_browser_file with its exact path and the cursor used to list that page
(not the returned next-page cursor). In chat or compiled execution, first surface
the returned approval line and wait for the user, then repeat with
output_file_consent_token. Each explicit download is capped at the 256 MiB
AgentFile ceiling and must match the listed byte count. Workspace signed URLs last
about 60 seconds and browser-download URLs about 15 minutes. Metadata and extensions alone do not verify media
type: decode the actual audio with media_editor.extract_audio before sending it
to a speech-to-text tool. If bulk collection is truncated, compare each returned
output_files[].source + output_files[].path pair with both paginated provider
sources and download only missing pairs. Always stop the browser session afterward.
Login walls, CAPTCHA, unavailable media and platform restrictions must be reported
as such. Do not claim universal Instagram, TikTok or other social-site support
without a successful end-to-end result for the requested media.
Ask naturally - usually a link plus a short outcome such as "download and transcribe
this video". Release validation passes a social-media download/transcription case only
when the trace proves a real source-media AgentFile, decodable audio derived from that
exact file, and a transcript linked to both. Agent prose, a screenshot, page HTML, a
recording of the browser, a blob URL, or an expiring provider URL is not a substitute.
Likes, comments, counts and "most liked" searches are usable only when the requested
site exposes that evidence to the active public or authenticated session. Record the
visible source and limits; do not infer hidden engagement or claim success from navigation.
Good to know
- Cost includes browser time, optional proxy and model usage. Customer-key usage is paid to Browser Use. Platform-key agent-chat usage goes through FlyMyAI's canonical tool billing; so do direct REST/MCP and compiled-runtime tool calls, which hold their price on your balance before they run. A provider's cumulative cost is not a second charge for every status observation.
- Confirm before irreversible actions - the agent is told to ask before purchases, sends, or anything it cannot undo.
- Navigation hints are not security boundaries.
allowed_domainsandstart_urlare task instructions, not enforced network or credential isolation. - Pick a model per task - the default is a fast, cheap one; heavier sites can use a stronger model.
Troubleshooting
- "BROWSER_USE_API_KEY is not set" - paste your
bu_key in the tool setup. - Stuck on a login / verification - open the live-view URL and complete it yourself; use the bound saved profile if the login should be reused next time.
- Profile setup was not confirmed - refresh the same connection. Do not create another connection to repeat an ambiguous provider operation. Inspect a known profile receipt before an explicit repair; missing receipts require operator review.
- "Too many concurrent sessions" - your Browser Use plan caps concurrency; finish or stop running sessions, or upgrade your plan.
- "saved browser profile is already attached" - continue and stop the existing
session with
strategy="session". If its create/stop result was lost and no exact handle is available, an operator must reconcile the durable unknown lease; do not bypass it with another run on the same profile. - The session says
timed_out- Browser Use confirmed inactivity cleanup, so the profile lease can be released, but the last browser-state changes may not have been saved. - The session says
error- do not assume its sandbox was destroyed. Stop or reconcile that exact session before reusing its saved profile.