Back to Documentation

TypeScript/JavaScript SDK Reference

Complete guide to using the Memphora TypeScript SDK with all features and examples. For Python, see the Python SDK.

Installation

npm install memphora

Quick Start

💡 Important: Get your API key from the API Key Management page.

import { Memphora } from 'memphora';

// Initialize SDK
const memory = new Memphora({
  userId: 'user_123',
  apiKey: 'your-api-key'
});

// Store memories
await memory.store('User loves TypeScript programming');
await memory.store('User works at Google', { type: 'fact' });

// Search memories
const results = await memory.search('What does the user love?');

// Get formatted context for LLM
const context = await memory.getContext('user preferences');

Core Memory Operations(7)

Search & Context(2)

Conversations(4)

Agent Memory(3)

Group Memory(3)

Multimodal(4)

Documents(2)

Export & Utility(2)