2025-10-01 09:54:17 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
"""
|
|
|
|
|
Tools Package
|
|
|
|
|
|
|
|
|
|
This package contains all the specific tool implementations for the Hermes Agent.
|
|
|
|
|
Each module provides specialized functionality for different capabilities:
|
|
|
|
|
|
|
|
|
|
- web_tools: Web search, content extraction, and crawling
|
2026-03-06 03:37:05 -08:00
|
|
|
- terminal_tool: Command execution using mini-swe-agent (local/docker/modal/daytona backends)
|
2025-10-01 09:54:17 +00:00
|
|
|
- vision_tools: Image analysis and understanding
|
|
|
|
|
- mixture_of_agents_tool: Multi-model collaborative reasoning
|
|
|
|
|
- image_generation_tool: Text-to-image generation with upscaling
|
|
|
|
|
|
|
|
|
|
The tools are imported into model_tools.py which provides a unified interface
|
|
|
|
|
for the AI agent to access all capabilities.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
# Export all tools for easy importing
|
|
|
|
|
from .web_tools import (
|
|
|
|
|
web_search_tool,
|
|
|
|
|
web_extract_tool,
|
|
|
|
|
web_crawl_tool,
|
|
|
|
|
check_firecrawl_api_key
|
|
|
|
|
)
|
|
|
|
|
|
2026-03-06 03:37:05 -08:00
|
|
|
# Primary terminal tool (mini-swe-agent backend: local/docker/singularity/modal/daytona)
|
2026-01-23 12:26:53 +00:00
|
|
|
from .terminal_tool import (
|
|
|
|
|
terminal_tool,
|
|
|
|
|
check_terminal_requirements,
|
2026-01-10 05:56:26 +00:00
|
|
|
cleanup_vm,
|
2026-01-29 06:10:24 +00:00
|
|
|
cleanup_all_environments,
|
|
|
|
|
get_active_environments_info,
|
2026-02-10 19:39:05 +00:00
|
|
|
register_task_env_overrides,
|
|
|
|
|
clear_task_env_overrides,
|
2026-01-23 12:26:53 +00:00
|
|
|
TERMINAL_TOOL_DESCRIPTION
|
|
|
|
|
)
|
|
|
|
|
|
2025-10-01 09:54:17 +00:00
|
|
|
from .vision_tools import (
|
|
|
|
|
vision_analyze_tool,
|
|
|
|
|
check_vision_requirements
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
from .mixture_of_agents_tool import (
|
|
|
|
|
mixture_of_agents_tool,
|
|
|
|
|
check_moa_requirements
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
from .image_generation_tool import (
|
|
|
|
|
image_generate_tool,
|
|
|
|
|
check_image_generation_requirements
|
|
|
|
|
)
|
|
|
|
|
|
2026-01-30 07:39:55 +00:00
|
|
|
from .skills_tool import (
|
|
|
|
|
skills_list,
|
|
|
|
|
skill_view,
|
|
|
|
|
check_skills_requirements,
|
|
|
|
|
SKILLS_TOOL_DESCRIPTION
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-19 18:25:53 -08:00
|
|
|
from .skill_manager_tool import (
|
|
|
|
|
skill_manage,
|
|
|
|
|
check_skill_manage_requirements,
|
|
|
|
|
SKILL_MANAGE_SCHEMA
|
|
|
|
|
)
|
|
|
|
|
|
2026-01-29 06:10:24 +00:00
|
|
|
# Browser automation tools (agent-browser + Browserbase)
|
|
|
|
|
from .browser_tool import (
|
|
|
|
|
browser_navigate,
|
|
|
|
|
browser_snapshot,
|
|
|
|
|
browser_click,
|
|
|
|
|
browser_type,
|
|
|
|
|
browser_scroll,
|
|
|
|
|
browser_back,
|
|
|
|
|
browser_press,
|
|
|
|
|
browser_close,
|
|
|
|
|
browser_get_images,
|
|
|
|
|
browser_vision,
|
|
|
|
|
cleanup_browser,
|
|
|
|
|
cleanup_all_browsers,
|
|
|
|
|
get_active_browser_sessions,
|
|
|
|
|
check_browser_requirements,
|
|
|
|
|
BROWSER_TOOL_SCHEMAS
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-02 08:26:42 -08:00
|
|
|
# Cronjob management tools (CLI-only, hermes-cli toolset)
|
|
|
|
|
from .cronjob_tools import (
|
2026-03-14 12:21:50 -07:00
|
|
|
cronjob,
|
2026-02-02 08:26:42 -08:00
|
|
|
schedule_cronjob,
|
|
|
|
|
list_cronjobs,
|
|
|
|
|
remove_cronjob,
|
|
|
|
|
check_cronjob_requirements,
|
|
|
|
|
get_cronjob_tool_definitions,
|
2026-03-14 12:21:50 -07:00
|
|
|
CRONJOB_SCHEMA,
|
2026-02-02 08:26:42 -08:00
|
|
|
)
|
|
|
|
|
|
2026-02-03 23:41:26 -08:00
|
|
|
# RL Training tools (Tinker-Atropos)
|
|
|
|
|
from .rl_training_tool import (
|
|
|
|
|
rl_list_environments,
|
|
|
|
|
rl_select_environment,
|
|
|
|
|
rl_get_current_config,
|
|
|
|
|
rl_edit_config,
|
|
|
|
|
rl_start_training,
|
|
|
|
|
rl_check_status,
|
|
|
|
|
rl_stop_training,
|
|
|
|
|
rl_get_results,
|
|
|
|
|
rl_list_runs,
|
2026-02-04 10:36:01 -08:00
|
|
|
rl_test_inference,
|
2026-02-03 23:41:26 -08:00
|
|
|
check_rl_api_keys,
|
|
|
|
|
get_missing_keys,
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-05 03:49:46 -08:00
|
|
|
# File manipulation tools (read, write, patch, search)
|
|
|
|
|
from .file_tools import (
|
|
|
|
|
read_file_tool,
|
|
|
|
|
write_file_tool,
|
|
|
|
|
patch_tool,
|
|
|
|
|
search_tool,
|
|
|
|
|
get_file_tools,
|
|
|
|
|
clear_file_ops_cache,
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-12 10:05:08 -08:00
|
|
|
# Text-to-speech tools (Edge TTS / ElevenLabs / OpenAI)
|
|
|
|
|
from .tts_tool import (
|
|
|
|
|
text_to_speech_tool,
|
|
|
|
|
check_tts_requirements,
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-17 17:02:33 -08:00
|
|
|
# Planning & task management tool
|
|
|
|
|
from .todo_tool import (
|
|
|
|
|
todo_tool,
|
|
|
|
|
check_todo_requirements,
|
|
|
|
|
TODO_SCHEMA,
|
|
|
|
|
TodoStore,
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-19 20:06:14 -08:00
|
|
|
# Clarifying questions tool (interactive Q&A with the user)
|
|
|
|
|
from .clarify_tool import (
|
|
|
|
|
clarify_tool,
|
|
|
|
|
check_clarify_requirements,
|
|
|
|
|
CLARIFY_SCHEMA,
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-19 23:23:43 -08:00
|
|
|
# Code execution sandbox (programmatic tool calling)
|
|
|
|
|
from .code_execution_tool import (
|
|
|
|
|
execute_code,
|
|
|
|
|
check_sandbox_requirements,
|
|
|
|
|
EXECUTE_CODE_SCHEMA,
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-20 03:15:53 -08:00
|
|
|
# Subagent delegation (spawn child agents with isolated context)
|
|
|
|
|
from .delegate_tool import (
|
|
|
|
|
delegate_task,
|
|
|
|
|
check_delegate_requirements,
|
|
|
|
|
DELEGATE_TASK_SCHEMA,
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-05 03:49:46 -08:00
|
|
|
# File tools have no external requirements - they use the terminal backend
|
|
|
|
|
def check_file_requirements():
|
|
|
|
|
"""File tools only require terminal backend to be available."""
|
|
|
|
|
from .terminal_tool import check_terminal_requirements
|
|
|
|
|
return check_terminal_requirements()
|
|
|
|
|
|
2025-10-01 09:54:17 +00:00
|
|
|
__all__ = [
|
|
|
|
|
# Web tools
|
|
|
|
|
'web_search_tool',
|
|
|
|
|
'web_extract_tool',
|
|
|
|
|
'web_crawl_tool',
|
|
|
|
|
'check_firecrawl_api_key',
|
2026-01-23 12:26:53 +00:00
|
|
|
# Terminal tools (mini-swe-agent backend)
|
|
|
|
|
'terminal_tool',
|
2026-01-10 05:56:26 +00:00
|
|
|
'check_terminal_requirements',
|
|
|
|
|
'cleanup_vm',
|
2026-01-29 06:10:24 +00:00
|
|
|
'cleanup_all_environments',
|
|
|
|
|
'get_active_environments_info',
|
2026-02-10 19:39:05 +00:00
|
|
|
'register_task_env_overrides',
|
|
|
|
|
'clear_task_env_overrides',
|
2026-01-23 12:26:53 +00:00
|
|
|
'TERMINAL_TOOL_DESCRIPTION',
|
2025-10-01 09:54:17 +00:00
|
|
|
# Vision tools
|
|
|
|
|
'vision_analyze_tool',
|
|
|
|
|
'check_vision_requirements',
|
|
|
|
|
# MoA tools
|
|
|
|
|
'mixture_of_agents_tool',
|
|
|
|
|
'check_moa_requirements',
|
|
|
|
|
# Image generation tools
|
|
|
|
|
'image_generate_tool',
|
|
|
|
|
'check_image_generation_requirements',
|
2026-01-30 07:39:55 +00:00
|
|
|
# Skills tools
|
|
|
|
|
'skills_list',
|
|
|
|
|
'skill_view',
|
|
|
|
|
'check_skills_requirements',
|
|
|
|
|
'SKILLS_TOOL_DESCRIPTION',
|
2026-02-19 18:25:53 -08:00
|
|
|
# Skill management
|
|
|
|
|
'skill_manage',
|
|
|
|
|
'check_skill_manage_requirements',
|
|
|
|
|
'SKILL_MANAGE_SCHEMA',
|
2026-01-29 06:10:24 +00:00
|
|
|
# Browser automation tools
|
|
|
|
|
'browser_navigate',
|
|
|
|
|
'browser_snapshot',
|
|
|
|
|
'browser_click',
|
|
|
|
|
'browser_type',
|
|
|
|
|
'browser_scroll',
|
|
|
|
|
'browser_back',
|
|
|
|
|
'browser_press',
|
|
|
|
|
'browser_close',
|
|
|
|
|
'browser_get_images',
|
|
|
|
|
'browser_vision',
|
|
|
|
|
'cleanup_browser',
|
|
|
|
|
'cleanup_all_browsers',
|
|
|
|
|
'get_active_browser_sessions',
|
|
|
|
|
'check_browser_requirements',
|
|
|
|
|
'BROWSER_TOOL_SCHEMAS',
|
2026-02-02 08:26:42 -08:00
|
|
|
# Cronjob management tools (CLI-only)
|
2026-03-14 12:21:50 -07:00
|
|
|
'cronjob',
|
2026-02-02 08:26:42 -08:00
|
|
|
'schedule_cronjob',
|
|
|
|
|
'list_cronjobs',
|
|
|
|
|
'remove_cronjob',
|
|
|
|
|
'check_cronjob_requirements',
|
|
|
|
|
'get_cronjob_tool_definitions',
|
2026-03-14 12:21:50 -07:00
|
|
|
'CRONJOB_SCHEMA',
|
2026-02-03 23:41:26 -08:00
|
|
|
# RL Training tools
|
|
|
|
|
'rl_list_environments',
|
|
|
|
|
'rl_select_environment',
|
|
|
|
|
'rl_get_current_config',
|
|
|
|
|
'rl_edit_config',
|
|
|
|
|
'rl_start_training',
|
|
|
|
|
'rl_check_status',
|
|
|
|
|
'rl_stop_training',
|
|
|
|
|
'rl_get_results',
|
|
|
|
|
'rl_list_runs',
|
2026-02-04 10:36:01 -08:00
|
|
|
'rl_test_inference',
|
2026-02-03 23:41:26 -08:00
|
|
|
'check_rl_api_keys',
|
|
|
|
|
'get_missing_keys',
|
2026-02-05 03:49:46 -08:00
|
|
|
# File manipulation tools
|
|
|
|
|
'read_file_tool',
|
|
|
|
|
'write_file_tool',
|
|
|
|
|
'patch_tool',
|
|
|
|
|
'search_tool',
|
|
|
|
|
'get_file_tools',
|
|
|
|
|
'clear_file_ops_cache',
|
|
|
|
|
'check_file_requirements',
|
2026-02-12 10:05:08 -08:00
|
|
|
# Text-to-speech tools
|
|
|
|
|
'text_to_speech_tool',
|
|
|
|
|
'check_tts_requirements',
|
2026-02-17 17:02:33 -08:00
|
|
|
# Planning & task management tool
|
|
|
|
|
'todo_tool',
|
|
|
|
|
'check_todo_requirements',
|
|
|
|
|
'TODO_SCHEMA',
|
|
|
|
|
'TodoStore',
|
2026-02-19 20:06:14 -08:00
|
|
|
# Clarifying questions tool
|
|
|
|
|
'clarify_tool',
|
|
|
|
|
'check_clarify_requirements',
|
|
|
|
|
'CLARIFY_SCHEMA',
|
2026-02-19 23:23:43 -08:00
|
|
|
# Code execution sandbox
|
|
|
|
|
'execute_code',
|
|
|
|
|
'check_sandbox_requirements',
|
|
|
|
|
'EXECUTE_CODE_SCHEMA',
|
2026-02-20 03:15:53 -08:00
|
|
|
# Subagent delegation
|
|
|
|
|
'delegate_task',
|
|
|
|
|
'check_delegate_requirements',
|
|
|
|
|
'DELEGATE_TASK_SCHEMA',
|
2025-10-01 09:54:17 +00:00
|
|
|
]
|
|
|
|
|
|