Knolo Memory Overlay: Turn Local Notes into a Verifiable Pack
Use the Knolo memory overlay in @knolo/core to remember, recall and consolidate app notes, build a V4 pack, then check it with knolo verify.
Knolo is the open-source, local-first Knowledge Image runtime and format from Hive AI, published as Knolo's @knolo/core on npm under Apache-2.0. Most Knolo posts start from documents you already have. This one starts from notes an app collects as it runs, and shows how the Knolo memory overlay turns them into a pack you can verify.
What the Knolo memory overlay is
The memory overlay is a small local-first helper on the root @knolo/core export. Its API is four functions: createCortex, remember, recall and consolidateMemories. It keeps notes in memory, lets you search them, and then hands them to the normal pack builder.
One naming point matters. Despite the createCortex function name, the overlay is not Knolo Cortex. Reasoned evidence retrieval lives in createCortexSession from @knolo/core/cortex, and is covered in the Knolo Cortex docs. The overlay is the simpler tool: write notes, find notes, pack notes.
Knolo memory overlay in one example
This is the example from the Knolo memory overlay docs:
import {
buildPack,
consolidateMemories,
createCortex,
mountPack,
recall,
remember,
} from '@knolo/core';
const cortex = createCortex({ actor: 'notes-app' });
const { cortex: next } = remember(cortex, {
kind: 'note',
text: 'Project alpha uses a local-first memory overlay.',
labels: ['project.alpha'],
namespace: 'project.alpha',
});
const hits = recall(next, 'project alpha');
const docs = consolidateMemories(next, { namespacePrefix: 'memory' });
const bytes = await buildPack(docs);
const pack = await mountPack({ src: bytes });
Step by step:
createCortex({ actor })starts an empty overlay and records which app is writing.remember()returns a new overlay with the note added. It does not mutate the old one, so you can keep earlier states around.recall()searches the notes you have so far.consolidateMemories()turns the notes into pack documents, here under amemorynamespace prefix.buildPack()produces the bytes andmountPack()opens them for queries.
The same worked example ships in the Knolo GitHub repo as examples/memory-overlay.
Verify the Knolo pack, then query with receipts
The overlay serializes into V4 packs by default. Once you write the bytes to a file, check them with the Knolo CLI:
knolo verify knowledge.knolo
Verification confirms the bytes match what the pack declares. It does not prove a note is true; that is still your app's job. When you need evidence and replay metadata for an answer, query with queryWithReceipt() instead of a plain query. The Knolo verification docs and query receipts docs cover both.
In Node, load local files through @knolo/core/node, or read the bytes yourself and pass a Uint8Array into mountPack().
Where the Knolo memory overlay stops
- Composition does not change it. The overlay is an application path, not a composed image.
- V5 is a separate step. V5 migration and the read-only Studio snapshot work on Knowledge Images, not on the in-memory overlay object. See the Knolo migration docs.
- It is not a hosted service. Everything here runs in your process, on your machine.
Try Knolo
Install with npm install @knolo/core (the Knolo installation guide lists the current versions), read the Knolo developer docs on knolo.dev, and see the open specifications on Knolo open technology at knolo.org. Source, issues and examples are in the Knolo core repository on GitHub.
knolo · memory-overlay · how-to · knowledge-image · core