Skip to content

Commit 38f836e

Browse files
committed
Merge branch 'main' into fix/fix-mcp-logging
2 parents 209eb46 + c98ebe1 commit 38f836e

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

agent_memory_server/api.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,12 @@ async def put_working_memory(
308308
if user_id is not None:
309309
memory.user_id = user_id
310310

311-
# Validate that all structured memories have id (if any)
312-
for mem in memory.memories:
313-
if not mem.id:
311+
# Validate that all long-term memories have id (if any)
312+
for long_term_mem in memory.memories:
313+
if not long_term_mem.id:
314314
raise HTTPException(
315315
status_code=400,
316-
detail="All memory records in working memory must have an ID",
316+
detail="All long-term memory records in working memory must have an ID",
317317
)
318318

319319
# Handle summarization if needed (before storing) - now token-based
@@ -453,17 +453,13 @@ async def search_long_term_memory(
453453
# Extract filter objects from the payload
454454
filters = payload.get_filters()
455455

456-
print("Long-term search filters: ", filters)
457-
458456
kwargs = {
459457
"distance_threshold": payload.distance_threshold,
460458
"limit": payload.limit,
461459
"offset": payload.offset,
462460
**filters,
463461
}
464462

465-
print("Kwargs: ", kwargs)
466-
467463
kwargs["text"] = payload.text or ""
468464

469465
# Pass text and filter objects to the search function (no redis needed for vectorstore adapter)
@@ -568,8 +564,6 @@ async def memory_prompt(
568564
redis = await get_redis_conn()
569565
_messages = []
570566

571-
print("Received params: ", params)
572-
573567
if params.session:
574568
# Use token limit for memory prompt, fallback to message count for backward compatibility
575569
if params.session.model_name or params.session.context_window_max:

agent_memory_server/cli.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""
32
Command-line interface for agent-memory-server.
43
"""
@@ -24,7 +23,6 @@
2423
from agent_memory_server.utils.redis import ensure_search_index_exists, get_redis_conn
2524

2625

27-
# Don't configure logging at module level - let each command handle it
2826
logger = get_logger(__name__)
2927

3028
VERSION = "0.2.0"

agent_memory_server/vectorstore_adapter.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -832,16 +832,12 @@ async def search_memories(
832832
score_threshold = 1.0 - distance_threshold
833833
search_kwargs["score_threshold"] = score_threshold
834834

835-
print("Search kwargs: ", search_kwargs)
836-
837835
search_results = (
838836
await self.vectorstore.asimilarity_search_with_relevance_scores(
839837
**search_kwargs
840838
)
841839
)
842840

843-
print("Search results: ", search_results)
844-
845841
# Convert results to MemoryRecordResult objects
846842
memory_results = []
847843
for i, (doc, score) in enumerate(search_results):

0 commit comments

Comments
 (0)