I need to understand how optional features/functionality are enabled or disabled in this codebase. Look for patterns like:
Environment variables that toggle features on/off (e.g. HERMES_ENABLE_, HERMES_DISABLE_)
Config file settings that control feature availability
How the control API port is configured (HERMES_CONTROL_PORT)
How other optional subsystems (honcho, home assistant, browser, etc.) are enabled/disabled
Check gateway/config.py, any .env files, hermes.yaml or similar config patterns
Focus on finding the convention — how does a user turn features on or off? Is there a consistent pattern?
Thoroughness: medium
Assistant
I'll help you understand the feature toggle patterns in this codebase. Let me search for environment variables, config files, and feature flags systematically.
Assistant
Let me search for environment variables and config patterns more specifically:
Assistant
Great! Now let me search for the control port configuration and other feature flags:
Assistant
Now let me look at how tools are enabled/disabled and check browser_tool and other optional subsystems:
Assistant
Let me search more specifically for feature toggles and how toolsets are managed:
Assistant
Let me continue reading toolsets.py and also check how tools check if they're available:
Assistant
Now let me search for how individual tools check if they're available (check_fn pattern):
Assistant
Perfect! Now let me read the registry to understand the check_fn pattern:
Assistant
Now let me look at the home assistant platform and check other features:
Assistant
Let me check the control port configuration more thoroughly:
Assistant
Perfect! Now let me look at a few specific check functions to understand the pattern better:
Assistant
Excellent! Now let me create a comprehensive summary document. Let me check one more thing about how features are bridged via configuration:
Assistant
Perfect! Now I have enough information. Let me compile the comprehensive findings:
Summary: Feature Toggle Patterns in Hermes Agent
Based on my analysis of the codebase, here's how optional features and functionality are enabled/disabled:
1. Core Convention: Environment Variables as Primary Toggle
The codebase follows a consistent pattern where features are toggled via environment variables. These come from three sources (in priority order):
.env file or environment
~/.hermes/config.yaml (user configuration)
Defaults
2. Feature Categories & Their Control Mechanisms
A. Messaging Platforms (via gateway/config.py)
Pattern: Token-based activation
TELEGRAM_BOT_TOKEN → enables Telegram
DISCORD_BOT_TOKEN → enables Discord
SLACK_BOT_TOKEN → enables Slack
SIGNAL_HTTP_URL + SIGNAL_ACCOUNT → enables Signal
HASS_TOKEN + optional HASS_URL → enables Home Assistant
def _is_local_mode() -> bool:
"""Local Chromium if no Browserbase credentials."""
return not (os.environ.get("BROWSERBASE_API_KEY") and
os.environ.get("BROWSERBASE_PROJECT_ID"))
Toggle path:
If BROWSERBASE_API_KEY + BROWSERBASE_PROJECT_ID set → Cloud mode (Browserbase)
Else → Local mode (headless Chromium via agent-browser CLI)