@@ -105,10 +105,10 @@ working_memory = WorkingMemory(
105
105
)
106
106
107
107
# Store working memory
108
- response = await client.put_session_memory (" user-session-123" , working_memory)
108
+ response = await client.put_working_memory (" user-session-123" , working_memory)
109
109
110
110
# Retrieve working memory
111
- memory = await client.get_session_memory (" user-session-123" )
111
+ memory = await client.get_working_memory (" user-session-123" )
112
112
113
113
# Convenience method for data storage
114
114
await client.set_working_memory_data(
@@ -204,7 +204,7 @@ await client.update_working_memory_data(
204
204
merge_strategy = " deep_merge" # "replace", "merge", or "deep_merge"
205
205
)
206
206
207
- # Append messages efficiently
207
+ # Append messages
208
208
new_messages = [
209
209
MemoryMessage(role = " user" , content = " What's the weather?" ),
210
210
MemoryMessage(role = " assistant" , content = " It's sunny today!" )
@@ -225,7 +225,7 @@ from agent_memory_client.filters import (
225
225
)
226
226
from datetime import datetime, timezone
227
227
228
- # Complex search with multiple filters
228
+ # Complex search with filters
229
229
results = await client.search_long_term_memory(
230
230
text = " machine learning" ,
231
231
session_id = SessionId(in_ = [" session-1" , " session-2" ]),
@@ -251,7 +251,7 @@ from agent_memory_client.exceptions import (
251
251
)
252
252
253
253
try :
254
- memory = await client.get_session_memory (" nonexistent-session" )
254
+ memory = await client.get_working_memory (" nonexistent-session" )
255
255
except MemoryNotFoundError:
256
256
print (" Session not found" )
257
257
except MemoryServerError as e:
@@ -286,12 +286,12 @@ pytest --cov=agent_memory_client
286
286
### Code Quality
287
287
288
288
``` bash
289
- # Format code
290
- black agent_memory_client/
291
-
292
289
# Lint code
293
290
ruff check agent_memory_client/
294
291
292
+ # Format code
293
+ ruff format agent_memory_client/
294
+
295
295
# Type checking
296
296
mypy agent_memory_client/
297
297
```
0 commit comments