File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -138,12 +138,19 @@ memory.wait_for_run(run)
138138```
139139This will block until the memory agent has completed processing.
140140
141- ### Retrieving memories for a user
142- You can retrieve the summary and/or user memory for a given user with:
141+ ### Getting memories for a user
142+ You can get the context blocks for the summary and/or user memory with:
143143``` python
144144summary = memory.get_summary(" user_id" , prompt_formatted = True )
145145user_memory = memory.get_user_memory(" user_id" , prompt_formatted = True )
146146```
147+ To get the raw value of the context block, you can pass ` prompt_formatted=False ` .
148+
149+ ### Searching messages
150+ You can search messages with semantic search with:
151+ ``` python
152+ messages = memory.query(" user_id" , query = " Favorite foods" )
153+ ```
147154
148155### Retrieving the memory agent
149156Memories are formed by Letta agents using the sleeptime architecture. You can get the agent's ID with:
You can’t perform that action at this time.
0 commit comments