From 5c0ee3bb3f2c5d67a26272f4d69b5fc4847144f7 Mon Sep 17 00:00:00 2001 From: grodingo Date: Fri, 15 May 2026 02:50:20 +0200 Subject: [PATCH] fix(hermes): use correct API keys tool_input/tool_output in sync_turn The Hermes plugin's sync_turn() method sends conversation observations to the agentmemory /observe endpoint using keys 'input' and 'output', but the server's mem::observe handler extracts data using 'tool_input' and 'tool_output' (see src/functions/observe.ts). This key mismatch means raw.toolInput and raw.toolOutput are always undefined. When auto-compress is enabled, the LLM receives a nearly empty compression prompt (only timestamp + hookType + toolName), which produces generic, useless observations like: title: "Agent initiated conversation" narrative: "No specific content was provided" importance: 1 With the corrected keys, DeepSeek/Vision models receive the actual conversation content and produce meaningful, structured observations: title: "Verified fix for agentmemory plugin key naming" importance: 6 concepts: ["agentmemory plugin", "tool_input/tool_output key renaming"] facts: ["The fix replaces 'input'/'output' keys with..."] --- integrations/hermes/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/hermes/__init__.py b/integrations/hermes/__init__.py index 7f17d98a..abfaf5a1 100644 --- a/integrations/hermes/__init__.py +++ b/integrations/hermes/__init__.py @@ -344,8 +344,8 @@ def sync_turn(self, user: str, assistant: str, **kwargs: Any) -> None: "timestamp": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()), "data": { "tool_name": "conversation", - "input": user[:500], - "output": assistant[:2000], + "tool_input": user[:500], + "tool_output": assistant[:2000], }, })