khive

Documentation · Discord
Vector search finds similar text. A knowledge graph finds structure: lineages, dependencies,
contradictions, gaps. khive gives your research agent a typed, queryable graph that grows as it
works. Read a paper and entities and edges fall out. Make a connection and it's traversable
immediately. Come back next session and the graph remembers what you built.
There's no Neo4j to run and no separate SPARQL endpoint to deploy. It's SQLite on disk and MCP over
stdio.
khive also runs hosted, as memory and a knowledge graph your agents reach over MCP:
https://khive.ai/?utm_source=github&utm_campaign=khive-readme
Install
With a Rust toolchain (rustup), install the kkernel binary from crates.io:
cargo install kkernel --locked
The first build compiles about 330 crates, so expect it to take several minutes.
Add khive to .mcp.json in your project:
{ "mcpServers": { "khive": { "command": "kkernel", "args": ["mcp"] } } }
Or, to make it available in every project with Claude Code:
claude mcp add khive --scope user -- kkernel mcp
A user-scope registration gives every project the full default pack set, including the exec verbs and the git write verbs (for example git.commit, git.push and git.pr_merge). For less exposure, register per project, or pick packs with --pack (repeatable, for example kkernel mcp --pack kg --pack memory) or KHIVE_PACKS.
Check the binary:
kkernel --version
To build from a source checkout instead, see Quick start.
What you get
| Capability | How |
|---|
| 170 verbs, 14 packs | KG, GTD, memory, brain, comm, schedule, knowledge, session, tool, exec, git, code, workspace, blob: all load by default |
| Typed entities | 9 closed kinds: concept, document, dataset, project, person, org, artifact, service, resource |
| Typed edges | 20 closed relations in 10 categories (structure, derivation, provenance, temporal, dependency, impl, lateral, annotation, epistemic, ownership) |
| Typed notes | 5 closed kinds: observation, insight, question, decision, reference |
| Hybrid retrieval | FTS5 + vector RRF with embedding rerank; shipped BM25, HNSW, Vamana, and fusion crates for pack-specific retrieval paths |
| Graph traversal | BFS with depth/direction/relation filters, bidirectional shortest path |
| GQL + SPARQL queries | Parse to SQL, run against the same SQLite backend |
| Salience-weighted notes | Notes carry salience scores; search ranks by semantic relevance × salience |
| Cross-substrate links | Notes annotate entities (and vice versa) via the same edge system |
| Soft delete + supersede | History-preserving: old records stay, newer ones supersede via graph edges |
| Namespace attribution | Every record is stamped with a namespace and all records share one store by default. Operators can supply a custom Gate for namespace-scoped enforcement |
The three substrates
Everything in khive is one of three things: