> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deyta.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Khora

> A python library for creating knowledge repositories that ingest unstructured and structured multi-source data and expose a single query substrate, built for integrating into long-horizon AI agents.

Khora is durable memory for AI agents that need to remember across sessions. It stores what your agent learns (documents, entities, relationships, events, and facts) and retrieves it through hybrid search (vector, knowledge graph, keyword) with cross-encoder reranking and temporal scoring. A scheduled [dream phase](/khora/dream-phase) reorganizes the store offline (dedupes entities, prunes weak edges, recomputes centroids) so retrieval quality holds up as the corpus grows.

Khora is a **library, not a service**. You bring your own database: PostgreSQL with pgvector and Neo4j on the production path, or the embedded SQLite + LanceDB stack for demos and single-user CLIs. Khora handles ingestion, extraction, storage, and retrieval. Your code calls `remember()` and `recall()`.

## Highlights

<CardGroup cols={2}>
  <Card title="Hybrid Retrieval" icon={<span className="material-symbols-sharp">network_intelligence</span>}>
    Vector + knowledge graph + keyword, fused per query. Cross-encoder reranking and temporal-bias scoring are first-class.
  </Card>

  <Card title="Adaptive query routing" icon={<span className="material-symbols-sharp">settings_input_component</span>}>
    Simple lookups go vector-only. Multi-hop questions trigger Cypher graph traversal and RRF fusion, routed automatically per query by the `VectorCypher` engine.
  </Card>

  <Card title="Temporal context" icon={<span className="material-symbols-sharp">schedule</span>}>
    Bi-temporal by design. Entities and relationships carry `valid_from` / `valid_until` ranges. Queries can window by time, bias toward recency, or ask what was true on a given date.
  </Card>

  <Card title="Multi-tenant by namespace" icon={<span className="material-symbols-sharp">apartment</span>}>
    Namespaces are the sole tenancy boundary, enforced at the storage layer.
  </Card>
</CardGroup>

## Requirements

To use the library:

* Python 3.13+

### Recommended local setup

* Docker Compose for running the databases locally
  * PostgreSQL with pgvector
  * Neo4j (required for the `VectorCypher` engine)
* `uv` for dependency management
* Rust 1.85+ for the optional Rust acceleration

## Where to next

<CardGroup cols={2}>
  <Card title="Quickstart" icon={<span className="material-symbols-sharp">electric_bolt</span>} href="/khora/quickstart">
    Install Khora, run migrations, and complete your first remember / recall in a few minutes.
  </Card>

  <Card title="Configuration" icon={<span className="material-symbols-sharp">tune</span>} href="/khora/configuration">
    Every `KHORA_*` environment variable and the `KhoraConfig` surface.
  </Card>

  <Card title="Retrieval engine" icon={<span className="material-symbols-sharp">settings_input_component</span>} href="/khora/engines/vectorcypher">
    How VectorCypher fuses vector, graph, and keyword search with query routing and RRF.
  </Card>

  <Card title="Integrations" icon={<span className="material-symbols-sharp">extension</span>} href="/khora/integrations/overview">
    Drop-in adapters for CrewAI, LangGraph, Google ADK, OpenAI Agents, and LlamaIndex.
  </Card>
</CardGroup>
