Skip to main content
Glama
Kremis
by TyKolt

알파(Alpha) — 기능이 작동하며 테스트를 거쳤습니다. v1.0 이전에는 주요 변경 사항이 발생할 수 있습니다.


왜 Kremis인가

문제

Kremis의 해결 방식

환각(Hallucination)

모든 결과는 실제 입력된 신호로 추적 가능합니다. 데이터가 없으면 명시적으로 "찾을 수 없음"을 반환하며, 절대 조작하지 않습니다

불투명성

완전히 검사 가능한 그래프 상태. 숨겨진 레이어나 블랙박스가 없습니다

근거 부족

사전 로드된 지식이 전혀 없습니다. 모든 구조는 가정이 아닌 실제 신호에서 도출됩니다

비결정론

동일한 입력, 동일한 출력. 무작위성이 없으며, 핵심 로직에 부동 소수점 연산을 사용하지 않습니다

데이터 손실

redb 임베디드 데이터베이스를 통한 ACID 트랜잭션. 설계상 충돌 방지

설계 철학 — 이러한 제약 조건이 존재하는 이유.


Related MCP server: agent-fact-system

기능

  • 결정론적 그래프 엔진 — 순수 Rust, 핵심 로직에 비동기(async) 없음, 부동 소수점 없음. 동일한 입력은 항상 동일한 출력을 생성합니다

  • CLI + HTTP API + MCP 브리지 — 터미널, REST, AI 어시스턴트 등 동일한 엔진에 대한 세 가지 인터페이스

  • BLAKE3 해싱 — 언제든지 무결성을 검증할 수 있도록 전체 그래프 상태에 대한 암호학적 해시 제공

  • 표준 내보내기 (KREX) — 출처, 감사 추적 및 재현성을 위한 결정론적 바이너리 스냅샷

  • 내장 지식 제로 — Kremis는 빈 상태로 시작합니다. 모든 노드는 실제 신호에서 생성됩니다

  • ACID 영속성 — 충돌 방지 트랜잭션을 지원하는 기본 redb 백엔드


사용 사례

MCP를 통한 AI 에이전트 메모리

Claude, Cursor 또는 MCP 호환 어시스턴트에 검증 가능한 메모리 계층을 제공합니다. Kremis는 사실을 그래프 노드로 저장하며, 에이전트가 이를 쿼리할 때 모든 답변은 실제 데이터 포인트로 추적됩니다. 임베딩이나 확률적 검색을 사용하지 않습니다.

LLM 사실 확인

데이터를 수집하고, LLM이 주장을 생성하게 한 다음, 그래프를 통해 각 주장을 검증합니다. Kremis는 모든 진술을 [FACT] 또는 [NOT IN GRAPH]로 라벨링하며, 신뢰도 점수나 모호함이 없습니다.

출처 및 감사 추적

전체 그래프를 결정론적 바이너리 스냅샷으로 내보내고, BLAKE3 해시를 계산하여 언제든지 무결성을 검증합니다. 모든 노드는 이를 생성한 신호에 연결됩니다. 어떤 데이터가 언제 존재했는지 증명해야 하는 규정 준수 워크플로우에 유용합니다.


정직성 데모

몇 가지 사실을 입력하고, LLM이 주장을 생성하게 하면 Kremis가 각각을 검증합니다:

