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 structures extracted data across graph, vector, and relational storage, so different kinds of questions can use the right retrieval path.
Query-aware hybrid retrieval
Khora’s default VectorCypher engine infers the best way to answer each query, using semantic search, graph traversal, keyword search, exact matching, and source-aware filtering where each is useful.
Data consolidation
Khora includes a consolidation phase that helps the repository stay clean as more data is ingested, reducing duplication and improving the quality of future retrieval.
Storage backends
Storage backends
Vector search is powerful, but it only covers part of what agents need to query.
“What did this customer say last week?”
needs temporal awareness.
“How is this person connected to that project?”
needs graph traversal.
“Where was this exact policy mentioned?”
needs lexical recall.
“What evidence supports this answer?”
needs source-aware retrieval.
“What changed between these two updates?”
needs structured history.
Khora is built around the idea that a useful knowledge repository needs more than one storage pattern. It structures ingested data across graph, vector, and relational storage, then exposes a single query layer over all of it.
At ingestion time, Khora turns raw source data into queryable knowledge artifacts. Documents can be staged and deduplicated. Text can be chunked and embedded. Entities and relationships can be extracted. Events, facts, timestamps, and source metadata can be preserved.
This allows to create a unified repository that can support semantic search, relationship traversal, exact matching, time-aware queries, and evidence-backed responses from the same underlying system.
Temporal context
Temporal context
Khora’s temporal-aware memory gives agents a real sense of when knowledge happened, changed, or expired, combining semantic, keyword, temporal, and entity recall with triple timestamps, recency-aware scoring, and forgetting-curve decay.
It is built for long-running conversations, support histories, meeting streams, and evolving knowledge bases where agents need to answer not just “What do we know?” but “What was true then, what changed, and what still matters now?”
Retrieval engine
Retrieval engine
We are shipping Khora with the our first retrieval engine: VectorCypher that it built as a modern approach to GraphRAG and that is purposely built to be able to query on large knowledge repositories that contain both structured and unstructured data from multiple sources.
The VectorCypher has a query-aware routing system that depending the query it chooses the right retrieval method.
Integrating Khora
Integrating Khora
Khora was intentionally built as a library so that it can be easier to integrate into your existing AI systems or workflows.
You can integrate it into your MCP or existing agent SDKs.
# knowledge_repo.pyimport asyncio
from khora import Khora
async defmain() -> None:
async withKhora(run_migrations=True) as kb:
ns = await kb.create_namespace()
await kb.remember(
"Marie Curie won the Nobel Prize in Physics in 1903.",
namespace=ns.namespace_id,
entity_types=["PERSON", "ORGANIZATION", "CONCEPT", "LOCATION", "EVENT"],
relationship_types=["RELATES_TO", "PART_OF", "MENTIONS"],
)
result = await kb.recall(
"What did Curie win?",
namespace=ns.namespace_id,
)
for chunk in result.chunks:
print(chunk.content, chunk.score)
asyncio.run(main())
Use cases
Use cases
Research Assistants
Khora helps research agents move beyond document Q&A. It can organize papers, notes, claims, entities, events, citations, and relationships into a memory layer that supports deeper retrieval, comparison, and synthesis.
Enterprise Knowledge Graphs
Khora extracts and connects entities, relationships, facts, and events from raw sources, giving agents a structured memory layer over enterprise knowledge. The result is retrieval that can follow meaning, relationships, keywords, and time.
Data consolidation
Data consolidation
As more data is ingested the repository needs to stay organized.
The same entity may appear under slightly different names. Similar facts may be repeated across sources. Old events may become less relevant. Relationships may need to be merged, corrected, or compacted.
Khora includes an optional data consolidation phase that inspects the repository and proposes maintenance work.
This can include:
deduplicating entities
compacting repeated facts
clustering related events
updating relationship quality
identifying stale or orphaned records
improving retrieval quality as the repository grows
Agentic workflow
Agentic workflow
Khora is built as a library that can be embedded directly into agent workflows. It is designed to work with production-ready infrastructure, including PostgreSQL with pgvector, and Neo4j for graph-heavy workloads.
It also integrates with popular agent frameworks, including CrewAI, LangGraph, Google ADK, OpenAI Agents SDK, and LlamaIndex.