Multi-Profile Constants Definition & Logging Stream Isolation
Decrypting hermes_constants.py environment root resolution and hermes_logging.py log pipeline routing
📊 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 theHERMES_HOMEenvironment variable. If not set, defaults to~/.hermesunder the user's home directory.display_hermes_home(): Outputs the active path to the console, ensuring the user can clearly identify the active environment.
📊 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 (levelINFOand above).errors.log: Fatal errors or warnings (levelWARNINGand above).gateway.log: Independent recording of all IM channel message send/receive activity.