شعار Kremis

Kremis

المجتمع
TyKolt

A minimal graph engine for grounded AI — records, associates, and retrieves, but never invents. Written in Rust.

الناشرTyKolt
المستودعkremis
اللغةRust
التفريعات
3
النجوم
14
الأدوات المتاحة
0
نوع نقل البياناتstdio
الفئات
الترخيصApache-2.0
الروابط
  • اربط الأدوات بسير عمل الذكاء الاصطناعي

    يتيح Kremis إمكانات MCP التي يمكن لتطبيقات الذكاء الاصطناعي العميلة ووكلاء الذكاء الاصطناعي المتوافقة استخدامها.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم أمثلة إعداد التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات الاهتمام بالمصدر المفتوح

    النجوم: 14، والنسخ المتفرعة: 3 في المستودع المرتبط.

Alpha — Functional and tested. Breaking changes may still occur before v1.0.


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 check each claim against the graph. Every response carries a grounding field — fact, inference, or unknown — and POST /certify turns an unknown into a certificate bound to a BLAKE3 hash of the graph state. 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.


Fabrication Benchmark

A closed registry of 9 fictional services and 5 one-way dependencies. 24 questions of the form "does A depend on B, directly or transitively?" — 8 have an answer, 16 do not, and no answer exists for them anywhere. Nothing in the prompt asks any model to invent: the facts are supplied and UNKNOWN is offered.

qwen3.5:4b, temperature 0, 5 runs:

SystemFalse assertionAnswer accuracy
Kremis (/query + /certify)0.00 %100 %
LLM holding the entire registry0.00 %100 %
LLM + naive retrieval0.00 %75 %
LLM, no context0.00 %0 %

On a world this small a capable model does not fabricate: given every fact it needs, qwen3.5:4b matches the substrate here, answering all 8 answerable questions and abstaining on the 16 that have no answer. But capability is not free with the year on the model card — phi4-mini, a current local 4B from another lab, holds the identical registry and still asserts marn-ledger -> quoll-auth, the reverse of a stated dependency, on every run (12.50 %). Which model you run already decides it. Kremis stores dependencies as one-way edges, so a reverse path is not there to find: it returns grounding: "unknown" and /certify issues a certificate carrying no evidence, bound to a BLAKE3 hash of the graph state. The zero is structural, not measured — and the interesting failure is the long horizon below.

It is also not a like-for-like race, and should not be read as one. The LLM gets English and has to find the services itself; Kremis gets strongest_path(42, 87) with the ids already resolved. A graph of one-way edges cannot fabricate an edge — saying so proves nothing. What is not free is the certificate: an absence bound to a hash, which someone else can check without trusting the system that issued it.

The bottom row is the control: a model that answers UNKNOWN to everything fabricates nothing and is useless. Abstention counts only alongside accuracy.

bash
python benchmark/run.py --model qwen3.5:4b --runs 5
python benchmark/run.py --skip-llm              # Kremis alone, no Ollama needed

So on the lookup the capable models (qwen3.5:4b, gemma4) score 0 while a weaker current 4B (phi4-mini) still invents. The base world separates capable from weak — so the benchmark ships a second one, where the answer no longer fits in a glance and even the capable models start to fail.

Long horizon

420 services, 330 one-way dependencies, and the answer is a composition of up to 10 steps. The 60 questions with no answer come in two traps, 30 each: a chain with exactly one link withheld (N-1 of the N links stated, one missing — no chain), and an intact chain asked backwards (dependencies are one-way, so the reverse has no answer). The model is handed all 330 dependencies anyway — what is missing is missing in the world, not in the context.

Temperature 0, 60 questions with no answer, each model holding the entire registry:

Two local models you would actually run, two hosted at the extremes of the frontier:

SystemFalse assertionAnswer accuracy
Kremis (/query + /certify)0.00 %100 %
gemma4 (hosted)0.00 %100 %
qwen3.5:4b (local)3.33 %20 %
phi4-mini (local)1.67 %6.67 %
llama-3.3-70b (hosted)61.67 %100 %

Read the second row before the last. As of July 2026 a frontier model matches Kremis on every column of this benchmark — so "LLMs fabricate and Kremis doesn't" is not a claim this project makes in the present tense. What is left is narrower: that zero is one execution, and it arrives with nothing you can check. Kremis's is a property of a graph of one-way edges, and it certifies all 60 absences against a BLAKE3 state hash.

