Skip to content

Quickstart

This walks the core pipeline against the hosted data plane: write facts → build indexes → search. You’ll do it with the TypeScript or Python SDK, or a plain curl.

You need a stack and a stack API key. Create a stack in the console and copy its key — it looks like lbb_sk_live_… or lbb_sk_test_…. See Authentication & endpoints for the details.

Terminal window
npm install @lbb/client
import { LbbClient } from "@lbb/client";
const lbb = new LbbClient({
baseUrl: "https://db.eu.littlebigbrain.com",
apiKey: process.env.LBB_API_KEY, // lbb_sk_live_… / lbb_sk_test_…
});
// 1. Write facts (triplets) into the default graph.
await lbb.graph("main").facts.create(
{
triplets: [
{
source: { type: "SERVICE", name: "auth-service" },
relation: "WRITES_TO",
target: { type: "DATABASE", name: "user-db" },
confidence: 0.93,
evidence: "auth-service writes identity records to user-db",
},
],
},
{ idempotencyKey: "quickstart-1" },
);
// 2. Build persisted BM25 + vector + adjacency indexes and wait for them.
await lbb.indexes.run({ wait: true });
// 3. Run hybrid search over the snapshot.
const results = await lbb.search.hybrid(
"which systems store customer identity data",
{ topK: 5, source: "persisted", consistency: "strong", targets: ["entities", "assertions"] },
);
for (const a of results.assertions ?? []) {
console.log(a.relation?.name, a.score);
}

Prefer not to write code first? Do the same three steps visually in the console — load data, build indexes in Retrieval → Indexes, and run a search in Search & eval.

  • Write appended immutable graph events (entities, a relation event, and the evidence that supports it) to the write-ahead log.
  • Index built persisted BM25, vector/ANN, and adjacency runs — disposable accelerators derived from the graph snapshot.
  • Search fused lexical + BM25 + vector + ontology + graph-neighborhood signals over one snapshot, with strong consistency overlaying any facts committed after the index run.

Read Core concepts to understand snapshots, consistency, and the append-only model, then head to the use-case guides.