
MemoWeft is a library you import into an AI app. It keeps portable, traceable long-term memory about a user — separating facts from guesses, exposing conflicts instead of silently overwriting them, and letting different hosts reuse the same memory.
Why not just another memory library?
- Facts and guesses stay apart. Model inferences begin as low-confidence hypotheses, never facts — what the user actually said and what a model guessed are different kinds of record.
- Conflicts are surfaced, not overwritten. Contradictory information is exposed and kept side by side; MemoWeft never silently picks a winner.
- Confidence is computed by rule, not self-reported. Each cognition is scored from evidence strength and corroboration — a model never sets its own credibility.
These three, plus typed decay, traceability, and no self-corroboration, make six cognitive disciplines — all backed by numbered eval cases in tests/eval/ (npm test).
60-second install and first call
npm install memoweft
import { createMemoWeftCore } from 'memoweft';
const core = createMemoWeftCore({ dbPath: ':memory:' });
await core.ingestUserMessage({ subjectId: 'user-42', content: 'I only drink decaf after 3pm — caffeine wrecks my sleep.' });
for (const e of core.memory.listEvidence({ subjectId: 'user-42' }))
console.log(e.sourceKind, '·', e.rawContent);
core.close();
That stored one piece of evidence — no key needed. Turning evidence into a recalled profile (distilling facts, exposing conflicts) needs a chat model: see Getting started. No key handy? examples/no-key-demo.ts shows a conflict exposed against an offline stub in ~30 seconds.
Try the reference host
The bundled reference host is a demo, not the product. It shows how an app uses Core — chat with recall, watch memory form, and inspect the evidence → event → cognition graph. Needs Node 24+.
git clone https://github.com/memoweft/memoweft.git
cd memoweft && npm install && npm run build
npm start -w @memoweft/host
More: what the reference host is and is not.
Where to go next
Full documentation index: docs/README.md.
Project status
Pre-1.0 and library-first. Core is implemented and tested, but interfaces may still change between minor releases — stable, experimental, and internal surfaces are documented in the Memory Surface Contract. Zero runtime dependencies.
See the roadmap, contribution guide, and changelog.
License
MIT © 2026 MemoWeft contributors.