Skip to main content

Overview

The MemMachineMemory class provides the primary interface for interacting with the memory engine. It allows for high-granularity control over adding, searching, listing, and deleting memories.

Key Capabilities

  • Flexible Ingestion: Add raw text as memories with specific episode types.
  • Semantic Retrieval: Search memories using natural language queries.
  • Context Awareness: Retrieve combined project and memory metadata.

Constructor

new MemMachineMemory()

Initializes a new memory management instance. This is typically handled internally by the MemMachineProject.memory() factory method.

Properties


Methods

add()

Adds a new memory to the system within the current project scope.
Performs a semantic and or episodic search against the stored memories.

list()

Retrieves a paginated list of memories.

delete()

Permanently removes a memory from the system.

getContext()

Retrieves the active project and memory context used by this instance.
  • Returns: ProjectContext & MemoryContext

Usage Example

All methods in this class throw a MemMachineAPIError if the server returns a non-200 status code.