Skip to main content
The MemMachine TypeScript SDK is built for modern AI workflows, providing a type-safe, metadata-driven interface to the MemMachine memory engine.

Active Entry Point

The latest version of the SDK leverages a unified client structure. Instead of managing multiple class instances, you perform all memory operations through the MemMachineClient using Metadata Scoping.

MemMachineClient (Primary)

The active class for all Episodic and Profile memory operations. Recommended for 100% of new integrations.

Quick Start

1

Install

npm install @memmachine/sdk
2

Initialize & Use

Supply your org_id and project_id within the metadata context of your calls to maintain isolation.
import { MemMachineClient } from '@memmachine/client';

const client = new MemMachineClient({ api_key: 'your_api_key' });

// Scoped operation using Context
await client.addEpisodicMemory({
  content: "User likes high-contrast UI.",
  metadata: { org_id: "org_1", project_id: "proj_A", user_id: "user_1" }
});

API Reference

Explore the detailed specifications for the SDK’s classes and data models.

Interfaces & Types

These define the shape of your interactions and the data returned by the SDK. They are organized by the lifecycle of a typical implementation.
The essential building blocks for connecting and scoping your requests.
Interfaces used to define the “How” of your SDK method calls.
The structure of the data you receive back from the server.
Enums and union types used across the SDK.

Contributing & Development

  1. Install Dependencies: npm install
  2. Build the Package: npm run build
  3. Run Unit Tests: npm run test

License

MemMachine Typescript SDK is open-source software licensed under the Apache-2.0 License.