diff options
| author | batsumaru <> | 2026-09-17 13:41:21 +0900 |
|---|---|---|
| committer | batsumaru <> | 2026-09-17 13:41:21 +0900 |
| commit | cc208ff33505a7e0407c1fe90444d8b608817897 (patch) | |
| tree | e929beb2412559d8ba8f4b83a80f283c1958b0fa /personal_agent/tools/memory.py | |
| parent | c22cdbffa50ac634f7fecf080f3c3b5662e67131 (diff) | |
Diffstat (limited to 'personal_agent/tools/memory.py')
| -rw-r--r-- | personal_agent/tools/memory.py | 11 |
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 ] |
