Skip to content

FR: evaluate agent-browser (native Rust, MCP stdio) as the managed browser tier backend #124

Open

Description

@ttmuse

Proposal

Evaluate agent-browser (Vercel Labs, Apache-2.0) as the backend for the managed browser tier, instead of — or alongside — @playwright/mcp. Target the latest release, v0.43.0 (2026-11-12).

Related: #118 (browser tiers / Playwright bundling overhead), #119 (Linux installer tier), #123 (stdio MCP client + managed Playwright tier).

Why

The current tier P plan asks the wizard to download Node + @playwright/mcp + Chromium on demand — a few hundred MB, three supply chains to verify, and a Node runtime to keep updated on the user's machine. agent-browser removes most of that:

@playwright/mcp tier (current plan) agent-browser tier
Runtime Node.js required None — single native Rust binary
Install payload Node + npm package + Chromium (a few hundred MB) ~17 MB binary (v0.43 ships per-platform packages; only the host platform downloads) + Chrome for Testing
MCP transport stdio stdio — agent-browser mcp, newline-delimited JSON-RPC
Browser control Playwright Direct CDP to Chrome; daemon is native Rust, no Playwright/Puppeteer dependency
Startup Node + server boot ~2 ms CLI startup (project figures)

v0.43 specifically matters: earlier versions bundled every platform's binary into the npm package (128 MB) and routed through a Node wrapper. 0.43 ships per-platform native packages and links the command directly to the native binary (17 MB, 7.5× smaller), so the "npm install" story is no longer a reason to avoid it.

Fit with the phase 1 architecture

