diff --git a/README.md b/README.md index dc4e873165..3f23f8adee 100644 --- a/README.md +++ b/README.md @@ -492,10 +492,10 @@ All CLI and messaging sessions are stored in a SQLite database (`~/.hermes/state ### 📝 Session Logging -Every conversation is logged to `~/.hermes-agent/logs/` for debugging: +Every conversation is logged to `~/.hermes/sessions/` for debugging: ``` -logs/ +sessions/ ├── session_20260201_143052_a1b2c3.json └── ... ``` @@ -1361,8 +1361,7 @@ All variables go in `~/.hermes/.env`. Run `hermes config set VAR value` to set t | `~/.hermes/auth.json` | OAuth provider credentials (managed by `hermes login`) | | `~/.hermes/cron/` | Scheduled jobs data | | `~/.hermes/sessions/` | Gateway session data | -| `~/.hermes-agent/` | Installation directory | -| `~/.hermes-agent/logs/` | Session logs | +| `~/.hermes/hermes-agent/` | Installation directory | | `hermes_cli/` | CLI implementation | | `hermes_cli/auth.py` | Multi-provider auth system | | `tools/` | Tool implementations | diff --git a/run_agent.py b/run_agent.py index 9069944071..94074252d6 100644 --- a/run_agent.py +++ b/run_agent.py @@ -1295,9 +1295,10 @@ class AIAgent: short_uuid = uuid.uuid4().hex[:6] self.session_id = f"{timestamp_str}_{short_uuid}" - # Setup logs directory - self.logs_dir = Path(__file__).parent / "logs" - self.logs_dir.mkdir(exist_ok=True) + # Session logs go into ~/.hermes/sessions/ alongside gateway sessions + hermes_home = Path(os.getenv("HERMES_HOME", Path.home() / ".hermes")) + self.logs_dir = hermes_home / "sessions" + self.logs_dir.mkdir(parents=True, exist_ok=True) self.session_log_file = self.logs_dir / f"session_{self.session_id}.json" # Track conversation messages for session logging