What is Memory Bank?
A memory bank is a storage system designed to organize and manage collections of memories in AI agent architectures. It serves as a centralized repository where different types of memories (observations, experiences, facts, reflections) can be stored, indexed, and retrieved based on various criteria like recency, importance, or relevance. Memory banks provide the infrastructure for agents to maintain extensive long-term memory beyond what fits in the model's context window.
The architecture typically includes mechanisms for adding new memories, retrieving relevant memories based on queries or current context, and potentially managing memory lifecycles through processes like importance scoring, decay, or consolidation. Memory banks may organize memories chronologically (as in memory streams), by importance or salience, by semantic similarity through embeddings, or using hybrid approaches that combine multiple organization schemes.
Memory banks are particularly important for agents that need to operate over extended periods or handle large amounts of accumulated knowledge. They enable agents to build up experience over time, recall relevant past interactions or observations when needed, and maintain consistent behavior based on historical context. Systems like Generative Agents and other long-term memory architectures rely on memory bank implementations to support sophisticated memory management capabilities.