khive
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**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, MCP over
stdio, and cargo test finishes in 4 seconds.
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
---
What you get
| Capability | How |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **153 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:
| Substrate | What it is | Mutability | Example |
| ---------- | -------------------------------------- | --------------------- | ---------------------------------------------------- |
| **Entity** | A graph node with typed edges | Mutable + soft-delete | LoRA (concept), arxiv:2106.09685 (document) |
| **Note** | A temporal observation about the world | Mutable + soft-delete | "FlashAttention gains scale with seq len, not batch" |
| **Event** | An audit log entry | Immutable | create(kind="entity", ...) was called at T |
Entities are _things_. Notes are _what you think about things_. Events are _what happened_.
---
The MCP verb surface
One MCP tool: request (ADR-016 + ADR-027). Every verb is a parsed op inside it.
All 14 packs load by default, giving **153 verbs** out of the box (updated from the
current handler declarations; verify again with request(ops="verbs()")
before editing this table):
| Pack | Prefix | Verbs | What it does |
| ------------- | ------------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **kg** | _(bare)_ | 27 | Entities, edges, notes, graph queries, reference resolution, caller identity, WAL diagnostics |
| **gtd** | gtd. | 7 | Task lifecycle, timestamp census, and explicit historical repair |
| **memory** | memory. | 5 | Salience-weighted remember / decay-ranked recall |
| **brain** | brain. | 17 | Bayesian user profiles + feedback loop |
| **comm** | comm. | 15 | Threaded messaging with sender-side internal delivery confirmation |
| **schedule** | schedule. | 4 | Reminders and scheduled verb execution |