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
1 change: 1 addition & 0 deletions agent_memory_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ class Settings(BaseSettings):

# Compaction settings
compaction_every_minutes: int = 10
compact_semantic_duplicates: bool = True

# Docket task timeout for LLM-dependent tasks (in minutes)
# This controls how long tasks like memory compaction, extraction, and summarization
Expand Down
5 changes: 4 additions & 1 deletion agent_memory_server/long_term_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ async def compact_long_term_memories(
redis_client: Redis | None = None,
vector_distance_threshold: float = 0.2,
compact_hash_duplicates: bool = True,
compact_semantic_duplicates: bool = True,
compact_semantic_duplicates: bool | None = None,
perpetual: Perpetual = Perpetual(
every=timedelta(minutes=settings.compaction_every_minutes), automatic=True
),
Expand All @@ -653,6 +653,9 @@ async def compact_long_term_memories(

Returns the count of remaining memories after compaction.
"""
if compact_semantic_duplicates is None:
compact_semantic_duplicates = settings.compact_semantic_duplicates

if not redis_client:
redis_client = await get_redis_conn()

Expand Down
Loading
Loading