Skip to content

Browser Use 1.0: gate its tool calls (the 0.13 seam is gone, so the integration gates nothing on 1.0) #724

Closed

Description

@LoopGlitch26

What changed upstream

browser-use 1.0 rebuilt its agent on Pydantic AI, so the method Tracekit's Browser Use integration replaces to gate each action, Tools.registry.execute_action (tracekit/integrations/browser_use.py, _wrap, L77-84), no longer exists, and nothing replaces it one for one. At the 1.0.0 tag:

  • Tools.registry returns the Tools itself (browser_use/tools.py L164-166), and any other old method raises AttributeError (L168-171). act and create_action_model are gone.
  • Custom actions are Pydantic AI tools in Tools.functions (tools.py L162), passed to the agent's Pydantic AI agent (browser_use/agent/service.py L398).
  • The model drives the browser through a python tool that runs code in a persistent REPL (browser_use/agent/loop.py L159).
  • Every tool call runs through BrowserLoop.wrap_tool_execute (loop.py L478), a Pydantic AI capability (class BrowserLoop, L402).
  • 1.0 needs Python 3.11+ and pins pydantic-ai-slim==2.66.0. 1.0.2 is out.

The nightly contract run against @latest fails on it (run 42817996539, tracked in #688).

What that means for a Tracekit user on 1.0

  • tracekit.instrument() still replaces Tools.__init__ (tracekit/autowire.py, _browser_use, L305-317), and only warns that 1.0 is untested (L452-453).
  • An agent that passes its own Tools() stops there with an AttributeError from _wrap.
  • An agent that passes none (1.0's Agent takes tools=None by default, service.py L235 and L288) runs, and the Browser Use wiring gates none of its browser work: neither the python cells nor any action.
  • instrument() also wires Tracekit's Pydantic AI capability on the same install (pydantic-ai-slim 2.66, outside its tested range). Whether that reaches browser-use's internal agent and its python cells is untested.

What's needed

  1. Find the 1.0 seam that sees every tool call before it runs, with its name and arguments (wrap_tool_execute, or adding Tracekit's Pydantic AI capability to the agent browser-use builds), and say in the PR which you chose and why.
  2. Decide each call through _Actions.gate as today. Read a python cell as code the agent runs (decide its source, at least as the shell rules read a script), and each custom action as itself. Keep 0.13.x working: pick by what the installed version has, not by its version string.
  3. Until 1.0 is gated, instrument() must say so: when the 0.13 seam isn't there, wiring fails with a message naming the supported versions, so instrument() prints "not wired" rather than "wired but untested".

Acceptance

  • Contract tests that run against browser-use 1.0.x (Python 3.11+) and 0.13.x: a custom action and a python cell are each decided before they run, and a denied one doesn't run. OnRealTools in tests/test_contract_browser_use.py uses tools.act and create_action_model, which 1.0 removed, so 1.0 needs its own test.
  • The tested range in FRAMEWORKS (tracekit/autowire.py L352-353) and docs/integrations/browser-use.md name 1.0, and docs/limits.md says what a python cell's decision can and can't read.
  • Run a Browser Use 1.0 agent with tracekit.instrument() and paste the tracekit last summary (not the run's content) in the PR.

Comment here to claim it. Commits need a DCO sign-off (git commit -s).

Activity

  1. Koloyaaa commented on Nov 11, 2026

    @Koloyaaa
    Contributor

    Claiming this one. I'll start by reproducing the 1.0 behaviour with a minimal Browser Use agent, then check BrowserLoop.wrap_tool_execute and the Pydantic AI capability path to decide which seam sees every tool call before it runs. I'll keep 0.13.x working, add contract coverage for both versions, and make instrument() say "not wired" when the 0.13 seam is gone. I'll comment here if the acceptance criteria need clarification.

  2. LoopGlitch26 commented on Nov 11, 2026

    @LoopGlitch26
    MemberAuthor

    It's yours, @Koloyaaa. The plan fits. Two notes: the python cell is the part that does the browser work, so its decision is the one that matters most; say in the PR what that decision can read of a cell (its source only, or the calls it makes). And make the "not wired" message the first commit, so a 1.0 user is told the truth even before the new seam lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions