@wrkrdev/memory
v0.2.0
Published
Standalone agent-memory store with in-memory and SQLite backends plus full-text search.
Downloads
60
Maintainers
Readme
@wrkrdev/memory
Standalone agent-memory store with a runtime-neutral in-memory backend plus an opt-in Bun SQLite/FTS5 adapter.
Install
bun add @wrkrdev/memoryThe root @wrkrdev/memory entrypoint stays standard ESM-compatible. The SQLite adapter and CLI use Bun's built-in bun:sqlite runtime.
Quick start
import { InMemoryMemoryStore } from '@wrkrdev/memory';
const store = new InMemoryMemoryStore();
await store.save({
key: 'client-tone',
content: 'Prefer concise, direct language.',
tags: ['client', 'style'],
});
const result = await store.search({ tags: ['client'] });
console.log(result.entries.length);SQLite adapter
import { SqliteMemoryStore } from '@wrkrdev/memory/sqlite';
const store = new SqliteMemoryStore({ dbPath: ':memory:' });Public surface
- Library root: memory types/interfaces, in-memory adapter, and migration helpers.
- Bun-only subpath:
@wrkrdev/memory/sqlitefor the SQLite + FTS5 adapter. - Bun CLI (
wrkr-memory):save,get,search,list,delete.
License
Apache-2.0.
