Class MemMachineProject
The MemMachineProject class provides methods to manage and interact with specific projects in MemMachine. It acts as the bridge between your high-level client and the specific memory engine for a project.
While you can instantiate this class directly, the recommended way is to use the client.project() method.
| Name | Type | Description |
|---|---|---|
projectContext | ProjectContext | The organization and project identifiers. |
Methods
create()
Creates a new project on the MemMachine server if it does not already exist.
| Name | Type | Description |
|---|---|---|
options | CreateProjectOptions | Optional settings such as a project description. |
Promise<Project>— The newly created Project entity.
memory()
Creates a MemMachineMemory instance for managing and searching memories within this specific project.
| Name | Type | Description |
|---|---|---|
memoryContext | MemoryContext | Optional context to narrow the memory scope. |
get()
Fetches the current project details from the MemMachine server.
Promise<Project>— The Project entity containing metadata and configuration.
getEpisodicCount()
Retrieves the total count of episodic memories currently stored within this project.
Promise<number>— The total count of memories.
delete()
Permanently removes the project and all of its associated episodic and semantic memories from the server.
MemMachineAPIErrorif the project cannot be deleted.

