Hypabase
Hypabase is a Python library for storing and querying relationships between entities. A single edge connects two or more nodes, every edge tracks where it came from (source and confidence), and the whole graph lives in a local SQLite file with no server or configuration.
Use it to build knowledge graphs, retrieval-augmented generation pipelines, and structured agent memory. Recent research explores hypergraph representations for these tasks:
HyperGraphRAG — n-ary knowledge retrieval across medicine, agriculture, CS, and law
Cog-RAG — dual-hypergraph retrieval with theme-level and entity-level recall
Hypergraph Memory for Multi-step RAG — hypergraph-based memory for long-context relational modeling
Install
Quick example
Provenance
Every edge carries source and confidence:
Namespace isolation
Isolate data into separate namespaces within a single database file:
Features
N-ary hyperedges — an edge connects 2+ nodes in a single relationship
O(1) vertex-set lookup — find edges by their exact node set
Provenance — every edge carries
sourceandconfidenceProvenance queries — filter by
sourceandmin_confidence, summarize withsources()SQLite persistence — local-first, zero-config
Namespace isolation —
.database("name")for scoped views in a single fileMCP server — 14 tools + 2 resources for AI agent integration
CLI —
hypabase init,hypabase node,hypabase edge,hypabase query
Documentation
License
Apache 2.0