Skip to content

Conversation

vvincent1234
Copy link
Contributor

@vvincent1234 vvincent1234 commented Apr 30, 2025

  1. Enable browser - use to use MCP, just upload a Claude desktop MCP json.
  2. Support browser - use==0.1.41
  3. Optimize UI, Now you can chat with agent with Human Intervention.
  4. Refactored code
  5. New DeepResearch Agent, more powerful!

Summary by mrge

Added support for MCP in browser-use, introduced a new DeepResearch Agent, and rebuilt the web UI for easier agent configuration and chat with human intervention.

  • New Features

    • Enabled MCP integration by allowing upload of Claude desktop MCP JSON.
    • Added DeepResearch Agent for advanced research tasks.
    • Updated browser-use to version 0.1.41.
    • Improved UI with new tabs for agent and browser settings, DeepResearch, and config load/save.
    • Enabled chatting with agents and human intervention in the UI.
  • Refactors

    • Replaced custom agent and utility code with new modular agents and MCP client integration.
    • Simplified and reorganized codebase, removing legacy files and tests.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mrge found 34 issues across 22 files. View them in mrge.io

"""
if hasattr(webui_manager, "bu_controller") and webui_manager.bu_controller:
logger.warning("⚠️ Close controller because mcp file has changed!")
webui_manager.bu_controller.close_mcp_client()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling close_mcp_client synchronously when it's defined as an async method

"""
Creates an agent settings tab.
"""
input_components = set(webui_manager.get_components())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable 'input_components'

outputs=[planner_llm_model_name]
)

mcp_json_file.change(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent return values in update_mcp_server function

if config.provider == "ollama":
if "deepseek-r1" in config.model_name:
from src.utils.llm import DeepSeekR1ChatOllama
from src.utils.llm_provider import DeepSeekR1ChatOllama
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import path changed from src.utils.llm to src.utils.llm_provider but there's no corresponding update to the import in the commented out pdb.set_trace() section below.


# For other providers, use the standard configuration
llm = utils.get_llm_model(
llm = llm_provider.get_llm_model(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function call changed from utils.get_llm_model to llm_provider.get_llm_model but the corresponding import statement doesn't match the module structure.

if not hasattr(webui_manager, 'bu_chat_history'):
logger.error("Attribute 'bu_chat_history' not found in webui_manager! Cannot add chat message.")
# Initialize it maybe? Or raise an error? For now, log and potentially skip chat update.
webui_manager.bu_chat_history = [] # Initialize if missing (consider if this is the right place)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improper initialization of state in callback function

except asyncio.TimeoutError:
logger.warning("Agent task did not finish quickly after stop signal, cancelling.")
agent_task.cancel()
except Exception: # Catch task exceptions if it errors on stop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overly broad exception handler without logging


try:
logger.info("Waiting for user response event...")
await asyncio.wait_for(webui_manager.bu_response_event.wait(), timeout=3600.0) # Long timeout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extremely long timeout (1 hour) could block resources unnecessarily

"""Wrapper for handle_clear."""
await close_browser(webui_manager)

headless.change(close_wrapper)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using synchronous function wrapper for async function without proper handling

"""
Creates a browser settings tab.
"""
input_components = set(webui_manager.get_components())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable that adds unnecessary complexity

@warmshao warmshao merged commit 664f874 into browser-use:main May 1, 2025
1 check passed
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