@objectstack/knowledge-memory
v9.0.0
Published
In-memory knowledge adapter for ObjectStack (dev / test reference implementation).
Downloads
2,490
Maintainers
Readme
@objectstack/knowledge-memory
In-memory IKnowledgeAdapter for ObjectStack — chunks documents, embeds with a deterministic hash-based embedder, and answers search() via brute-force cosine similarity.
Purpose: dev environments, tests, and the reference implementation for the Knowledge Protocol. Not for production — there is no persistence, no real semantic understanding, and recall is bounded by simple token overlap.
import { ObjectKernel } from '@objectstack/core';
import { KnowledgeServicePlugin } from '@objectstack/service-knowledge';
import { KnowledgeMemoryPlugin } from '@objectstack/knowledge-memory';
const kernel = new ObjectKernel();
kernel.use(new KnowledgeServicePlugin({
sources: [{ id: 'task_notes', label: 'Notes', adapter: 'memory',
source: { kind: 'object', object: 'task', contentFields: ['notes'] }}],
}));
kernel.use(new KnowledgeMemoryPlugin());License
Apache-2.0. See LICENSING.md.
