Hermes Agent Complete Module
This module implements the complete Hermes Agent functionality as a standardized ahserver module with full multi-user isolation support, intelligent memory filtering, true workflow orchestration capabilities, and comprehensive security controls.
Features
Core Capabilities
- Multi-user isolation: Complete data isolation with automatic user context propagation
- Intelligent memory filtering: Token-aware memory optimization with priority classification
- True orchestration: Workflow parsing, parallel execution, and skill-based automation
- Remote skills: SSH deployment and execution of remote skills with full security
- Usage statistics: Memory access tracking for intelligent relevance ranking
- Enhanced security: Controlled local skills with proper validation and sandboxing
Orchestration Features
- Workflow types: Sequential, parallel, and hybrid workflow execution
- Task dependencies: Support for task dependencies and parallel groups
- Retry mechanisms: Configurable retry counts with exponential backoff
- Timeout handling: Per-task and per-workflow timeout protection
- Execution monitoring: Real-time execution status tracking and logging
Database Schema
The module includes enhanced database tables following the database-table-definition-spec:
- hermes_memory: Enhanced with intelligent memory filtering fields (
priority,access_count,last_accessed) - hermes_skills: User-isolated skills storage with full CRUD operations
- hermes_sessions: Session metadata with user isolation
- hermes_remote_skills: SSH remote skills configuration with deployment tracking
- hermes_workflows: Workflow definitions with orchestration parameters
- hermes_tasks: Task definitions with dependencies and execution parameters
- hermes_executions: Execution records with status tracking and results
Frontend Integration
All interfaces follow the bricks-framework requirements:
- Pure JSON format (.ui files)
- Proper widgettype, options, subwidgets, and binds structure
- URL widget actions for dynamic content loading
- Register function bindings for backend integration
- Tab-based navigation for organized interface
Complete Directory Structure
harnessed_agent_complete/
├── harnessed_agent/ # Python package directory
│ ├── __init__.py # Empty package initialization file
│ ├── core.py # Core implementation with multi-user support
│ └── orchestrator.py # Workflow orchestration implementation
├── wwwroot/ # Frontend interfaces using bricks-framework
│ ├── harnessed_agent.ui # Main tab-based layout with user display
│ ├── memory.ui # Memory management interface
│ ├── skills.ui # Skills management interface
│ ├── remote_skills.ui # Remote skills management interface
│ ├── workflows.ui # Workflow management interface
│ ├── tasks.ui # Task management interface
│ ├── sessions.ui # Session search interface
│ └── tools.ui # Tool execution interface
├── json/ # CRUD operation definitions (JSON format)
│ ├── hermes_memory_crud.json # Memory CRUD operations
│ ├── hermes_skills_crud.json # Skills CRUD operations
│ ├── hermes_sessions_crud.json # Sessions CRUD operations
│ ├── hermes_remote_skills_crud.json # Remote skills CRUD operations
│ ├── hermes_workflows_crud.json # Workflows CRUD operations
│ ├── hermes_tasks_crud.json # Tasks CRUD operations
│ └── hermes_executions_crud.json # Executions CRUD operations
├── models/ # Database table definitions (copied from orchestrator)
│ └── database.json # Complete database schema definition
├── init/ # Initialization data (copied from original)
│ └── data.json # Default memory and skills entries
├── build.sh # Build integration script
├── pyproject.toml # Python packaging configuration
├── requirements.txt # Dependencies list
├── setup.cfg # Setup configuration
├── README.md # This complete documentation
└── test_import.py # Import test script
Installation
- Clone this repository to your
~/reposdirectory - Install the module using pip:
pip install -e . - The module will be automatically loaded via the
load_harnessed_agent()function - Access the interface at
/harnessed_agent/harnessed_agent.ui
Dependencies
- ahserver >=1.0.0 (with user context support)
- appPublic >=1.0.0
- sqlor-database-module >=1.0.0
- rbac-module >=1.0.0 (recommended for authentication)
- OpenSSH Client (required for SSH remote skills functionality)
Security Considerations
This version maintains support for user local skills but implements enhanced security controls:
- All local skills are stored in the database with proper user isolation
- Skills content is validated before storage and execution
- Execution occurs within proper sandboxing contexts
- RBAC integration ensures only authorized users can create/modify skills
For environments requiring maximum security, consider disabling local skills through configuration or RBAC policies.
Verification Checklist
- Module loads correctly via load_harnessed_agent() function
- All exposed functions work in frontend scripts with user context
- Database operations follow sqlor specifications with user isolation
- Frontend renders correctly with bricks-framework
- CRUD operations function as defined with automatic user filtering
- Initialization data loads properly for multiple users
- Package builds successfully with pyproject.toml
- Follows all three specification skills exactly
- Production-ready with no example code
- Multi-user isolation verified and secure
- RBAC integration works seamlessly with existing authentication modules
- SSH Remote Skills functionality complete with security and timeout protection
- Intelligent Memory Filtering with token optimization and automatic cleanup
- True Orchestration with workflow execution and parallel task support
- Complete frontend interface with all management capabilities
This implementation represents a complete, production-ready Hermes Agent module with full multi-user support, intelligent memory management, true workflow orchestration capabilities, and comprehensive security controls that can be deployed immediately without modification.