Skip to main content
Khora combines three ways of storing and finding information behind one facade. The literal text, the meaning (vector embeddings), and the connections (an entity graph) each live where they’re queried best, and a coordinator keeps them in sync.
                      Khora facade
            remember() · recall() · forget()

        ┌──────────────────┼──────────────────┐
        ▼                  ▼                  ▼
   PostgreSQL          pgvector             Neo4j
   the facts        the meaning         the connections
   (documents,      (semantic           (entities,
    events)          similarity)         relationships)
This page is the map. Each box links to the page that covers it in depth.

Core components

ComponentRoleWhere
KhoraThe facade: remember / recall / forget and the rest of the public APIAPI reference
StorageCoordinatorRoutes every read/write to the right backend, scoped to a namespace. Runs dual writes in parallel. Offers transaction()Storage backends
Ingestion pipelineStaged batch write path: chunk → embed ∥ extract → storeIngestion
Query engineMulti-source read path: understand → search → fuse → rerankRetrieval
VectorCypherThe retrieval engine: hybrid vector + graph + keyword searchVectorCypher

How data flows

Writing (remember) runs the three-phase pipeline: staging (dedup + document record), enrichment (chunk, then embed and extract concurrently, then batch-store), and optional expansion (entity unification + relationship inference). The same content is stored in multiple forms (text in PostgreSQL, vectors in pgvector, the entity graph in Neo4j) because each backend answers a different kind of question. Reading (recall) runs the query pipeline: one LLM call understands the query, vector/graph/keyword channels search in parallel, and Reciprocal Rank Fusion combines the rankings before optional reranking.

Cross-cutting concerns

  • Namespaces & isolation: the sole tenancy boundary, enforced at the query layer on every backend method (namespace_id is required, kwarg-only).
  • Event sourcing: every change is an immutable event, so nothing is silently lost. Audit, time-travel, and CDC fall out of it.
  • Observability: Khora emits OpenTelemetry spans/metrics unconditionally, and the host app chooses where they go. Khora never sets service.name or installs a provider at import time.
  • Configuration layers: env vars → KhoraConfig → per-namespace overrides, general to specific. See Configuration.
  • Protocol-based design: each storage role (relational, vector, graph) sits behind a Protocol, so the embedded sqlite_lance stack and the production PostgreSQL + pgvector + Neo4j stack share one code path.

Going deeper

speed

Performance & scaling

Bulk loading, connection pooling, batch operations, and the knobs that matter at scale.
bolt

Rust acceleration

The optional native layer for CPU-bound work, with automatic NumPy/Python fallback.