Local-first AI
On-device inference and vector search behind a privacy gate that keeps data on the machine. Own the source.
@caisson/local-ai is the Local-first AI edition: a compute seam, a privacy gate, on-device
vector search, an offline license check, and a local store. Inference and retrieval run on the
machine that holds the data. Your data never leaves the device.
What it does
- Compute seam — one swappable point that decides where a model runs. The default target is the local device; a remote target is an explicit opt-in, never the fallback.
- Privacy gate — the egress boundary. A call that would cross the network is denied unless the policy allows it, so "on-device" is enforced in code, not promised in a README.
- On-device vector search — approximate nearest-neighbor over a local index using
sqlite-vec. Embeddings and queries stay in the local store. - Offline license — license verification that does not call home, so the edition keeps working on an air-gapped machine.
- Local store — the SQLite-backed home for vectors, documents, and the license record.
The guarantee
The privacy gate is the contract: data crosses the network boundary only on an explicit allow. The gate fails closed — with no allow rule, a remote call is denied, not silently downgraded.
import { createLocalAI } from "@caisson/local-ai";
import type { LocalAIConfig } from "@caisson/local-ai";
const config: LocalAIConfig = {
// The gate fails closed: no network egress without an explicit allow rule.
privacy: "device-only",
vector: { backend: "sqlite-vec" },
};
const ai = createLocalAI(config);
// Embeddings and ANN search run on-device against the local store.
const hits = await ai.search("quarterly variance", { topK: 5 });License
@caisson/local-ai ships under the Caisson Commercial License
(LicenseRef-Caisson-Commercial) — own the source, build unlimited products, no redistribution of
the kit. The same one-time perpetual model as every other edition; your data never leaves the device.
Local-first AI is from $499, one-time. See pricing for the editions, the everything bundle, and per-module options.
This page previews the @caisson/local-ai surface. The full API reference —
compute-seam adapters, the privacy-gate policy schema, the sqlite-vec index
format, and the offline-license record — is still expanding.
Next steps
AI Production Kit
Token metering, spend caps, a circuit breaker, an eval gate in CI, and a versioned prompt registry — the production-rigor layer cheap AI boilerplate skips.
Agentic-Dev
@caisson/agent-dev — the governed-agent kernel: a typed agent/skill/rule schema, a lifecycle state machine, local hybrid memory, and a hooks dispatcher.