Architecture & Config

Multi-Profile Constants Definition & Logging Stream Isolation

Decrypting hermes_constants.py environment root resolution and hermes_logging.py log pipeline routing
Architecture Overview
📊 Figure 1-1-1: Hermes Agent Architecture Overview & Narrow Waist Topology

📂 1. hermes_constants.py Multi-Config Environment Root Isolation

The system needs to precisely load a specific Profile's home directory at startup. hermes_constants.py controls this behavior through the following source code:

  • get_hermes_home(): Reads the HERMES_HOME environment variable. If not set, defaults to ~/.hermes under the user's home directory.
  • display_hermes_home(): Outputs the active path to the console, ensuring the user can clearly identify the active environment.
State and Path Interaction
📊 Figure 1-1-2: Main Path Resolution, SessionDB File Addressing & Write Lock Competition Interaction

📜 2. hermes_logging.py Multi-Level Log Isolation

In hermes_logging.py, the system separates logs by service to streamline debugging:

  • agent.log: General debug output logs (level INFO and above).
  • errors.log: Fatal errors or warnings (level WARNING and above).
  • gateway.log: Independent recording of all IM channel message send/receive activity.