Skip to content

Fix the Browser Use async example - #544

Open
MagMueller wants to merge 1 commit into
kernel:mainfrom
MagMueller:agency/fix-browser-use-await
Open

Fix the Browser Use async example#544
MagMueller wants to merge 1 commit into
kernel:mainfrom
MagMueller:agency/fix-browser-use-await

Conversation

@MagMueller

@MagMueller MagMueller commented Sep 3, 2026

Copy link
Copy Markdown

The Browser Use integration calls Agent.run() without awaiting it. The example therefore returns a coroutine, and result.final_result() raises AttributeError instead of running the agent.

This adds the missing await.

Validation:

  • reproduced the coroutine/final_result() failure with the installed browser-use package
  • git diff --check
  • parsed all three Python snippets with ast.parse
  • rendered the integration page with Mintlify and verified the updated snippet

Note

Low Risk
Documentation-only change to an integration code sample; no runtime or product code affected.

Overview
Fixes the Browser Use integration doc so the “Create and run your agent” snippet correctly awaits the async Agent.run() call (result = await agent.run() instead of result = agent.run()).

Without await, the example would assign a coroutine to result, so follow-up usage (e.g. final_result()) would fail at runtime.

Reviewed by Cursor Bugbot for commit 2aa6aa4. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

1 participant