Bring your own inference
You give it one generateText function. It builds the prompts, parses the JSON, and writes to
the database. It works with OpenAI, Gemini, Claude, or a local model.
Bring your own inference
You give it one generateText function. It builds the prompts, parses the JSON, and writes to
the database. It works with OpenAI, Gemini, Claude, or a local model.
Just SQLite
Facts, vectors, and graph edges all live in tables in your database, with a
llm_wiki_ prefix by default. You don’t run a vector database or Neo4j.
Offline first
Keyword search runs in-process. Semantic search turns on when you provide embed(), and
falls back to keyword search when the network is down.
GraphRAG built in
Optional ontologies make the model emit typed edges. traverseGraph() then walks them
with a single recursive SQL query.
npx expo install expo-sqlite expo-cryptonpm install @equationalapplications/expo-llm-wikiThe SQLite adapter, secure ID generation, and React hooks are already wired up. Expo quickstart →
npm install @equationalapplications/react-llm-wiki sql.jsRuns entirely in the browser on SQLite compiled to WebAssembly. React quickstart →
npm install @equationalapplications/core-llm-wiki better-sqlite3Use it on a backend or in a worker, with any SQLite driver. Node.js quickstart →
await wiki.write('user-123', { event_type: 'observation', summary: 'Loves hiking on weekends.' });const memory = await wiki.read('user-123', 'what should we do on Saturday?');const context = formatContext(memory); // → paste into your system prompt