What it is

The graph began as a local GraphDB repository on a laptop, which meant it existed only when the laptop did. The exocortex gateway tool (one tool: ask / query / add / commit) first bridged agents to it through a tunnel; the durable fix was to move the store itself to the edge.

kg-store runs Oxigraph 0.5.13 (WASM) inside a SQLite-backed Durable Object — no public route, reachable only through a service binding from the gateway. Design rules are constitutional, not conventional: agents may add but never delete or update; every addition lands in the adding agent’s own named graph, provenance-stamped; additions are previewed and size-capped. Snapshots roll to R2 daily, newest 14 kept.

Code

kg-store/src/config.ts (exact):

/** Constants and the Env shape of kg-store, kept out of the entry module (workerd treats every named export there as an entrypoint). */

import type { KgStore } from "./index.js";
export const OXIGRAPH_VERSION = "0.5.13";
export const REPOSITORY = "exocortex";
/** Agent additions go only into their own named graph under this prefix (the gateway's graphIri). */
export const AGENT_GRAPH_PREFIX = "urn:exocortex:agent:";
/** Snapshot chunk size. SQLite-backed Durable Objects cap key plus value at 8 MB (durable-objects/platform/limits). */
export const CHUNK_BYTES = 1024 * 1024;
export const BACKUPS_KEPT = 14;

Achievements

  • Always-on since 2026-11-10 — the tunnel era ended; the graph answers regardless of any laptop.
  • 48 Vitest tests in workerd covering contract, refusals, seeding, chunking and eviction (per the kg-store README).
  • The graph grew past 4,600 triples during the November corpus recovery, including a byte-exact recovered essay corpus.

Lessons

  • Put the store where the agents are, not where the human happens to sit. A knowledge base behind a personal tunnel is a part-time knowledge base.
  • Append-only with provenance beats edit rights. When many writers share one graph, the question is never “is this true?” but “who said this, when, from what?” — named graphs answer that structurally.

Status: Active, in production · Oxigraph, SPARQL, Cloudflare Durable Objects, R2, TypeScript