- Default Setup
- Embedded Setup
This walks the production path: PostgreSQL + pgvector + Neo4j with the default The Khora library requires Python version 3.13+
VectorCypher engine. For embedded options (SQLite + LanceDB), see Configuration.1
Install Khora
2
Setup databases
As Khora is meant to be used as a library, it has no built-in server and is made to work with existing databases.For local development, the Khora repo ships a Then export connection URLs via environment variables in
compose.yaml that get’s you up and running with our recommended stack: Postgres (with pgvector) and Neo4j .env3
Run migrations
Khora ships its schema as Alembic migrations. Run them once per database:Or instantiate
Khora(..., run_migrations=True) to apply on connect under an advisory lock, useful for single-process apps and tests.4
Store a memory
remember() runs the 3-phase ingestion pipeline (stage → enrich → expand). recall() returns a RecallResult projection with chunks (typed RecallChunk), entities, relationships, and documents (deduplicated source documents). Build prompt context by iterating result.chunks. Each carries .content, .score, .id, and .document_id.5
Batch ingestion (optional)
For higher throughput, stage documents and let a background processor pick them up:The processor is opt-in. Read-only services don’t need it.
Next steps
Configuration
Every
KHORA_* knob: storage, LLM, pipeline, query, telemetry.VectorCypher
How the retrieval engine fuses vector, graph, and keyword search with query routing and RRF.