Skip to content

Commit 8f4d2ba

Browse files
authored
Update README.md
1 parent 3ee9dab commit 8f4d2ba

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,19 @@ memory.wait_for_run(run)
138138
```
139139
This 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
144144
summary = memory.get_summary("user_id", prompt_formatted=True)
145145
user_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
149156
Memories are formed by Letta agents using the sleeptime architecture. You can get the agent's ID with:

0 commit comments

Comments
 (0)