@memnest/core
v0.2.0
Published
Memnest context memory engine: types, ports and the engine. Zero I/O dependencies.
Downloads
778
Maintainers
Readme
@memnest/core
The Memnest engine: types, ports and createMemnest(). Zero runtime dependencies and no I/O. Storage, models and queues are ports you pass in.
npm install @memnest/core @memnest/store-sqlite # or @memnest/store-postgresimport { createMemnest, scopeOf } from '@memnest/core';
import { createSqliteStore } from '@memnest/store-sqlite';
const store = createSqliteStore({ filename: 'memnest.db', autoMigrate: true });
const memnest = createMemnest({ store, queue: store.jobQueue() });
await memnest.addMemories({ containerTag: 'user:123', memories: [{ content: 'The user prefers dark mode.', kind: 'preference' }] });
const { memories, trace } = await memnest.search('editor theme', scopeOf('user:123'), { tokenBudget: 200 });
const profile = await memnest.profile(scopeOf('user:123'));@memnest/core/testing provides an in-memory store (optionally with vector search), a fixed clock, a scripted model and a deterministic embedder for tests.
See the Memnest README for the full guide.
