@rdk-moss/memory
v0.3.35
Published
D-Moss Memory: context-aware memory selection and self-learning memory draft generation for agent runtime.
Downloads
129
Maintainers
Readme
@rdk-moss/memory
Context-aware memory management for the Moss agent runtime.
Features
- BM25 + Embedding Hybrid Search: Combines keyword-based BM25 scoring with semantic embedding similarity for robust memory retrieval
- Scope-based Organization: Memories organized by workspace, user, device, and learning scopes
- Self-learning Memory: Automatic extraction and storage of user preferences and corrections
- Cross-language Recall: Query in one language, retrieve memories stored in another
- Staleness Management: Automatic detection and decay of stale memories
Installation
npm install @rdk-moss/memoryUsage
import { MemoryManager } from '@rdk-moss/memory';
const memory = new MemoryManager('./.dmoss/memory', optionalEmbeddingProvider);
// Store a memory
await memory.add('User prefers TypeScript over JavaScript', {
scope: 'user',
pinned: true,
});
// Search memories
const results = await memory.search('programming language preference', {
scope: 'user',
limit: 5,
});
// Load context for agent
await memory.loadContext();API
MemoryManager: Main memory storage and retrievalMemoryContextSelector: Context-aware memory selection for agent turnsSelfLearningMemory: Automatic preference and correction extractionWorkspaceMemory: Workspace-level memory management
License
MIT
