@alsania-io/eme
v1.0.2
Published
Echo Memory Engine - Alsania's sovereign memory system
Readme
@alsania-io/eme - Echo Memory Engine
Sovereign Memory System for AI Agents - Local, Encrypted, Multi-Agent Memory with MCP Protocol Support
🎯 What is EME?
Echo Memory Engine (EME) is a sovereign memory system for AI agents that provides:
- Local & Encrypted: Your memory stays on your machine, encrypted at rest
- MCP Protocol Native: Fully compatible with Model Context Protocol
- Multi-Agent Support: Isolated namespaces for different agents
- Semantic Search: Vector-based memory retrieval with SQLite backend
- Knowledge Graph: Relationship tracking between memories
- Memory Gate: Noise filtering to prevent memory bloat
🚀 Quick Start
Installation
npm install @alsania-io/eme
# or
yarn add @alsania-io/eme
# or
pnpm add @alsania-io/emeStart the MCP Server
# Start EME as an MCP server
npx eme start
# Or with specific configuration
npx eme start --port 3636 --maxMemoryEntries 10000Use in Your Code
import { MemoryEngine } from '@alsania-io/eme';
// Initialize the memory engine
const memory = new MemoryEngine({
vectorStorePath: './storage/vectors.db',
graphStorePath: './storage/graph.jsonl',
snapshotPath: './storage/snapshots'
});
await memory.initialize();
// Add a memory
const result = await memory.addMemory(
'User prefers dark mode and uses a mechanical keyboard',
'assistant-1',
'user-preferences'
);
// Search memories
const memories = await memory.search(
'What keyboard does the user have?',
5, // limit
'user-preferences' // namespace (optional)
);📖 Documentation
MCP Tools
EME provides the following MCP tools:
add_memory- Add a new memory entrysearch_memory- Search memories using semantic and graph searchupdate_memory- Update an existing memory entrydelete_memory- Delete a memory entry (soft delete)list_memories- List memories with optional filteringgraph_add_node- Add a node to the knowledge graphgraph_add_edge- Add an edge between graph nodessnapshot_save- Create a memory snapshotsnapshot_load- Load a memory snapshotgraph_read- Read entire graph structure with nodes and edgesbatch_add_memories- Add multiple memories at onceclear_namespace- Clear all nodes and edges in a namespace
Configuration
EME can be configured via constructor options or environment variables:
const config = {
// Embedding configuration
embeddingModel: 'local', // or 'openai', 'cohere', etc.
embeddingDimension: 384, // BGE-small dimension
// Storage configuration
vectorStore: 'sqlite', // or 'postgres', 'memory'
vectorStorePath: './storage/vectors.db',
graphStore: 'jsonl', // or 'neo4j', 'memory'
graphStorePath: './storage/graph.jsonl',
snapshotStore: 'filesystem', // or 's3', 'ipfs'
snapshotPath: './storage/snapshots',
// Memory gate configuration
memoryGateEnabled: true,
memoryGateThreshold: 0.3,
// General configuration
maxMemoryEntries: 10000,
similarityThreshold: 0.3,
logLevel: 'info' // 'debug', 'info', 'warn', 'error'
};CLI Usage
# Start MCP server
npx eme start
# Start with specific port
npx eme start --port 3636
# Show configuration
npx eme config
# Show version
npx eme version
# Run tests
npx eme test
# Get help
npx eme help🔧 Architecture
EME is built with a modular architecture:
┌─────────────────────────────────────────────┐
│ MCP Interface │
├─────────────────────────────────────────────┤
│ Memory Manager │
├─────────────┬──────────────┬───────────────┤
│ Vector Store│ Graph Store │ Snapshot Store│
│ (SQLite) │ (JSONL) │ (Filesystem) │
└─────────────┴──────────────┴───────────────┘
│ Memory Gate │
│ (Noise Filtering) │
└─────────────────────────────────────────────┘Key Features
- Vector Memory Store: SQLite-based vector storage for semantic search
- Knowledge Graph: Track relationships between memories
- Memory Gate: Prevent memory bloat with relevance filtering
- Snapshot System: Version and export/import memory states
- Multi-Namespace: Isolate memories by agent or context
- Encryption: All data encrypted at rest with local keys
🔐 Security & Privacy
- Local First: All data stays on your machine
- Encryption: Memories encrypted with AES-256
- No Telemetry: No data leaves your system
- Open Source: MIT licensed, fully auditable
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
npm test - Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
- Built for the Model Context Protocol ecosystem
- Inspired by the need for sovereign AI memory systems
- Thanks to all contributors and the open source community
📞 Support
- GitHub Issues for bug reports and feature requests
- Documentation for usage guides
- Discussions for questions and community support
Made with ❤️ by Alsania I/O - Building sovereign AI infrastructure.
