You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove unnecessary reinforcement about client control limitations
- Focus on positive descriptions of how the system works
- Clean up leftover editing comments ('Correct method name')
- Address review feedback for cleaner, more direct language
Co-authored-by: Andrew Brookins <[email protected]>
Copy file name to clipboardExpand all lines: docs/memory-lifecycle.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Memory lifecycle in the system follows these stages:
15
15
16
16
## Key Architectural Principle
17
17
18
-
**⚠️ Important**: Memory forgetting is controlled entirely by the **server**, not the client. Clients cannot directly trigger forgetting operations or set forgetting policies. All memory cleanup happens automatically through background processes based on server configuration.
18
+
Memory forgetting operates through **server-controlled background processes**. The system automatically manages memory cleanup based on server configuration, ensuring consistent resource management and optimal performance.
Memory forgetting is an **automatic background process**running on the server. Clients have no direct control over when or how memories are deleted. The system uses a background task scheduler (Docket) that periodically evaluates and deletes memories based on server configuration.
106
+
Memory forgetting operates as an **automatic background process**using Docket (a Redis-based task scheduler). The system periodically evaluates and deletes memories based on server configuration thresholds and policies.
**Note**: Clients cannot directly monitor or control background forgetting processes. This is by design to maintain server autonomy over resource management.
214
+
**Note**: Background forgetting processes operate independently to maintain consistent server resource management.
215
215
216
216
## Client-Side Memory Management
217
217
218
-
While clients cannot control automatic forgetting, they can perform manual cleanup operations:
print(f"Deleted {len(memory_ids)} memories with topic '{topic}'")
266
266
```
267
267
@@ -274,7 +274,7 @@ Working memory has automatic TTL (1 hour by default) but can be manually managed
274
274
await client.delete_working_memory("session-123")
275
275
```
276
276
277
-
**Note**: Unlike the old documentation, there are no APIs for listing active sessions or batch working memory cleanup. Working memory cleanup is primarily handled by Redis TTL.
277
+
**Note**: Working memory cleanup is primarily handled by Redis TTL with configurable session timeouts.
278
278
279
279
## Memory Compaction
280
280
@@ -293,7 +293,7 @@ Compaction frequency is controlled by the server configuration:
293
293
COMPACTION_EVERY_MINUTES=10 # Default: every 10 minutes
294
294
```
295
295
296
-
**Important**: Clients cannot directly trigger compaction operations. This is handled automatically by background tasks.
296
+
Compaction runs automatically through background tasks, ensuring optimal storage and search performance.
The key architectural principle is **server autonomy**: the server controls when and how memories are forgotten through background processes. Clients can only:
406
+
The system provides **automated memory lifecycle management** through server-controlled background processes. Clients can:
407
407
408
408
1.**Delete specific memories** by ID using `delete_long_term_memories()`
409
409
2.**Delete working memory sessions** using `delete_working_memory()`
410
410
3.**Search and identify** memories for manual cleanup
411
411
412
-
All automatic lifecycle management (forgetting, compaction, optimization) happens server-side based on configuration and background task scheduling. This design ensures consistent resource management and prevents clients from interfering with server performance optimization.
412
+
Automatic lifecycle management (forgetting, compaction, optimization) operates server-side based on configuration and background task scheduling. This design ensures consistent resource management and optimal server performance.
0 commit comments