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 memphoraQuick 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');