selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

KaaS logo

Self-host KaaS

v0.1.0-rc.2

LLM compiler turning notes into a queryable Markdown wiki

BetaOpen SourceMIT
Updatedlast month
LanguagePython
Setup difficultyModerate
Stars
152
Ports
8080 (HTTP server (REST API, Web UI, MCP endpoint)), 8082 (MCP HTTP transport (kb-ai mcp --http))
Docker
ghcr.io/bybit-exchange/kaas
Install with Docker
Chat interface showing a question answered with citations linking back to wiki articlesWiki browser with article tree on the left and rendered Markdown article on the right

What is KaaS?

KaaS (Knowledge as a Service) compiles raw content — pasted text, uploaded files, or fetched URLs — through a four-phase LLM pipeline (Extract, Classify, Write, Index) into human-readable Markdown articles organized as a wiki. Unlike typical retrieval systems that break text into embedded fragments, KaaS produces structured, cited articles you can read, edit, and version with Git. The compiled wiki is queryable via a web UI with streaming cited answers, or through MCP (Model Context Protocol) for integration with coding agents like Claude Code and Codex. It runs as a single Docker image bundling a Go backend, React frontend, and Python AI daemon, using SQLite by default with optional MySQL. Configuration is via TOML file with environment variable overrides for secrets. The project is MIT-licensed and developed by Bybit Exchange.

Should you self-host KaaS?

KaaS scores 44/100 on selfhost.directory (how scoring works) and ranks #25 of 42 in Knowledge Management. It has 152 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is Project N.O.M.A.D. (85/100, 41 087 stars). It scores higher overall, so compare the two before you pick. See KaaS vs Project N.O.M.A.D. side by side.

Features

  • Cited answers with SSE streaming
  • Compile-then-retrieve pipeline
  • Fault-tolerant worker pool
  • Human-readable Markdown wiki
  • Incremental compilation
  • MCP access (stdio and HTTP)
  • Multiple input methods
  • OpenAI-compatible LLM Support
  • Single binary CLI installer
  • Web UI with chat and wiki browser

KaaS README

How to install KaaS

Install KaaS with Docker

Docker Engine
Environment variables
LLM_API_KEY, LLM_BASE_URL, LLM_MODEL, KAAS_MCP_ENABLED, KAAS_MCP_TOKEN

docker run -d --name kaas -p 8080:8080 -v ./data:/app/data -e LLM_API_KEY=sk-xxx -e LLM_BASE_URL=https://api.openai.com/v1 -e LLM_MODEL=gpt-4o-mini ghcr.io/bybit-exchange/kaas:edge

Prebuilt for linux/amd64 and linux/arm64. Edge tag tracks main branch.

How to configure KaaS

  • KAAS_AI_DAEMON_CONCURRENCY16Python daemon thread pool concurrency

    Python daemon thread pool concurrency

  • KAAS_MCP_ENABLEDfalseEnable MCP HTTP endpoint at /mcp

    Enable MCP HTTP endpoint at /mcp

    values: true, false

  • KAAS_MCP_TOKENBearer token for MCP HTTP authentication

    Bearer token for MCP HTTP authentication

  • KAAS_WEB_DIR/app/web/distPath to built web UI assets

    Path to built web UI assets

  • KAAS_WORKER_DOCUMENT_WORKERS16Document-level task concurrency

    Document-level task concurrency

  • KB_AI_EXTRACT_TIMEOUT_S180Extract phase timeout in seconds

    Extract phase timeout in seconds

  • KB_AI_WRITE_TIMEOUT_S300Write phase timeout in seconds

    Write phase timeout in seconds

  • LLM_API_KEYOpenAI-compatible API key for LLM calls

    OpenAI-compatible API key for LLM calls

  • LLM_BASE_URLhttps://api.openai.com/v1OpenAI-compatible API base URL

    OpenAI-compatible API base URL

  • LLM_EXTRACT_STRATEGYchunkedHow extraction reads a document: chunked, summarize, or auto

    How extraction reads a document: chunked, summarize, or auto

    values: chunked, summarize, auto

  • LLM_MODELgpt-4o-miniModel name for chat and compilation

    Model name for chat and compilation

  • LLM_SUMMARIZE_MODELModel for summarization (defaults to LLM_MODEL)

    Model for summarization (defaults to LLM_MODEL)

More in Knowledge Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…