Skip to content

Nested Memories System

The nested memories system allows you to create relationships between memories, building a knowledge network that provides complete context when retrieving information. When you retrieve a memory, all related memories are automatically loaded, giving you a comprehensive view of connected information.

Table of Contents


Quick Overview

Nested memories (also called related memories) are memories that are linked together through the related_memory_ids field. When you retrieve a memory, the system automatically loads all related memories recursively, up to 3 levels deep, providing complete context.

Key Concepts

  • Related Memory IDs: Each memory can have an array of related memory IDs
  • Automatic Loading: Related memories are automatically loaded when using retrieve_memory, search_memory, or get_project_main_memory
  • Recursive Depth: The system loads related memories up to 3 levels deep
  • Cross-Collection: Related memories can be in different collections
  • Bidirectional Links: The system automatically maintains bidirectional relationships