Memory Modules
In this section, we'll cover:
💭 What is a Memory Module?
Memory modules enable agent modules on Naptha to store, retrieve, and manage their experiences over time. These modules are crucial for maintaining context and learning from past interactions.
You can create modules for different types of memories such as:
- Cognitive Memory: Store reflections and learned insights
- Episodic Memory: Record sequential experiences
- Semantic Memory: Store knowledge and facts
Naptha Nodes support the deployment of Memory modules. The state of these modules is stored in a local database (postgres) and file system on the Naptha Node.
📝 Memory Configurations
You can configure a memory module by specifying:
- An LLM Configuration - The language model that the memory uses to generate responses
The configuration of a memory module can be specified using the MemoryConfig
class:
#naptha_sdk/schemas.py
class MemoryConfig(BaseModel):
config_name: Optional[str] = None
llm_config: Optional[LLMConfig] = None
storage_config: Optional[StorageConfig] = None
info
More details on the StorageConfig
schema can be found in the Storage Provider section.