What is Hypabase?
Hypabase is a Python hypergraph library with provenance tracking and SQLite persistence. It provides an MCP server (14 tools + 2 resources), a CLI, and a Python API for storing and querying n‑ary relationships (hyperedges) where an edge can connect any number of nodes. It is intended for knowledge graphs, agent memory, and data integration scenarios where provenance (source and confidence) matters.
How to use Hypabase?
Install via uv add hypabase (or uv add hypabase[mcp] for the MCP server, uv add hypabase[cli] for CLI). Use the Python API to create a Hypabase("file.db") instance, then call .edge(), .edges(), .paths(), .node(), .nodes(), .sources(), etc. Run the MCP server with hypabase mcp. CLI commands include hypabase init, hypabase node, hypabase edge, hypabase query, and hypabase stats.
Key features of Hypabase
- Hyperedges connecting 2+ nodes in a single relationship
- Provenance tracking: every edge carries
source and confidence
- SQLite persistence to a local file automatically
- O(1) vertex‑set lookup for exact node sets
- Namespace isolation via
.database("name") within a single file
- MCP server with 14 tools and 2 resources for AI agents
- CLI for initialisation, nodes, edges, and queries
Use cases of Hypabase
- Representing complex real‑world relationships (e.g., medical events, academic papers) without decomposition
- Structured, queryable memory for AI agents that persists across sessions
- Storing extracted relationships for retrieval‑augmented generation (RAG)
- Biomedical data modeling (drug interactions, clinical events, molecular pathways)
- Supply chain and collaboration networks where relationships involve more than two entities
Comments