@loomic/memory-sqlite
v0.1.5
Published
Local-first SQLite + vector memory store for the Loomic agentic app runtime
Readme
@loomic/memory-sqlite
Local-first memory store for the Loomic agentic runtime, backed by a native SQLite TurboModule. Implements the propose/commit memory pattern — the agent proposes memory candidates; the governor approves and commits them.
What it does
createSQLiteMemoryStore(adapter)— production store backed by native SQLite via React Native New Architecture TurboModulescreateInMemoryStore()— in-process store for testing and simulators without native modulesMemoryService— handles search, retrieval, and the propose/commit lifecycle- Supports semantic similarity via pluggable embedding and reranker providers
Note: This package requires React Native ≥ 0.76 and the New Architecture enabled. It ships source + native code (no build step — consumed by Metro and CocoaPods/Gradle directly).
Install
npm install @loomic/memory-sqlite @loomic/typesThen link the native module (auto-linked via React Native's standard linking):
cd ios && pod installUsage
import { createSQLiteMemoryStore } from '@loomic/memory-sqlite';
import { createAgenticRuntime } from '@loomic/runtime';
const runtime = createAgenticRuntime({
provider: myProvider,
memory: createSQLiteMemoryStore(),
});For tests or environments without native modules, use the in-memory adapter:
import { createInMemoryStore } from '@loomic/memory-sqlite';
const runtime = createAgenticRuntime({
provider: myProvider,
memory: createInMemoryStore(),
});