File size: 559 Bytes
c6421b9
 
 
 
 
 
b99e403
c6421b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from langmem import create_search_memory_tool
from langchain.tools import tool

search_memory_tool = create_search_memory_tool(
    namespace=(
        "email",
        "{user_id}",
        "collection"
    )
)

@tool
def give_previous_context(memory_summary: str) -> str:
    """
   Args:
        memory_summary: Structured summary containing sender identity,
                        past context, new facts stored, and suggested tone.
                        
    """
    return memory_summary

context_agent_tools=[search_memory_tool,give_previous_context]