MotteMB provides sophisticated memory management using vector embeddings for context-aware agent memory and semantic retrieval with OpenAI's text-embedding-3-large model.
1536-dimensional vectors using OpenAI's text-embedding-3-large model for semantic understanding.
Find relevant memories using natural language queries with cosine similarity matching.
PostgreSQL with pgvector extension for efficient vector storage and indexing with HNSW algorithms.
Import/export memories in JSON, CSV, TXT, and JSONL formats with batch processing capabilities.
{ "id": "mem_abc123", "content": "Customer refund policy allows returns within 30 days...", "embedding": [0.123, -0.456, 0.789, ...], // 1536 dimensions "metadata": { "category": "policy", "source": "handbook", "priority": "high", "tags": ["refund", "policy", "customer-service"], "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z" }, "similarity_score": 0.87 // Only present in search results }
Algorithm | Use Case | Performance | Accuracy |
---|---|---|---|
Cosine Similarity | General semantic search | Fast | High |
HNSW Index | Large-scale retrieval | Very Fast | High |
Exact Search | Small datasets | Slow | Perfect |
Automatically identify and remove duplicate or near-duplicate memories using similarity thresholds >0.95.
Rebuild HNSW indexes for optimal query performance with configurable ef_construction and M parameters.
Compress vector storage using quantization techniques to reduce memory usage by up to 75%.
Process large datasets efficiently with chunked embedding generation and parallel database operations.
POST /api/memory/store Content-Type: application/json { "content": "Customer refund policy allows returns within 30 days for digital products and 60 days for physical products.", "metadata": { "category": "policy", "source": "handbook", "priority": "high", "tags": ["refund", "policy", "customer-service"] } }
Stores a new memory with automatic embedding generation and metadata indexing.
POST /api/memory/search Content-Type: application/json { "query": "What is our refund policy for digital products?", "limit": 5, "threshold": 0.7, "filters": { "category": "policy", "priority": ["high", "medium"] } }
Searches for relevant memories using semantic similarity with optional metadata filters.
POST /api/memory/import Content-Type: multipart/form-data file: [uploaded file] format: "json" | "csv" | "txt" | "jsonl" batch_size: 100 (optional) auto_categorize: true (optional)
Bulk import memories from various file formats with automatic processing and categorization.
GET /api/memory/stats Response: { "total_memories": 1250, "categories": { "policy": 45, "faq": 120, "procedures": 85 }, "storage_size": "2.3 MB", "index_size": "1.1 MB", "last_optimization": "2024-01-15T10:30:00Z" }
Get comprehensive statistics about your memory bank including storage usage and categorization.