summaryrefslogtreecommitdiff
path: root/personal_agent/tools
diff options
context:
space:
mode:
Diffstat (limited to 'personal_agent/tools')
-rw-r--r--personal_agent/tools/memory.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/personal_agent/tools/memory.py b/personal_agent/tools/memory.py
index ff91234..86513b1 100644
--- a/personal_agent/tools/memory.py
+++ b/personal_agent/tools/memory.py
@@ -1,3 +1,4 @@
+from datetime import UTC, datetime
from uuid import UUID
from personal_agent.memory.models import LongTermMemory, MemoryCategory, WorkingMemory
@@ -376,8 +377,16 @@ class LongTermMemorySearchTool(Tool):
if not memories:
return ToolResult(content="No matching memories found.")
+ now = datetime.now(UTC)
+
lines = [
- f"- [{memory.category.value}] {memory.id}: {memory.content}"
+ (
+ f"- [{memory.category.value}] {memory.id}\n"
+ f" content: {memory.content}\n"
+ f" created_at: {memory.created_at.isoformat()}\n"
+ f" importance: {memory.importance}"
+ f" stale: {(now - memory.created_at).days >= 365}"
+ )
for memory in memories
]