Update environment configuration and enhance terminal tool integration

- Updated `.env.example` to include new API keys and configuration options for the mini-swe-agent backend, including support for local, Docker, and Modal environments.
- Added `.gitmodules` to include mini-swe-agent as a submodule for easier integration.
- Refactored `mini_swe_runner.py` to use the updated model format and default to OpenRouter for API calls.
- Enhanced `model_tools.py` to support the new terminal tool definitions and ensure compatibility with the mini-swe-agent backend.
- Updated `README.md` to reflect changes in setup instructions and environment variable configurations.
- Improved `terminal_tool.py` to manage execution environments and lifecycle, ensuring proper cleanup and error handling.
- Introduced `terminal_hecate.py` for executing commands on MorphCloud VMs, providing an alternative backend for terminal operations.
This commit is contained in:
teknium 2026-01-23 12:26:53 +00:00
parent 47555602d7
commit ba19d530ad
11 changed files with 548 additions and 473 deletions

View file

@ -6,7 +6,8 @@ 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
- simple_terminal_tool: Simple command execution on virtual machines (no session persistence)
- terminal_tool: Command execution using mini-swe-agent (local/docker/modal backends)
- terminal_hecate: Command execution on MorphCloud/Hecate cloud VMs (alternative backend)
- vision_tools: Image analysis and understanding
- mixture_of_agents_tool: Multi-model collaborative reasoning
- image_generation_tool: Text-to-image generation with upscaling
@ -23,11 +24,19 @@ from .web_tools import (
check_firecrawl_api_key
)
from .simple_terminal_tool import (
simple_terminal_tool,
check_requirements as check_terminal_requirements,
# Primary terminal tool (mini-swe-agent backend: local/docker/modal)
from .terminal_tool import (
terminal_tool,
check_terminal_requirements,
cleanup_vm,
SIMPLE_TERMINAL_TOOL_DESCRIPTION
TERMINAL_TOOL_DESCRIPTION
)
# Alternative terminal tool (Hecate/MorphCloud cloud VMs)
from .terminal_hecate import (
terminal_hecate_tool,
check_hecate_requirements,
TERMINAL_HECATE_DESCRIPTION
)
from .vision_tools import (
@ -51,11 +60,15 @@ __all__ = [
'web_extract_tool',
'web_crawl_tool',
'check_firecrawl_api_key',
# Terminal tools (simple - no session persistence)
'simple_terminal_tool',
# Terminal tools (mini-swe-agent backend)
'terminal_tool',
'check_terminal_requirements',
'cleanup_vm',
'SIMPLE_TERMINAL_TOOL_DESCRIPTION',
'TERMINAL_TOOL_DESCRIPTION',
# Terminal tools (Hecate/MorphCloud backend)
'terminal_hecate_tool',
'check_hecate_requirements',
'TERMINAL_HECATE_DESCRIPTION',
# Vision tools
'vision_analyze_tool',
'check_vision_requirements',