Memory
Custom Memory
This example shows how you can configure the Memory Manager and Summarizer models individually.
In this example, we use OpenRouter and LLama 3.3-70b-instruct for the memory manager and Claude 3.5 Sonnet for the summarizer, while using Gemini for the Agent.
We also set custom system prompts for the memory manager and summarizer.
Code
cookbook/agent_concepts/memory/10_custom_memory.py
Usage
1
Create a virtual environment
Open the Terminal
and create a python virtual environment.
2
Install libraries
3
Run Example