mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-17 04:01:13 +00:00
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.
32 lines
1.5 KiB
Python
32 lines
1.5 KiB
Python
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(),
|
|
}
|