Skip to main content

Interface ProjectContext

The ProjectContext is used to target a specific workspace within MemMachine. It is required when initializing a project via the client.
PropertyTypeDescription
org_idstringRequired. The unique identifier for your organization.
project_idstringRequired. The unique identifier for the specific project.

Interface CreateProjectOptions

These options are used when calling project.create() to initialize a new project on the server.
PropertyTypeDescription
descriptionstringOptional. A brief summary or name for the project.
embedderstringOptional. Specify the embedding model for semantic vectorization.
rerankerstringOptional. Specify the reranker model for optimizing search results.

Usage Example

import { MemMachineClient } from '@memmachine/client';

const client = new MemMachineClient({ base_url: 'your-base-url' });

// 1. Define the Context
const context = {
  org_id: 'acme_corp',
  project_id: 'customer_support_bot'
};

const project = client.project(context);

// 2. Create the project with specific AI models
await project.create({
  description: 'Main support bot memory',
  embedder: 'openai:text-embedding-3-small',
  reranker: 'cohere:rerank-english-v3.0'
});