@eidentic/memory
v0.1.4
Published
Self-improving memory engine for Eidentic — four-tier recall (lexical + semantic RRF), self-editing blocks, temporal graph, and sleep-time consolidation.
Maintainers
Readme
@eidentic/memory
Self-improving memory engine for Eidentic — four-tier recall with lexical + semantic RRF
fusion, self-editing memory blocks, a temporal knowledge graph, passive fact extraction,
and sleep-time consolidation. This package provides the Memory class that wires a
StorePort and VectorPort together into Eidentic's full memory stack.
Install
pnpm add @eidentic/memoryUsage
import { Memory } from "@eidentic/memory";
import { SqliteStore } from "@eidentic/sqlite";
import { LanceDBVectorStore } from "@eidentic/lancedb";
import { AIEmbedder } from "@eidentic/model";
import { openai } from "@ai-sdk/openai";
const store = new SqliteStore("./eidentic.sqlite");
const embedder = await AIEmbedder.create(openai.embedding("text-embedding-3-small"));
const vector = await LanceDBVectorStore.open("./lancedb", "memory_vectors", 1536);
const memory = new Memory({ store, vector, embedder });
// Retrieve relevant snippets for a session
const scope = { kind: "user" as const, agentId: "my-agent", userId: "u-1" };
const result = await memory.retrieve({ text: "budget decisions", scope, topK: 5 });
console.log(result.snippets);Links
Apache-2.0
