Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion agent_memory_server/long_term_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from docket import Timeout
from docket.dependencies import Perpetual
from redis.asyncio import Redis
from redis.commands.core import HashDataPersistOptions
from ulid import ULID

from agent_memory_server.config import settings
Expand Down Expand Up @@ -542,7 +543,7 @@ async def extract_memory_structure(
"topics": encode_tag_values(merged_topics),
"entities": encode_tag_values(merged_entities),
},
data_persist_option="FXX",
data_persist_option=HashDataPersistOptions.FXX,
keepttl=True,
)
if result == 0:
Expand Down
3 changes: 2 additions & 1 deletion tests/test_long_term_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from unittest.mock import AsyncMock, MagicMock, Mock, patch

import pytest
from redis.commands.core import HashDataPersistOptions

from agent_memory_server.filters import Entities, Namespace, SessionId, Topics
from agent_memory_server.long_term_memory import (
Expand Down Expand Up @@ -343,7 +344,7 @@ async def test_extract_memory_structure(self, mock_async_redis_client):
mapping = call_kwargs[1]["mapping"]
assert mapping["topics"] == "topic1,topic2"
assert mapping["entities"] == "entity1,entity2"
assert call_kwargs[1]["data_persist_option"] == "FXX"
assert call_kwargs[1]["data_persist_option"] == HashDataPersistOptions.FXX
assert call_kwargs[1]["keepttl"] is True

@pytest.mark.asyncio
Expand Down
Loading