Capability is also not uniform — llama-3.3-70b (Meta, via NVIDIA) invents 37 of the 60 chains while answering every real one, and the two local 4B models fabricate less but still fabricate (qwen3.5:4b 3.33 %, phi4-mini 1.67 %) while answering almost nothing. None of them gives you a way to tell which answer you just got.

One caveat is ours, not theirs: 420 services is ~6.6k tokens, so the whole world fits in the prompt. That is the single regime where an LLM can compete on this task at all. --scale leaves it — the questions stay identical and only the prompt grows.

And it matters. At --scale 3000 (57k prompt tokens) gemma4 fabricates 1 / 60 where it fabricated 0 / 60 at the default size; the local qwen3.5:4b at --scale 500 instead answers fewer questions (accuracy 20 % → 13.33 %) without inventing more. The LLMs move with scale, in different directions; the parity in the table above is a property of a small world, not of the model. Kremis is 0 / 60 with 100 % accuracy at every scale measured.

bash
python benchmark/run.py --world horizon

Caveats, the counter-experiment, the noise in the curve, and the ground truth are in benchmark/README.md.


Quick Start

Requires Rust 1.89+ and Cargo.

bash
git clone https://github.com/TyKolt/kremis.git
cd kremis
cargo build --release
cargo test --workspace
bash
cargo run -p kremis -- init                                          # initialize database
cargo run -p kremis -- ingest -f examples/sample_signals.json -t json # ingest sample data
cargo run -p kremis -- server                                        # start HTTP server

In a second terminal:

bash
curl http://localhost:8080/health
curl -X POST http://localhost:8080/query \
  -H "Content-Type: application/json" \
  -d '{"type":"lookup","entity_id":1}'

Note: CLI commands and the HTTP server cannot run simultaneously (redb holds an exclusive lock). Stop the server before using CLI commands.

Docker

bash
docker build -t kremis .

# MCP server (default) — pipe MCP stdio JSON-RPC; suitable for any MCP client
docker run -i --rm kremis

# HTTP API only — override the entrypoint
docker run -d -p 8080:8080 -v kremis-data:/data \
  --entrypoint kremis kremis server -H 0.0.0.0 -D /data/kremis.db

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

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

Benchmarks

Auto-generated on CI runners — 2026-09-15.

OperationLinuxWindowsmacOS
Node insertion (100K)20.86 ms ±0.1320.39 ms ±0.8415.47 ms ±0.21
Signal ingestion (10K batch)8.35 ms ±0.0611.51 ms ±1.216.07 ms ±0.26
Graph traversal (depth 50, 1K nodes)2.7 µs ±0.23.5 µs ±0.02.1 µs ±0.1
Strongest path (1K nodes)7.9 µs ±0.18.4 µs ±0.86.2 µs ±0.1
Canonical export (1K nodes)69.2 µs ±0.375.9 µs ±1.550.9 µs ±2.9
Canonical import (10K nodes)3.09 ms ±0.023.42 ms ±0.162.59 ms ±0.06
Redb node insertion (1K)299.41 ms ±2.629.9 s ±2.2404.44 ms ±35.26

The ± is criterion's deviation within a single run. Spread between runs on hosted CI is wider still, because the runners themselves vary: figures here have moved by tens of percent with no change to the benched code. Read them as orders of magnitude, not as a regression signal.


License

Apache License 2.0

The brand assets in docs/logo/ (logo, icon, favicon) are proprietary and not covered by the Apache 2.0 license. See docs/logo/LICENSE.

Contributing

See CONTRIBUTING.md for guidelines. The architecture is still evolving — open an issue before submitting a PR.

Acknowledgments

This project was developed with AI assistance.


استخدم MCP الخاص بـ Kremis مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل Kremis، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal والعملية التي تعمل فيها قيد التشغيل أثناء استخدام أدوات MCP.
3

أضف Kremis كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ Kremis.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "kremis": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ Kremis، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ Kremis.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام Kremis لمساعدتي في هذه المهمة؟
Kremis
بالتأكيد. قرأته.
إليك ما وجدته باستخدام Kremis.

الأسئلة الشائعة

ما استخدامات خادم MCP Kremis؟

Kremis هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP Kremis مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام Kremis مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم موصل MCP Kremis مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل Kremis، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP Kremis بـ TypingMind؟

يعمل Kremis عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP Kremis في TypingMind؟

يتيح Kremis إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP Kremis؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويُبقي مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP تحت تحكمك. إذا كان Kremis يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