@arcanea/guardian-memory
v0.1.1
Published
Persistent semantic memory for the Ten Guardians — HNSW vector search with Guardian-namespaced vaults
Maintainers
Readme
@arcanea/guardian-memory
Persistent semantic memory for the Ten Guardians — HNSW vector search with Guardian-namespaced vaults.
Install
npm install @arcanea/guardian-memoryUsage
const { GuardianMemory } = require('@arcanea/guardian-memory');
const { HNSWIndex } = require('@arcanea/guardian-memory/hnsw');
const memory = new GuardianMemory({
guardian: 'oracle',
dimensions: 384
});
// Store a memory with its embedding vector
await memory.store({
key: 'insight-42',
content: 'Pattern detected in deployment logs',
vector: embeddingVector
});
// Semantic search using HNSW nearest-neighbor lookup
const results = await memory.search({
vector: queryVector,
topK: 5
});
console.log(results); // ranked by cosine similarityAPI
| Export | Description |
|---|---|
| GuardianMemory | Namespaced memory vault scoped to a single Guardian |
| MemoryVault | Low-level persistent storage backend |
| SemanticSearch | High-level search across Guardian memory spaces |
Subpath Exports
@arcanea/guardian-memory/hnsw—HNSWIndex,HNSWConfigfor direct vector index access
License
MIT