What it does not solve / open questions

  • Chrome for Testing still has to be downloaded (agent-browser install); the browser binary is not part of the 17 MB. The wizard step shrinks from "Node + MCP + Chromium" to "one binary + browser", but it does not disappear.
  • The headed, persistent-profile first-login flow needs the same real-machine spike Re-evaluate browser_* tools for a click-through install (Playwright bundling overhead) #118 already plans (consent prompts, profile locking, daemon lifecycle under ManagedProcess).
  • Tool surface differs from Playwright MCP's 32 tools; the backend-interface mapping (Re-evaluate browser_* tools for a click-through install (Playwright bundling overhead) #118 decision 1) still has to be done per tier.
  • It is a fast-moving 0.x project. Pinning a version + checksum verification (the supply-chain rules already in the design) would be required, and upgrades should be deliberate.
  • --auto-connect (attaching to the user's already-running Chrome) exists, but combining it with the domain allowlist is restricted upstream; treat the real-profile use case as still served by the Apple Events tier.

Suggested next step

Add agent-browser to the tier spike list: spawn agent-browser mcp (v0.43.0, pinned) under the #123 ManagedProcess, run the same capability checklist used for the Playwright tier, and compare install size, startup latency, and tool coverage. If it holds up, the wizard's on-demand step can offer it as the lightweight managed tier, with Playwright kept as the heavyweight option.

References: repo, v0.43 changelog, MCP server docs (agent-browser mcp, profiles core / network / state / debug / tabs / react / mobile / all).

Activity

  1. ttmuse commented on Nov 14, 2026

    @ttmuse
    Author

    Clarification: dual install as an option, not a mandatory bundle

    Following up on the proposal above — the intent is not to replace Playwright outright, and definitely not to bundle both backends by default. The suggestion is to allow both to be installed side by side, with a clear division of labour:

    Why coexistence is valuable

    • Complementary coverage. agent-browser fits the everyday agent workload: lightweight, fast to start, and its snapshot + @ref model maps closely to the existing ui_snapshot / ui_action ref model. Playwright remains the heavy-duty option for what agent-browser (Chromium/CDP only) does not cover: network interception, trace/video recording, Firefox/WebKit, and mature multi-context handling.
    • A real fallback while agent-browser is 0.x. Running both during a spike/evaluation period lets the same capability checklist be measured against both backends, so any later decision to deprecate one is based on data rather than a bet.
    • The architecture already supports it. Both are stdio MCP servers, so both can sit behind the same backend interface via the StdioMCPClient / ManagedProcess work in feat: stdio MCP client and managed Playwright tier (browser tiers phase 1, PR 2) #123 — this is configuration, not new infrastructure.

    Conditions that keep dual install from becoming a drawback

    1. Independent, opt-in install choices. Separate checkboxes on the wizard's Browser tools page: agent-browser pre-checked (single ~17 MB native binary), Playwright as an optional advanced tier. Pre-checking / bundling both by default would negate the install-size benefit that motivates this FR.
    2. Lazy, single-backend execution. Neither backend should run as a resident daemon by default; launch on demand via the managed-process layer, and route each task to exactly one backend with a deterministic rule (e.g. needs trace, network interception, or a non-Chromium engine → Playwright; otherwise → agent-browser), rather than leaving the choice to the model per call.
    3. Document the separate profiles. The two backends use separate persistent profiles, so login state is not shared and a user who enables both signs in twice. That should be stated on the wizard page so it is not filed as a bug later.

    In short: dual install is a good option and a bad default bundle. Suggested framing for the tier design in #118: agent-browser as the default managed tier, Playwright as an optional advanced tier, both supported behind the same interface during (and after) evaluation.

  2. ttmuse commented on Nov 14, 2026

    @ttmuse
    Author

    Refinement: provider model — the agent selects the provider, the host validates and locks it in

    This refines the routing point in my previous comment. The cleaner model is not host-side rules deciding per call, and not two raw tool sets exposed side by side — it is a provider model, analogous to LLM providers behind one API:

    Shape

    • Both backends register as providers behind a single browser-driver interface. The agent sees one unified browser_* tool surface, not agent-browser's tools and Playwright's tools at the same time.
    • Each provider publishes a capability descriptor: supported engines (Chromium-only vs Chromium/Firefox/WebKit), install size / startup cost, trace & video support, network interception, profile location, and any tool-coverage gaps.
    • The agent selects a provider once, at session start, based on what the task needs — e.g. routine browsing and form work → agent-browser; a task that needs WebKit, trace/video, or network interception → Playwright. If the agent does not specify, a configured default (agent-browser) applies.

    Host responsibilities

    • Maintain the provider registry and only offer providers that are actually installed.
    • Validate the selection (installed, allowed by policy, healthy via the managed-process / stdio layer from feat: stdio MCP client and managed Playwright tier (browser tiers phase 1, PR 2) #123) and lock the session to that provider for its lifetime.
    • If the selected provider is missing or cannot serve a declared capability, fail explicitly at session start so the agent can start a new session on the other provider — never silently switch mid-session.

    Why selection is at session level, not per tool call

    Browser state — tabs, cookies/login, page state, and snapshot refs — lives inside one provider's browser instance and cannot migrate to the other. Exposing both raw MCP tool sets simultaneously (~60 tools, with different names and different ref formats) would bloat the tool surface and invite mid-task provider switches that invalidate all of that state. One selection, one provider, one unified tool surface per session avoids both problems while still letting the agent — which knows the task's requirements better than static host rules — make the choice.

  3. ttmuse commented on Nov 14, 2026

    @ttmuse
    Author

    The model in one diagram: install = 2, expose = 1, execute = 1 per session

    Summarising the two comments above into the three-layer rule:

    • Install layer: 2 — both providers may be installed on the same machine at the same time, each with its own directory and persistent profile.
    • Expose layer: 1 — the agent is only ever shown one unified browser_* tool set. The two providers' own MCP tool sets are not both exposed as tools (that would double the tool surface, mix two naming/ref schemes, and invite mid-session provider switches).
    • Execution layer: 1 per session — the agent chooses one provider at session start; the host validates and locks the session to it. (The one-of-two choice is per session, not machine-global: two different sessions may use different providers, but a single session never uses both, because tabs, login state and snapshot refs live in the chosen provider's browser and cannot migrate.)
    flowchart TB
        Agent["Agent<br/>sees ONE unified browser_* tool set"]
        subgraph Host["oab-computer - Browser Driver Host | expose layer: 1 tool set"]
            direction LR
            Registry["Provider Registry<br/>only installed providers are listed"]
            Validate["Validate + session lock<br/>installed? allowed? healthy?"]
            Registry --> Validate
        end
        subgraph Providers["Providers | install layer: 2 may coexist | execution layer: 1 per session"]
            direction LR
            PA["Provider A - agent-browser (default)<br/>Chrome for Testing - own persistent profile"]
            PB["Provider B - Playwright (advanced)<br/>Chromium / Firefox / WebKit - own persistent profile"]
        end
        Agent -->|"1 - choose ONE provider at session start"| Registry
        Validate -->|"2 - selected: every browser_* call goes here"| PA
        Validate -.->|"not selected: never started"| PB
        Validate -.->|"validation fails: explicit error at start,<br/>agent opens a NEW session and re-chooses"| Agent
        PA -.->|"state - tabs / login / refs - cannot migrate"| PB
    
    Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions