Skip to content

fix: migrate Browser Use tool to V4 runs - #5

Merged
svngoku merged 1 commit into
AgenticInternet:masterfrom
MagMueller:agency/browser-use-v4-runs
Aug 29, 2026
Merged

fix: migrate Browser Use tool to V4 runs#5
svngoku merged 1 commit into
AgenticInternet:masterfrom
MagMueller:agency/browser-use-v4-runs

Conversation

@MagMueller

Copy link
Copy Markdown
Contributor

Summary

  • use the explicit Browser Use V4 SDK clients
  • move sync, async, stream-labelled, and structured tool paths from Tasks to the V4 Runs lifecycle
  • preserve the existing smolagents tool interface and add focused sync/async regression coverage

Why

The package-root SDK client still exposes the older tasks resource. Importing the explicit V4 client gives this integration the current runs.create + runs.wait_for_completion lifecycle without changing how Agentic Internet calls its tools.

Validation

  • uv run pytest -q (198 passed)
  • uv run pytest tests/test_browser_use.py -q (8 passed)
  • uv run ruff check agentic_internet/tools/browser_use.py tests/test_browser_use.py
  • uv run ruff format --check agentic_internet/tools/browser_use.py tests/test_browser_use.py
  • uv run mypy agentic_internet/tools/browser_use.py
  • git diff --check
  • TruffleHog: zero verified or unverified findings

The repository golden-principles script currently fails on unchanged upstream because docs/exec-plans/active is absent.

@svngoku
svngoku merged commit bb2dcd0 into AgenticInternet:master Aug 29, 2026
@svngoku

svngoku commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

@MagMueller Thanks — merged as bb2dcd0.

Local verification completed successfully: 198 tests passed, and Ruff, formatting, and mypy all passed.

Please follow up on two review findings:

  • V4 failed/cancelled runs with no error currently produce success-like responses in the sync, async, and structured tool paths. Guard on the terminal status and add regression coverage.
  • stream=True now delegates to the non-stream path, changing the previous streamed-result/steps-summary behavior. Please restore it via V4 event polling or explicitly deprecate/document the change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants