Skip to content

Connecting kompend with Open-WebUI

kompend has no custom GUI. It exposes a compiled knowledge base as machine-readable files (JSON graph, markdown, Typst) and an MCP server for agent integration. Open-WebUI can consume both.

Quick Start

1. Compile a wiki with vector index

kompend config set compile.output.format json
kompend compile ./sources

This produces:

  • wiki/wiki.json — full compiled knowledge graph

2. Point Open-WebUI at the JSON graph

Open-WebUI can ingest the compiled wiki as a knowledge source:

  1. Open Open-WebUI → Workspace → Knowledge
  2. Upload or link to ./wiki/wiki.json
  3. The JSON structure contains: nodes (concepts/sections with content), edges (cross-references), and TOC (table of contents)
  4. Open-WebUI ingests it as structured documents

3. Use the MCP server

kompend ships with an MCP server that exposes wiki_parse and wiki_compile tools:

kompend compile ./sources --url https://example.com/doc.pdf

In Open-WebUI, configure an MCP connection:

{
  "mcpServers": {
    "kompend": {
      "command": "kompend",
      "args": ["mcp"]
    }
  }
}

4. Query via the CLI (no GUI needed)

# Search compiled wiki with vector store
kompend query "performance"

# Or search directly the JSON graph
cat ./wiki/wiki.json | jq '.nodes[] | select(.title | test("performance"))'

Why Open-WebUI + kompend?

Approach When to use
Direct CLI (kompend compile, kompend query) Batch processing, cron jobs, scripts
MCP server Agent integration (Hermes, Claude Code, etc.)
Open-WebUI + JSON graph Chat interface with RAG over the compiled wiki
zvec vector store Semantic search without an external vector DB

zvec is Alibaba's in-process vector database (Apache 2.0). It stores vectors directly on disk — no server, no Docker, no API keys.

from kompend.rag.zvec_store import ZvecWikiStore

store = ZvecWikiStore("./.kompend/vectors")
results = store.search("performance requirements", top_k=5)
for r in results:
    print(f"[{r['score']:.2f}] {r['title']}: {r.get('content_preview')[:100]}")

When no embedding model is configured, vector indexing is disabled and the retriever falls back to token-overlap search. To enable semantic search, set compile.embedding.model in your config to a provider:model embedding (e.g. ollama:granite-embedding:278m). A provider prefix is required — there is no built-in local embedding model.