mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-21 18:51:38 +00:00
browser: replace browser-use agent with native browser
Introduce the new built-in Browser plugin for Agent Zero, replacing the legacy browser-use-based browser agent with a direct Playwright-powered browser tool, live WebUI viewer, browser session controls, status APIs, configuration, and extension-management support. Add browser-specific modal behavior so the browser can run as a floating, resizable, no-backdrop window, including modal focus, toggle, and idempotent open helpers for richer WebUI surfaces. Remove the old `_browser_agent` core plugin and the `browser-use` dependency, then clean up stale browser-model wiring and references across agent code, model configuration docs, setup guides, troubleshooting docs, skills, and Agent Zero knowledge. Update regression and WebUI extension-surface coverage for the new browser architecture and modal behavior. The legacy browser-use implementation has been extracted from core so it can continue separately as a community plugin published through the A0 Plugin Index for any user or professional that were relying on it for workflow.
This commit is contained in:
parent
603fc2064b
commit
983d431a5e
65 changed files with 6936 additions and 1926 deletions
32
plugins/_browser/api/status.py
Normal file
32
plugins/_browser/api/status.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
from helpers.api import ApiHandler, Request
|
||||
from plugins._browser.helpers.config import build_browser_launch_config, get_browser_config
|
||||
from plugins._browser.helpers.playwright import get_playwright_binary, get_playwright_cache_dir
|
||||
from plugins._browser.helpers.runtime import known_context_ids
|
||||
|
||||
|
||||
class Status(ApiHandler):
|
||||
async def process(self, input: dict, request: Request) -> dict:
|
||||
browser_config = get_browser_config()
|
||||
launch_config = build_browser_launch_config(browser_config)
|
||||
runtime_binary = get_playwright_binary(
|
||||
full_browser=launch_config["requires_full_browser"]
|
||||
)
|
||||
shell_binary = get_playwright_binary(full_browser=False)
|
||||
chromium_binary = get_playwright_binary(full_browser=True)
|
||||
return {
|
||||
"plugin": "_browser",
|
||||
"playwright": {
|
||||
"cache_dir": get_playwright_cache_dir(),
|
||||
"binary_found": bool(runtime_binary),
|
||||
"binary_path": str(runtime_binary) if runtime_binary else "",
|
||||
"headless_shell_binary_path": str(shell_binary) if shell_binary else "",
|
||||
"chromium_binary_path": str(chromium_binary) if chromium_binary else "",
|
||||
"launch_mode": launch_config["browser_mode"],
|
||||
},
|
||||
"extensions": {
|
||||
**launch_config["extensions"],
|
||||
"launch_mode": launch_config["browser_mode"],
|
||||
"requires_full_browser": launch_config["requires_full_browser"],
|
||||
},
|
||||
"contexts": known_context_ids(),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue