Skip to content

The agent that grows with you

refactor(browser): drop the unreferenced __main__ demo block

Teknium9c706605fe87
diff --git a/tools/browser_tool.py b/tools/browser_tool.py
index 395e1f4084d..496d94b5c00 100644
--- a/tools/browser_tool.py
+++ b/tools/browser_tool.py
@@ -1866,62 +1866,6 @@ _cached_chromium_installed: Optional[bool] = None
_chromium_autoinstall_attempted = False
-# ============================================================================
-# Module Test
-# ============================================================================
-
-if __name__ == "__main__":
- """
- Simple test/demo when run directly
- """
- print("🌐 Browser Tool Module")
- print("=" * 40)
-
- _cp = _get_cloud_provider()
- mode = "local" if _cp is None else f"cloud ({_cp.provider_name()})"
- print(f" Mode: {mode}")
-
- # Check requirements
- if check_browser_requirements():
- print("βœ… All requirements met")
- else:
- print("❌ Missing requirements:")
- try:
- browser_cmd = _find_agent_browser()
- if _requires_real_termux_browser_install(browser_cmd):
- print(" - bare npx fallback found (insufficient on Termux local mode)")
- print(f" Install: {_browser_install_hint()}")
- elif _cp is None and not _chromium_installed():
- print(" - Chromium browser binary not found")
- searched = ", ".join(_chromium_search_roots()) or "(no candidate paths)"
- print(f" Searched: {searched}")
- if _running_in_docker():
- print(
- " Docker: pull the latest image β€” the current one "
- "predates the bundled Chromium install"
- )
- print(" docker pull ghcr.io/nousresearch/hermes-agent:latest")
- else:
- print(" Install it with:")
- print(" npx agent-browser install --with-deps")
- print(" Or: npx playwright install --with-deps chromium")
- except FileNotFoundError:
- print(" - agent-browser CLI not found")
- print(f" Install: {_browser_install_hint()}")
- if _cp is not None and not _cp.is_configured():
- print(f" - {_cp.provider_name()} credentials not configured")
- print(" Tip: set browser.cloud_provider to 'local' to use free local mode instead")
-
- print("\nπŸ“‹ Available Browser Tools:")
- for schema in BROWSER_TOOL_SCHEMAS:
- print(f" πŸ”Ή {schema['name']}: {schema['description'][:60]}...")
-
- print("\nπŸ’‘ Usage:")
- print(" from tools.browser_tool import browser_navigate, browser_snapshot")
- print(" result = browser_navigate('https://example.com', task_id='my_task')")
- print(" snapshot = browser_snapshot(task_id='my_task')")
-
-
# ---------------------------------------------------------------------------
# Registry
# ---------------------------------------------------------------------------