{"repo":"NousResearch/hermes-agent","public_id":"3555","display_label":"Honcho API key requirement for local self-hosted instances","summary":"Members concern Honcho API key handling when connecting to local or self-hosted instances. Three titles propose changes (placeholder key, allowing no key, bypassing validation), and one bug report describes an invalid API key message from a local host.","subsystem":"agent","counts":{"members":4,"open_issues":0,"open_issues_distinct":0,"open_prs":0,"closed_issues":1,"merged_prs":1,"attempt_prs":2},"landed_fix":{"status":"merged_to_main","basis":"structural","pr":3644,"merged_at":"2026-03-29T00:49:56+00:00"},"resolution":{"state":"unresolved","by":null},"freshness":{"state":"stale","last_verified_at":"2026-03-29T00:49:56+00:00","is_stale":true},"grouping":{"backbone":"STRUCTURAL_SPANNING","link_density":0.5},"fix_edges":[{"issue_number":3555,"pr_number":3644,"tier":"verified","basis":"superseded_ref","confidence":0.9,"recoverable_from_timeline":false,"pr_merged_at":"2026-03-29T00:49:56+00:00"}],"members":[{"kind":"issue","number":3555,"title":"[Bug]: Invalid Honcho API key from  local host???","url":null,"state":"closed"},{"kind":"pr","number":3560,"title":"fix(honcho): bypass API key validation for local servers","url":null,"state":"closed","close_reason":{"refs":[{"kind":"pr","value":"#3644","number":3644},{"kind":"pr","value":"#3482","number":3482},{"kind":"pr","value":"#3570","number":3570}],"category":"merged_via","implication":"superseded"},"merged":false},{"kind":"pr","number":3570,"title":"fix(honcho): use placeholder API key for local instances that don't require auth","url":null,"state":"closed","close_reason":{"refs":[{"kind":"pr","value":"#3644","number":3644},{"kind":"pr","value":"#3482","number":3482},{"kind":"pr","value":"#3560","number":3560}],"category":"merged_via","implication":"superseded"},"merged":false},{"kind":"pr","number":3644,"title":"fix(honcho): allow self-hosted local instances without API key","url":null,"state":"merged","close_reason":{"category":"merged"},"merged":true,"is_fix_pr":true,"fix_tier":"verified","files_changed":["cli.py","gateway/run.py","hermes_cli/doctor.py","honcho_integration/cli.py","honcho_integration/client.py","run_agent.py"],"fix_hunks":[{"file":"cli.py","hunks":["@@ -6089,7 +6089,7 @@ def run(self):\n             from honcho_integration.client import HonchoClientConfig\n             from agent.display import honcho_session_line, write_tty\n             hcfg = HonchoClientConfig.from_global_config()\n-            if hcfg.enabled and hcfg.api_key and hcfg.explicitly_configured:\n+            if hcfg.enabled and (hcfg.api_key or hcfg.base_url) and hcfg.explicitly_configured:\n                 sname = hcfg.resolve_session_name(session_id=self.session_id)\n                 if sname:\n                     write_tty(honcho_session_line(hcfg.workspace_id, sname) + \"\\n\")"]},{"file":"gateway/run.py","hunks":["@@ -432,7 +432,7 @@ def _get_or_create_gateway_honcho(self, session_key: str):\n             from honcho_integration.session import HonchoSessionManager\n \n             hcfg = HonchoClientConfig.from_global_config()\n-            if not hcfg.enabled or not hcfg.api_key:\n+            if not hcfg.enabled or not (hcfg.api_key or hcfg.base_url):\n                 return None, hcfg\n \n             client = get_honcho_client(hcfg)"]},{"file":"hermes_cli/doctor.py","hunks":["@@ -56,7 +56,7 @@ def _honcho_is_configured_for_doctor() -> bool:\n         from honcho_integration.client import HonchoClientConfig\n \n         cfg = HonchoClientConfig.from_global_config()\n-        return bool(cfg.enabled and cfg.api_key)\n+        return bool(cfg.enabled and (cfg.api_key or cfg.base_url))\n     except Exception:\n         return False\n ","@@ -708,8 +708,8 @@ def run_doctor(args):\n             check_warn(\"Honcho config not found\", \"run: hermes honcho setup\")\n         elif not hcfg.enabled:\n             check_info(f\"Honcho disabled (set enabled: true in {_honcho_cfg_path} to activate)\")\n-        elif not hcfg.api_key:\n-            check_fail(\"Honcho API key not set\", \"run: hermes honcho setup\")\n+        elif not (hcfg.api_key or hcfg.base_url):\n+            check_fail(\"Honcho API key or base URL not set\", \"run: hermes honcho setup\")\n             issues.append(\"No Honcho API key — run 'hermes honcho setup'\")\n         else:\n             from honcho_integration.client import get_honcho_client, reset_honcho_client"]},{"file":"honcho_integration/cli.py","hunks":["@@ -270,7 +270,7 @@ def cmd_status(args) -> None:\n             print(f\"    {peer}: {mode}\")\n     print(f\"  Write freq:     {hcfg.write_frequency}\")\n \n-    if hcfg.enabled and hcfg.api_key:\n+    if hcfg.enabled and (hcfg.api_key or hcfg.base_url):\n         print(\"\\n  Connection... \", end=\"\", flush=True)\n         try:\n             get_honcho_client(hcfg)","@@ -278,7 +278,7 @@ def cmd_status(args) -> None:\n         except Exception as e:\n             print(f\"FAILED ({e})\\n\")\n     else:\n-        reason = \"disabled\" if not hcfg.enabled else \"no API key\"\n+        reason = \"disabled\" if not hcfg.enabled else \"no API key or base URL\"\n         print(f\"\\n  Not connected ({reason})\\n\")\n \n "]},{"file":"honcho_integration/client.py","hunks":["@@ -417,9 +417,18 @@ def get_honcho_client(config: HonchoClientConfig | None = None) -> Honcho:\n     else:\n         logger.info(\"Initializing Honcho client (host: %s, workspace: %s)\", config.host, config.workspace_id)\n \n+    # Local Honcho instances don't require an API key, but the SDK\n+    # expects a non-empty string.  Use a placeholder for local URLs.\n+    _is_local = resolved_base_url and (\n+        \"localhost\" in resolved_base_url\n+        or \"127.0.0.1\" in resolved_base_url\n+        or \"::1\" in resolved_base_url\n+    )\n+    effective_api_key = [redacted:secret-assignment] or (\"local\" if _is_local else None)\n+\n     kwargs: dict = {\n         \"workspace_id\": config.workspace_id,\n-        \"api_key\": [redacted:secret-assignment]\n+        \"api_key\": [redacted:secret-assignment]\n         \"environment\": config.environment,\n     }\n     if resolved_base_url:"]},{"file":"run_agent.py","hunks":["@@ -1084,8 +1084,8 @@ def __init__(\n                     else:\n                         if not hcfg.enabled:\n                             logger.debug(\"Honcho disabled in global config\")\n-                        elif not hcfg.api_key:\n-                            logger.debug(\"Honcho enabled but no API key configured\")\n+                        elif not (hcfg.api_key or hcfg.base_url):\n+                            logger.debug(\"Honcho enabled but no API key or base URL configured\")\n                         else:\n                             logger.debug(\"Honcho enabled but missing API key or disabled in config\")\n             except Exception as e:","@@ -2292,8 +2292,14 @@ def is_interrupted(self) -> bool:\n     # ── Honcho integration helpers ──\n \n     def _honcho_should_activate(self, hcfg) -> bool:\n-        \"\"\"Return True when remote Honcho should be active.\"\"\"\n-        if not hcfg or not hcfg.enabled or not hcfg.api_key:\n+        \"\"\"Return True when Honcho should be active.\n+\n+        Self-hosted Honcho may be configured with a base_url and no API key,\n+        so activation should accept either credential style.\n+        \"\"\"\n+        if not hcfg or not hcfg.enabled:\n+            return False\n+        if not (hcfg.api_key or hcfg.base_url):\n             return False\n         return True\n \n"]}]}],"trust":{"default_tier":"verified","includes_suggested":false}}