From caab1cf4536f79f5b74552f47360e178e6d28ff9 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Sat, 7 Mar 2026 01:23:27 -0800 Subject: [PATCH] fix: update setup/config UI for local browser mode - tools_config.py: Add 'Local Browser' as first provider option (no API keys needed, same npm install for agent-browser) - setup.py: Show 'Browser Automation (local)' when agent-browser CLI is found but no Browserbase key is set - config.py: Mark BROWSERBASE_* descriptions as optional - status.py: Note that local browser works without Browserbase --- hermes_cli/config.py | 4 ++-- hermes_cli/setup.py | 10 +++++++--- hermes_cli/status.py | 2 +- hermes_cli/tools_config.py | 8 +++++++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 671398e6d..6724c1d7d 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -273,7 +273,7 @@ OPTIONAL_ENV_VARS = { "advanced": True, }, "BROWSERBASE_API_KEY": { - "description": "Browserbase API key for browser automation", + "description": "Browserbase API key for cloud browser (optional — local browser works without this)", "prompt": "Browserbase API key", "url": "https://browserbase.com/", "tools": ["browser_navigate", "browser_click"], @@ -281,7 +281,7 @@ OPTIONAL_ENV_VARS = { "category": "tool", }, "BROWSERBASE_PROJECT_ID": { - "description": "Browserbase project ID", + "description": "Browserbase project ID (optional — only needed for cloud browser)", "prompt": "Browserbase project ID", "url": "https://browserbase.com/", "tools": ["browser_navigate", "browser_click"], diff --git a/hermes_cli/setup.py b/hermes_cli/setup.py index a9bec7fd6..8bbc70001 100644 --- a/hermes_cli/setup.py +++ b/hermes_cli/setup.py @@ -306,11 +306,15 @@ def _print_setup_summary(config: dict, hermes_home): else: tool_status.append(("Web Search & Extract", False, "FIRECRAWL_API_KEY")) - # Browserbase (browser tools) + # Browser tools (local Chromium or Browserbase cloud) + import shutil + _ab_found = shutil.which("agent-browser") or (Path(__file__).parent.parent / "node_modules" / ".bin" / "agent-browser").exists() if get_env_value('BROWSERBASE_API_KEY'): - tool_status.append(("Browser Automation", True, None)) + tool_status.append(("Browser Automation (Browserbase)", True, None)) + elif _ab_found: + tool_status.append(("Browser Automation (local)", True, None)) else: - tool_status.append(("Browser Automation", False, "BROWSERBASE_API_KEY")) + tool_status.append(("Browser Automation", False, "npm install -g agent-browser")) # FAL (image generation) if get_env_value('FAL_KEY'): diff --git a/hermes_cli/status.py b/hermes_cli/status.py index 7c94b5852..3ee666b48 100644 --- a/hermes_cli/status.py +++ b/hermes_cli/status.py @@ -84,7 +84,7 @@ def show_status(args): "MiniMax": "MINIMAX_API_KEY", "MiniMax-CN": "MINIMAX_CN_API_KEY", "Firecrawl": "FIRECRAWL_API_KEY", - "Browserbase": "BROWSERBASE_API_KEY", + "Browserbase": "BROWSERBASE_API_KEY", # Optional — local browser works without this "FAL": "FAL_KEY", "Tinker": "TINKER_API_KEY", "WandB": "WANDB_API_KEY", diff --git a/hermes_cli/tools_config.py b/hermes_cli/tools_config.py index c53bc42b4..9773c697a 100644 --- a/hermes_cli/tools_config.py +++ b/hermes_cli/tools_config.py @@ -177,9 +177,15 @@ TOOL_CATEGORIES = { "name": "Browser Automation", "icon": "🌐", "providers": [ + { + "name": "Local Browser", + "tag": "Free headless Chromium (no API key needed)", + "env_vars": [], + "post_setup": "browserbase", # Same npm install for agent-browser + }, { "name": "Browserbase", - "tag": "Cloud browser with stealth mode", + "tag": "Cloud browser with stealth & proxies", "env_vars": [ {"key": "BROWSERBASE_API_KEY", "prompt": "Browserbase API key", "url": "https://browserbase.com"}, {"key": "BROWSERBASE_PROJECT_ID", "prompt": "Browserbase project ID"},