@pilotoo/memory-core
Introduction
Section titled “Introduction”@pilotoo/memory-core is the domain of Brain: memories, access by membership and labels, sources, pages and facts, review, curation, health, audit and agent access, as services over ports. It has no Nest, no pg and no model SDK, so you can run it over any store. @pilotoo/memory-server supplies the PostgreSQL stores and the Nest controllers.
Installation
Section titled “Installation”@pilotoo/memory-core is at version 0.1.0, is marked private and is not published to a registry. It is also not part of the tarballs that pnpm release:check packs, so today it is used from the kit workspace:
pnpm installpnpm --filter @pilotoo/memory-core buildInside the workspace, depend on it with "@pilotoo/memory-core": "workspace:^". Its build first builds the kit packages it depends on.
Basic usage
Section titled “Basic usage”createBrain builds the services from the stores and the ports:
import { createBrain } from '@pilotoo/memory-core';
const brain = createBrain({ stores, clock, ids, directory, tokenSecrets, embedder, // optional pageCompiler, // optional answerer, // optional});| Port | Required | What it does |
|---|---|---|
directory |
Yes | Name, email and picture of the people Brain shows. |
clock, ids, tokenSecrets |
Yes | Time, id generation and token hashing. @pilotoo/memory-server provides systemClock, randomIds and sha256TokenSecrets. |
embedder |
No | Semantic search. |
extractor |
No | Text from uploaded files. |
labelSuggester |
No | Label suggestions for a new source. |
pageCompiler |
No | Compiling sources into pages. |
answerer |
No | Answers with citations. Without one ask replies with modelOff: true. |
factReconciler |
No | Reconciling a new fact of a personal memory with the old ones. |
brain.capabilities reports which of these are present. See What runs without a model.
Entry points
Section titled “Entry points”| Import | Provides |
|---|---|
@pilotoo/memory-core |
The only entry point: createBrain, the store and model ports, the compile worker, connector and curation services, visibility, validation and the errors. |
Dependencies
Section titled “Dependencies”@pilotoo/memory-protocol and zod. It has no peer dependencies.