Skip to main content
Combine a user’s memories into a single summarized memory with MemoryManager.optimize_memories(). The example counts tokens before and after to show the reduction.

Code

memory-optimization.py

Usage

1

Set up your virtual environment

2

Set your API keys

3

Install dependencies

4

Run Example