Skip to main content

Prerequisites

  • Rust 1.89+ (stable, edition 2024)
  • Cargo (included with Rust)

Build

git clone https://github.com/TyKolt/kremis.git
cd kremis
cargo build --release
cargo test --workspace

First Run

1

Initialize the database

cargo run -p kremis -- init
2

Ingest sample data

The repository includes sample signals with 3 entities (Alice, Bob, Kremis) and their relationships.
cargo run -p kremis -- ingest -f examples/sample_signals.json -t json
3

Start the HTTP server

cargo run -p kremis -- server
The server starts on http://localhost:8080 by default.
4

Query the graph

In a separate terminal:
# Health check
curl http://localhost:8080/health

# Look up entity 1 (Alice)
curl -X POST http://localhost:8080/query \
     -H "Content-Type: application/json" \
     -d '{"type": "lookup", "entity_id": 1}'

# Traverse from node 0, depth 3
curl -X POST http://localhost:8080/query \
     -H "Content-Type: application/json" \
     -d '{"type": "traverse", "node_id": 0, "depth": 3}'

# Get properties of node 0
curl -X POST http://localhost:8080/query \
     -H "Content-Type: application/json" \
     -d '{"type": "properties", "node_id": 0}'
CLI commands and the HTTP server cannot run simultaneously — redb holds an exclusive lock. Stop the server before using CLI commands like ingest, status, or export.
By default, API key authentication is disabled. The server logs a warning on startup. This is expected for local development. To enable authentication, set the KREMIS_API_KEY environment variable or add api_key under [security] in kremis.toml before exposing the server on a network.

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
With configuration:
docker run -d -p 8080:8080 \
  -v kremis-data:/data \
  -e KREMIS_API_KEY=your-secret \
  -e KREMIS_CORS_ORIGINS="https://example.com" \
  --entrypoint kremis kremis server -H 0.0.0.0 -D /data/kremis.db
Multi-stage build (~136 MB image). Data persists in /data volume. Built-in healthcheck on /health.

Next Steps

API Reference

Explore all HTTP endpoints

CLI Reference

Full command-line documentation

Core Concepts

Understand signals, graphs, and stages

MCP Server

Connect AI assistants to Kremis
Last modified on June 2, 2026