Labsco
TyKolt logo

Kremis

โ˜… 13

from TyKolt

Deterministic knowledge graph MCP server. Single binary, no LLM in the loop.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeNeeds API keys

Kremis

Kremis

A deterministic knowledge graph MCP server. Local, single binary, no LLM in the loop.

A minimal, graph-based cognitive substrate in Rust.
Records, associates, retrieves โ€” but never invents.

Alpha โ€” Functional and tested. Breaking changes may still occur before v1.0.

Kremis Honesty Demo


Why Kremis

ProblemHow Kremis addresses it
HallucinationEvery result traces back to a real ingested signal. Missing data returns explicit "not found" โ€” never fabricated
OpacityFully inspectable graph state. No hidden layers, no black box
Lack of groundingZero pre-loaded knowledge. All structure emerges from real signals, not assumptions
Non-determinismSame input, same output. No randomness, no floating-point arithmetic in core
Data lossACID transactions via redb embedded database. Crash-safe by design

Design Philosophy โ€” why these constraints exist.


Features

  • Deterministic graph engine โ€” Pure Rust, no async in core, no floating-point. Same input always produces the same output
  • CLI + HTTP API + MCP bridge โ€” Three interfaces to the same engine: terminal, REST, and AI assistants
  • BLAKE3 hashing โ€” Cryptographic hash of the full graph state for integrity verification at any point
  • Canonical export (KREX) โ€” Deterministic binary snapshot for provenance, audit trails, and reproducibility
  • Proof-carrying knowledge (KVQC) โ€” POST /certify returns a reproducible Verifiable Query Certificate: a portable proof of a fact, or proof of its absence
  • Zero baked-in knowledge โ€” Kremis starts empty. Every node comes from a real signal
  • ACID persistence โ€” Default redb backend with crash-safe transactions

Use Cases

AI agent memory via MCP

Give Claude, Cursor, or any MCP-compatible assistant a verifiable memory layer. Kremis stores facts as graph nodes โ€” the agent queries them, and every answer traces back to a real data point. No embeddings, no probabilistic retrieval.

LLM fact-checking

Ingest your data, let an LLM generate claims, then validate each claim against the graph. Kremis labels every statement as [FACT] or [NOT IN GRAPH] โ€” no confidence scores, no ambiguity.

Provenance and audit trail

Export the full graph as a deterministic binary snapshot, compute its BLAKE3 hash, and verify integrity at any point. Every node links to the signal that created it. Useful for compliance workflows where you need to prove what data was present and when.


Honesty Demo

Ingest a few facts, let an LLM generate claims, and Kremis validates each one:

[FACT]          Alice is an engineer.              โ† Kremis: "engineer"
[FACT]          Alice works on the Kremis project. โ† Kremis: "Kremis"
[FACT]          Alice knows Bob.                   โ† Kremis: "Bob"
[NOT IN GRAPH]  Alice holds a PhD from MIT.        โ† Kremis: None
[NOT IN GRAPH]  Alice previously worked at DeepMind. โ† Kremis: None
[NOT IN GRAPH]  Alice manages a team of 8.         โ† Kremis: None

Confirmed by graph: 3/6
Not in graph:       3/6

Three facts grounded. Three fabricated. No ambiguity.

python examples/demo_honesty.py            # mock LLM (no external deps)
python examples/demo_honesty.py --ollama   # real LLM via Ollama

Architecture

ComponentDescription
kremis-coreDeterministic graph engine (pure Rust, no async)
apps/kremisHTTP server + CLI (tokio, axum, clap)
apps/kremis-mcpMCP server bridge for AI assistants (rmcp, stdio)

See the architecture docs for internals: data flow, storage backends, algorithms, export formats.


Documentation

Full reference at kremis.mintlify.app:


Testing

cargo test --workspace
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all -- --check

Benchmarks

Auto-generated on CI runners โ€” 2026-07-02.

OperationLinuxWindowsmacOS
Node insertion (100K)23.48 ms15.99 ms16.79 ms
Signal ingestion (10K batch)9.26 ms8.74 ms6.65 ms
Graph traversal (depth 50, 1K nodes)2.7 ยตs2.5 ยตs3.1 ยตs
Strongest path (1K nodes)8.0 ยตs7.1 ยตs6.7 ยตs
Canonical export (1K nodes)72.8 ยตs59.4 ยตs56.6 ยตs
Canonical import (10K nodes)3.21 ms3.00 ms2.80 ms
Redb node insertion (1K)356.05 ms15.9 s486.55 ms