@the-brain/adapter-sqlite
v0.2.4
Published
SQLite storage adapter for @the-brain/core — zero-config, single-file database
Readme
@the-brain/adapter-sqlite
SQLite storage adapter for @the-brain/core.
Zero-config, single-file database. No server required. Good for local tools, CLI apps, and desktop agents.
Requirements
Node.js >= 22.5.0 (uses built-in node:sqlite)
Install
npm install @the-brain/adapter-sqliteUsage
import { Brain, OpenAICompatibleAdapter } from "@the-brain/core";
import { SQLiteStorageAdapter } from "@the-brain/adapter-sqlite";
const brain = new Brain(
new OpenAICompatibleAdapter(
"http://localhost:11434/v1/chat/completions",
"llama3.2"
),
new SQLiteStorageAdapter("./.brain") // path to storage directory
);
await brain.loadActions();Database is stored at ./.brain/brain.db. Schema is created automatically on first run.
License
AGPL-3.0 — github.com/greg00ry/the-brain
