mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
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).
This commit is contained in:
parent
c5e8166c8b
commit
a648022137
1 changed files with 4 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue