Skip to main content
Khora has many knobs. Most have sane defaults. To get a working instance, you only need storage connections and an LLM API key. For the full surface (pool sizing, HNSW tuning, dream-phase toggles, telemetry), see Full Configuration.

The minimum

Set these in your .env and you’re ready to call Khora():
Everything else has a default that works for development.

Things you’ll probably want to change next

Generation model

KHORA_LLM_MODEL (default gpt-4o-mini) picks the model used for extraction and generation. Any litellm-supported provider works. Set KHORA_LLM_API_KEY_ENV to point at the matching env var.

Embedding model

KHORA_LLM_EMBEDDING_MODEL (default text-embedding-3-small) controls embeddings. Changing the model usually means changing KHORA_LLM_EMBEDDING_DIMENSION to match. That requires a fresh schema, since vector columns are dimension-typed.

Storage backend

KHORA_STORAGE_BACKEND defaults to postgres. For demos or single-user CLIs, switch to the embedded SQLite + LanceDB stack:
Production traffic should stay on postgres. See the embedded backends notes for the scale ceiling and known gaps.

Retrieval mode

KHORA_QUERY_DEFAULT_MODE defaults to hybrid (vector and graph fused; the BM25 keyword channel is opt-in via KHORA_QUERY_ENABLE_BM25_CHANNEL). To force a single channel:
Valid values: vector, graph, hybrid, keyword, all.

Programmatic alternative

If env vars aren’t your style, pass a KhoraConfig directly:
Programmatic values override environment variables.

Next steps

Full Configuration

Every KHORA_* knob with defaults and tuning guidance.

Storage backends

Postgres + Neo4j vs SQLite + LanceDB: which to pick, what each gives up.