[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

세 가지 사실이 근거를 갖추었습니다. 세 가지는 조작되었습니다. 모호함은 없습니다.

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

빠른 시작

Rust 1.89+ 및 Cargo가 필요합니다.

git clone https://github.com/TyKolt/kremis.git
cd kremis
cargo build --release
cargo test --workspace
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

두 번째 터미널에서:

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

참고: CLI 명령과 HTTP 서버는 동시에 실행할 수 없습니다(redb가 독점 잠금을 유지함). CLI 명령을 사용하기 전에 서버를 중지하십시오.

Docker

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

아키텍처

구성 요소

설명

kremis-core

결정론적 그래프 엔진 (순수 Rust, 비동기 없음)

apps/kremis

HTTP 서버 + CLI (tokio, axum, clap)

apps/kremis-mcp

AI 어시스턴트를 위한 MCP 서버 브리지 (rmcp, stdio)

데이터 흐름, 스토리지 백엔드, 알고리즘, 내보내기 형식 등 내부 구조는 아키텍처 문서를 참조하십시오.


문서

전체 참조는 **kremis.mintlify.app**에서 확인하십시오:


테스트

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

벤치마크

CI 러너에서 자동 생성됨 — 2026-05-10.

작업

Linux

Windows

macOS

노드 삽입 (100K)

21.30 ms

22.06 ms

18.67 ms

신호 수집 (10K 배치)

6.98 ms

9.78 ms

8.12 ms

그래프 탐색 (깊이 50, 1K 노드)

2.6 µs

3.1 µs

2.3 µs

최단 경로 (1K 노드)

7.6 µs

8.7 µs

6.1 µs

표준 내보내기 (1K 노드)

68.2 µs

74.4 µs

56.6 µs

표준 가져오기 (10K 노드)

3.09 ms

3.97 ms

3.38 ms

Redb 노드 삽입 (1K)

358.19 ms

14.6 s

489.02 ms


라이선스

Apache License 2.0

docs/logo/에 있는 브랜드 자산(로고, 아이콘, 파비콘)은 독점적이며 Apache 2.0 라이선스가 적용되지 않습니다. docs/logo/LICENSE를 참조하십시오.

기여

지침은 CONTRIBUTING.md를 참조하십시오. 아키텍처는 여전히 발전 중이므로 PR을 제출하기 전에 이슈를 열어주십시오.

감사의 말

이 프로젝트는 AI의 도움을 받아 개발되었습니다.


Available Tools

10 tools
kremis_certifyA

Produce a Verifiable Query Certificate for an entity lookup: a reproducible proof of a fact, or a proof of absence when the entity is not in the graph

Inputs: entity_id (required).

kremis_hashA

Get the canonical BLAKE3 hash of the current graph state

Inputs: no named parameters.

kremis_ingestC

Add an entity or relation to the Kremis knowledge graph

Inputs: value (required), attribute (required), entity_id (required).

kremis_intersectB

Find common connections between multiple nodes

Inputs: nodes (required).

kremis_lookupB

Look up an entity in the graph by its entity ID

Inputs: entity_id (required).

kremis_pathC

Find the strongest weighted path between two nodes

Inputs: end (required), start (required).

kremis_propertiesB

Get all properties (attributes and values) of a specific node

Inputs: node_id (required).

kremis_retractB

Decrement the weight of an edge between two entities (edge invalidation / signal retraction)

Inputs: to_entity (required), from_entity (required).

kremis_statusA

Get current graph statistics (node count, edge count, density)

Inputs: no named parameters.

kremis_traverseC

Traverse the graph from a node to discover connected entities

Inputs: node_id (required), depth, top_k.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: ingest adds data, lookup retrieves entities, properties gets attributes, traverse explores connections, intersect finds common neighbors, path finds weighted paths, retract adjusts edge weights, status shows statistics, hash computes graph hash, and certify produces proofs. No overlapping functionality.

    Naming Consistency5/5

    All tools follow the consistent pattern 'kremis_<verb>' with clear action verbs (certify, hash, ingest, intersect, lookup, path, properties, retract, status, traverse), making the naming predictable and easy to understand.

    Tool Count5/5

    With 10 tools, the server is well-scoped for a knowledge graph management and verification system. Each tool contributes meaningfully without being excessive or insufficient.

    Completeness4/5

    The tool set covers essential CRUD-like operations (ingest, lookup, retract), graph traversal and analysis (traverse, intersect, path), statistics, hashing, and certification. Missing explicit update or full delete tools, but these may be intentional given the focus on verifiable proofs and immutable facts.

    Maintenance

    ActivityActive
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables coding agents to keep a local knowledge graph across sessions and checkpoints, restoring project context after tabs or model changes, and to ground every answer with an explicit verdict from the graph. Runs entirely on the user's machine over MCP/stdio or local JSON-RPC with no third-party runtime dependencies.
      12
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      An MCP stdio bridge that lets compatible agents query a local, provenance-first memory graph, fetch source-versioned text, inspect retrieval, check service health, and report usefulness feedback.
      1
      MIT