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¶
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:
- Open Open-WebUI → Workspace → Knowledge
- Upload or link to
./wiki/wiki.json - The JSON structure contains: nodes (concepts/sections with content), edges (cross-references), and TOC (table of contents)
- 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:
In Open-WebUI, configure an MCP connection:
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 — Embedded Vector Search¶
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.