diff --git a/agent/agent.py b/agent/agent.py index 5ad1881..a433e66 100644 --- a/agent/agent.py +++ b/agent/agent.py @@ -66,12 +66,15 @@ SYSTEM_PROMPT = textwrap.dedent("""\ When the user asks about personal information, past conversations, or anything you might have stored, you MUST call recall FIRST before answering. Do NOT say "I don't have that info" without calling recall. + When you call recall, ALWAYS include session_id="hope" to search the + session cache. When the user tells you something to remember or shares a preference, - you MUST call remember. Do NOT just say "okay I'll remember that." - - User says "what's my name?" → CALL recall with query="my name" - - User says "do you remember who I am?" → CALL recall with query="user identity name" + you MUST call remember with session_id="hope". Always include + session_id="hope" in every remember call — this makes it instant. + - User says "what's my name?" → CALL recall with query="my name", session_id="hope" + - User says "do you remember who I am?" → CALL recall with query="user identity name", session_id="hope" - User says "remember my coffee order is oat milk latte" → CALL remember - with data="User's coffee order is an oat milk latte" + with data="User's coffee order is an oat milk latte", session_id="hope" - User says "forget that I like blue" → CALL forget to remove it After calling remember, confirm briefly ("Got it, I'll remember that"). If recall returns nothing, then say you don't have that info yet. @@ -169,7 +172,7 @@ class _ReasoningFallbackWrapper: self._has_content = True tc = getattr(delta, "tool_calls", None) if tc: - logger.info("LLM tool_call: %s", [t.function.name for t in tc]) + logger.info("LLM tool_call: %s", [getattr(t, "name", str(t)) for t in tc]) return chunk async def collect(self):