Skip to main content

Overview

The MemMachineProject class provides methods to manage and interact with projects within the MemMachine ecosystem[cite: 1]. It serves as a middle-tier controller, allowing you to create projects, check memory usage, and spawn dedicated memory management instances.

Key Features

  • Project Lifecycle: Create, retrieve, and delete project entities on the server.
  • Memory Factory: Initialize MemMachineMemory instances scoped to this project.
  • Usage Metrics: Retrieve the total count of episodic memories stored within the project.

Constructor

new MemMachineProject()

Initializes a project instance. This is typically accessed via client.project().

Properties


Methods

create()

Initializes the project on the MemMachine server.

get()

Retrieves the current metadata and state of the project from the server.
  • Returns: Promise<Project> — The current project data model.

getEpisodicCount()

Retrieves the total number of episodic memories associated with this project.

memory()

Creates a MemMachineMemory instance scoped to this project.

delete()

Permanently removes the project and all associated memories from the server.

Usage Example

This class is the recommended gateway for memory management. Always use project.memory() to ensure your operations are correctly scoped to your organization and project ID.