Back to Documentation
TypeScript SDK Reference
Complete guide to using the Memphora TypeScript SDK with all features and examples.
Installation
npm install memphoraQuick Start
💡 Important: You need your API key from your dashboard. It's available on the API Key Management page.
import { Memphora } from 'memphora';
// Initialize SDK
const memory = new Memphora({
userId: 'user_123',
apiKey: 'your-memphora-api-key-here'
});
// 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
const context = await memory.getContext('user preferences');Core Memory Operations
Advanced Search
Advanced Memory Operations
Memory Versioning
Export & Import
Statistics & Analytics
Conversation Features
Multi-Agent Support
Group/Collaborative Features
Multimodal Features
📷 Image Limits: Maximum image size via URL is 20MB. Maximum image size via base64 is 4MB. Maximum resolution is 33 megapixels per image.
Security & Compliance
Webhooks
Observability & Monitoring
Text Processing
Health Check
TypeScript Support
The SDK is written in TypeScript and includes full type definitions for all methods and return types.
import { Memphora, Memory } from 'memphora';
const memory: Memphora = new Memphora({
userId: 'user123',
apiKey: process.env.MEMPHORA_API_KEY
});
const results: Memory[] = await memory.search('query');