@obversa/memory-simple
v0.1.2
Published
In-process memory for tests and short runs.
Maintainers
Readme
@obversa/memory-simple
@obversa/memory-simple stores memory in one process. Use it for tests, short
runs, and examples without durable storage.
Install
pnpm add @obversa/memory-simpleRequirements
- Node.js 22.12 or later
Build from the workspace
From the workspace root, run:
corepack enable
pnpm install --frozen-lockfile
pnpm --filter @obversa/memory-simple buildUsage
import { createSimpleMemory } from '@obversa/memory-simple';
const memory = createSimpleMemory({ scope: 'example-run' });
await memory.execute({
command: 'create',
path: '/memories/notes.md',
text: 'Keep the result small.\n',
});
const result = await memory.execute({
command: 'view',
path: '/memories/notes.md',
});The default storage limit is 1,048,576 bytes per scope and 256 files. The adapter discards its data when its process exits.
Runnable example
From the workspace root, run:
pnpm --filter @obversa/memory-simple exec tsx ../../examples/memory-simple.ts