@loreai/core
v0.33.0
Published
Shared memory engine for Lore — three-tier storage, distillation, gradient context management
Maintainers
Readme
@loreai/core
Experimental — Under active development. APIs, storage format, and behavior may change.
Shared memory engine for Lore — three-tier storage, distillation, curation, gradient context management, and FTS5-backed recall.
This package is host-agnostic. It doesn't ship a user-facing extension on its own; it's consumed by adapter packages that wire it into a specific coding agent:
@loreai/opencode— OpenCode plugin (also published asopencode-lorelegacy alias)@loreai/pi— Pi coding-agent extension
Install
npm install @loreai/core
# or
pnpm add @loreai/coreYou only need to install this directly if you're building a new adapter. End users install one of the host packages above.
Vector embeddings
Recall uses @huggingface/transformers with nomic-embed-text-v1.5 (768-dim INT8 quantized, ~137 MB) for on-device vector search — no API key required.
- Binary mode (standalone
lorebinary): Uses WASM backend (onnxruntime-web). Works on all platforms without native dependencies. - npm mode (
npm install @loreai/gateway): Uses native backend (onnxruntime-node). May fail on some configurations (e.g. CUDA 13 on Linux/x64 — microsoft/onnxruntime#26586).
When local embeddings aren't available, recall has graceful fallbacks:
- Remote auto-fallback — set
VOYAGE_API_KEYorOPENAI_API_KEYin your env. The firstembed()call detects the missing local provider and swaps over for the rest of the process. Voyage wins ties. - FTS-only — if no remote keys are set and local embeddings fail, recall uses SQLite FTS5 full-text search. Still functional, just without vector similarity ranking.
To pin a specific provider, set search.embeddings.provider in .lore.json:
{ "search": { "embeddings": { "provider": "voyage" } } }(also supports "openai"; reads VOYAGE_API_KEY / OPENAI_API_KEY from env).
Documentation
Full architecture, benchmarks, and rationale: github.com/BYK/loreai
License
FSL-1.1-Apache-2.0 — see LICENSE.
