Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion hermes_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def ensure_hermes_home():
4: ["VOICE_TOOLS_OPENAI_KEY", "ELEVENLABS_API_KEY"],
5: ["WHATSAPP_ENABLED", "WHATSAPP_MODE", "WHATSAPP_ALLOWED_USERS",
"SLACK_BOT_TOKEN", "SLACK_APP_TOKEN", "SLACK_ALLOWED_USERS"],
7: ["TAVILY_API_KEY"],
}

# Required environment variables with metadata for migration prompts.
Expand Down Expand Up @@ -380,6 +381,14 @@ def ensure_hermes_home():
"password": True,
"category": "tool",
},
"TAVILY_API_KEY": {
"description": "Tavily API key for Tavily-based research skills and integrations",
"prompt": "Tavily API key",
"url": "https://app.tavily.com/home",
"tools": ["tavily skills", "research integrations"],
"password": True,
"category": "tool",
},
"FIRECRAWL_API_URL": {
"description": "Firecrawl API URL for self-hosted instances (optional)",
"prompt": "Firecrawl API URL (leave empty for cloud)",
Expand Down Expand Up @@ -1054,6 +1063,7 @@ def show_config():
("ANTHROPIC_API_KEY", "Anthropic"),
("VOICE_TOOLS_OPENAI_KEY", "OpenAI (STT/TTS)"),
("FIRECRAWL_API_KEY", "Firecrawl"),
("TAVILY_API_KEY", "Tavily"),
("BROWSERBASE_API_KEY", "Browserbase"),
("FAL_KEY", "FAL"),
]
Expand Down Expand Up @@ -1199,7 +1209,7 @@ def set_config_value(key: str, value: str):
# Check if it's an API key (goes to .env)
api_keys = [
'OPENROUTER_API_KEY', 'OPENAI_API_KEY', 'ANTHROPIC_API_KEY', 'VOICE_TOOLS_OPENAI_KEY',
'FIRECRAWL_API_KEY', 'FIRECRAWL_API_URL', 'BROWSERBASE_API_KEY', 'BROWSERBASE_PROJECT_ID',
'FIRECRAWL_API_KEY', 'TAVILY_API_KEY', 'FIRECRAWL_API_URL', 'BROWSERBASE_API_KEY', 'BROWSERBASE_PROJECT_ID',
'FAL_KEY', 'TELEGRAM_BOT_TOKEN', 'DISCORD_BOT_TOKEN',
'TERMINAL_SSH_HOST', 'TERMINAL_SSH_USER', 'TERMINAL_SSH_KEY',
'SUDO_PASSWORD', 'SLACK_BOT_TOKEN', 'SLACK_APP_TOKEN',
Expand Down
6 changes: 6 additions & 0 deletions hermes_cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,12 @@ def _print_setup_summary(config: dict, hermes_home):
else:
tool_status.append(("Web Search & Extract", False, "FIRECRAWL_API_KEY"))

# Tavily (skills / integrations)
if get_env_value("TAVILY_API_KEY"):
tool_status.append(("Tavily Research Integrations", True, None))
else:
tool_status.append(("Tavily Research Integrations", False, "TAVILY_API_KEY"))

# Browser tools (local Chromium or Browserbase cloud)
import shutil

Expand Down
1 change: 1 addition & 0 deletions hermes_cli/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def show_status(args):
"MiniMax": "MINIMAX_API_KEY",
"MiniMax-CN": "MINIMAX_CN_API_KEY",
"Firecrawl": "FIRECRAWL_API_KEY",
"Tavily": "TAVILY_API_KEY",
"Browserbase": "BROWSERBASE_API_KEY", # Optional — local browser works without this
"FAL": "FAL_KEY",
"Tinker": "TINKER_API_KEY",
Expand Down
9 changes: 8 additions & 1 deletion hermes_cli/tools_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,16 @@ def _prompt_yes_no(question: str, default: bool = True) -> bool:
"web": {
"name": "Web Search & Extract",
"setup_title": "Select Search Provider",
"setup_note": "A free DuckDuckGo search skill is also included — skip this if you don't need Firecrawl.",
"setup_note": "A free DuckDuckGo search skill is also included, and Tavily-based skills/integrations can be configured here too.",
"icon": "🔍",
"providers": [
{
"name": "Tavily",
"tag": "Search-first research for Tavily-based skills and integrations",
"env_vars": [
{"key": "TAVILY_API_KEY", "prompt": "Tavily API key", "url": "https://app.tavily.com/home"},
],
},
{
"name": "Firecrawl Cloud",
"tag": "Recommended - hosted service",
Expand Down
11 changes: 11 additions & 0 deletions tests/hermes_cli/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

from hermes_cli.config import (
DEFAULT_CONFIG,
ENV_VARS_BY_VERSION,
OPTIONAL_ENV_VARS,
get_hermes_home,
ensure_hermes_home,
load_config,
Expand Down Expand Up @@ -151,3 +153,12 @@ def test_atomic_write_creates_valid_yaml(self, tmp_path):
raw = yaml.safe_load(f)
assert raw["model"] == "test/atomic-model"
assert raw["agent"]["max_turns"] == 77


class TestOptionalToolKeys:
def test_tavily_api_key_is_registered_for_setup_and_migration(self):
tavily = OPTIONAL_ENV_VARS["TAVILY_API_KEY"]
assert tavily["prompt"] == "Tavily API key"
assert tavily["category"] == "tool"
assert "research" in tavily["description"].lower()
assert "TAVILY_API_KEY" in ENV_VARS_BY_VERSION[7]
14 changes: 14 additions & 0 deletions tests/hermes_cli/test_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from types import SimpleNamespace

from hermes_cli.status import show_status


def test_show_status_includes_tavily_key(monkeypatch, capsys, tmp_path):
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
monkeypatch.setenv("TAVILY_API_KEY", "tvly-1234567890abcdef")

show_status(SimpleNamespace(all=False, deep=False))

output = capsys.readouterr().out
assert "Tavily" in output
assert "tvly...cdef" in output
Loading