From a648022137b41e32e03b2203edc35b530ef4bb02 Mon Sep 17 00:00:00 2001 From: dmahan93 Date: Sun, 8 Mar 2026 18:39:19 -0500 Subject: [PATCH] feat: include session ID in system prompt The agent now sees its session ID in the system prompt: Conversation started: Sunday, March 08, 2026 06:32 PM Session ID: 20260308_183200_abc123 This lets the LLM reference its own session (e.g., telling the user how to resume, or for self-awareness in multi-session workflows). --- run_agent.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/run_agent.py b/run_agent.py index 0537dd973ca..ec3efe4a0c1 100644 --- a/run_agent.py +++ b/run_agent.py @@ -1409,9 +1409,10 @@ class AIAgent: from hermes_time import now as _hermes_now now = _hermes_now() - prompt_parts.append( - f"Conversation started: {now.strftime('%A, %B %d, %Y %I:%M %p')}" - ) + timestamp_line = f"Conversation started: {now.strftime('%A, %B %d, %Y %I:%M %p')}" + if self.session_id: + timestamp_line += f"\nSession ID: {self.session_id}" + prompt_parts.append(timestamp_line) platform_key = (self.platform or "").lower().strip() if platform_key in PLATFORM_HINTS: