@memofs/core
MemoFS core memory runtime and provider-neutral contracts for AI apps and agents.
What is this?
Unified core memory runtime. Core memory contracts, records, chunks, source references, manifest validation, local protocol helpers, and provider-neutral runtime primitives — the MemoFS client, hybrid recall (BM25 + fuzzy + vector channel via file-based and in-memory stores), graph, snapshots, sync, and the provider-neutral MemoryEmbedder / Reranker / RecallStore contracts that adapters (OpenAI, Voyage, Transformers) implement.
Installation
npm install @memofs/core
Requires Node.js >= 22.
Quick Start
Create a MemoFS client with a filesystem store and read core memory:
import { MemoFS } from "@memofs/core";
import { createNodeFsMemoryStore } from "@memofs/core/node-fs";
const memo = new MemoFS({
store: createNodeFsMemoryStore({ rootDir: "./.memofs" }),
projectId: "my-project",
mode: "local",
});
await memo.bootstrap();
const core = await memo.core.read();
console.log(core);
Subpath Exports
The @memofs/core package is designed to be environment-agnostic. The root barrel is Worker-safe (no node:fs); Node-only utilities live behind a subpath.
- Root barrel:
import { MemoFS, createInMemoryGraphStore, createFsRecallStore } from "@memofs/core"
- Node filesystem store:
import { createNodeFsMemoryStore, createNodeMemoFs } from "@memofs/core/node-fs"
- Cloud client contracts:
import { createMemoFsCloudClient } from "@memofs/core/cloud-client"
Provider-specific adapters (OpenAI, Voyage, Transformers) live in separate @memofs/adapter-* packages — core defines the contracts, adapters implement them.
For a complete breakdown of configuration options, interfaces, and architecture, see our Full Documentation.
Boundary
This package owns the MemoFS core contracts, memory store adapters, and runtime primitives. It does not own private SaaS concerns such as billing, tenancy, hosted dashboards, encrypted BYOK storage, or internal admin tooling. All public API capabilities are consolidated and exported directly from the root namespace of @memofs/core.
Contributing
See our central Contributing Guide and development scripts for details on formatting, linting, and testing within the monorepo.
License
MIT