@@ -360,14 +360,23 @@ async def search_long_term_memory(
360360 search_long_term_memory(text="user's favorite color")
361361 ```
362362
363- 2. Search with simple session filter:
363+ 2. Get ALL memories for a user (e.g., "what do you remember about me?"):
364+ ```python
365+ search_long_term_memory(
366+ text="", # Empty string returns all memories for the user
367+ user_id={"eq": "user_123"},
368+ limit=50 # Adjust based on how many memories you want
369+ )
370+ ```
371+
372+ 3. Search with simple session filter:
364373 ```python
365374 search_long_term_memory(text="user's favorite color", session_id={
366375 "eq": "session_12345"
367376 })
368377 ```
369378
370- 3 . Search with complex filters:
379+ 4 . Search with complex filters:
371380 ```python
372381 search_long_term_memory(
373382 text="user preferences",
@@ -381,7 +390,7 @@ async def search_long_term_memory(
381390 )
382391 ```
383392
384- 4 . Search with datetime range filters:
393+ 5 . Search with datetime range filters:
385394 ```python
386395 search_long_term_memory(
387396 text="recent conversations",
@@ -395,7 +404,7 @@ async def search_long_term_memory(
395404 )
396405 ```
397406
398- 5 . Search with between datetime filter:
407+ 6 . Search with between datetime filter:
399408 ```python
400409 search_long_term_memory(
401410 text="holiday discussions",
@@ -406,7 +415,7 @@ async def search_long_term_memory(
406415 ```
407416
408417 Args:
409- text: The semantic search query text (required)
418+ text: The semantic search query text (required). Use empty string "" to get all memories for a user.
410419 session_id: Filter by session ID
411420 namespace: Filter by namespace
412421 topics: Filter by topics
@@ -482,20 +491,14 @@ async def memory_prompt(
482491 """
483492 Hydrate a user query with relevant session history and long-term memories.
484493
485- CRITICAL: Use this tool for EVERY question that might benefit from memory context,
486- especially when you don't have sufficient information to answer confidently.
487-
488494 This tool enriches the user's query by retrieving:
489495 1. Context from the current conversation session
490496 2. Relevant long-term memories related to the query
491497
492- ALWAYS use this tool when:
493- - The user references past conversations
494- - The question is about user preferences or personal information
495- - You need additional context to provide a complete answer
496- - The question seems to assume information you don't have in current context
498+ The tool returns both the relevant memories AND the user's query in a format ready for
499+ generating comprehensive responses.
497500
498- The function uses the text field from the payload as the user's query,
501+ The function uses the query field from the payload as the user's query,
499502 and any filters to retrieve relevant memories.
500503
501504 DATETIME INPUT FORMAT:
@@ -512,12 +515,20 @@ async def memory_prompt(
512515 COMMON USAGE PATTERNS:
513516 ```python
514517 1. Hydrate a user prompt with long-term memory search:
515- hydrate_memory_prompt(text="What was my favorite color?")
518+ memory_prompt(query="What was my favorite color?")
519+ ```
520+
521+ 2. Answer "what do you remember about me?" type questions:
522+ memory_prompt(
523+ query="What do you remember about me?",
524+ user_id={"eq": "user_123"},
525+ limit=50
526+ )
516527 ```
517528
518- 2 . Hydrate a user prompt with long-term memory search and session filter:
519- hydrate_memory_prompt (
520- text ="What is my favorite color?",
529+ 3 . Hydrate a user prompt with long-term memory search and session filter:
530+ memory_prompt (
531+ query ="What is my favorite color?",
521532 session_id={
522533 "eq": "session_12345"
523534 },
@@ -526,9 +537,9 @@ async def memory_prompt(
526537 }
527538 )
528539
529- 3 . Hydrate a user prompt with long-term memory search and complex filters:
530- hydrate_memory_prompt (
531- text ="What was my favorite color?",
540+ 4 . Hydrate a user prompt with long-term memory search and complex filters:
541+ memory_prompt (
542+ query ="What was my favorite color?",
532543 topics={
533544 "any": ["preferences", "settings"]
534545 },
@@ -538,9 +549,9 @@ async def memory_prompt(
538549 limit=5
539550 )
540551
541- 4 . Search with datetime range filters:
542- hydrate_memory_prompt (
543- text ="What did we discuss recently?",
552+ 5 . Search with datetime range filters:
553+ memory_prompt (
554+ query ="What did we discuss recently?",
544555 created_at={
545556 "gte": "2024-01-01T00:00:00Z",
546557 "lt": "2024-02-01T00:00:00Z"
@@ -552,7 +563,7 @@ async def memory_prompt(
552563 ```
553564
554565 Args:
555- - text : The user's query
566+ - query : The user's query
556567 - session_id: Add conversation history from a working memory session
557568 - namespace: Filter session and long-term memory namespace
558569 - topics: Search for long-term memories matching topics
0 commit comments