Kompile Server (kompile-app)
kompile-app is Kompile's opt-in multi-process Spring Boot + Angular server platform for larger distributed systems, multi-user team collaboration, and enterprise knowledge operations. It runs either from the full distribution (kompile-server :8080, kompile-chat :8081, kompile-crawl-manager :8082) or as a custom compiled application generated by kompile build app.
NOTE
Working solo or just want persistent chat, memory, code search, and a browser UI? You do not need kompile-app. The standalone CLI & Web Harness (kompile chat / kompile chat --web) already provides full local persistence and a browser workspace, and kompile install local-runtime adds single-machine local RAG, .kgraph reasoning, and local LLM serving.
Use kompile-app when you need multi-user collaboration over shared indices (pgvector, Chroma, Vespa, Neo4j), scheduled or clustered multi-node crawls, enterprise OAuth connectors, inbound team messaging channels (Slack, Telegram, Discord, WhatsApp, email), shared REST/SSE APIs, or custom deployable RAG services. See App Persona Boundary and Distributed Crawl Cluster.
Quick start: shared team RAG & clustered crawls
1. Start a shared team knowledge base
# 1. Create a managed Kompile project
kompile project init --name my-docs
# 2. Start the server stack
kompile project open .
# Starts admin (:8080), chat (:8081), crawl manager (:8082), and model staging (:8090).
# The browser setup wizard opens at http://localhost:8080.
# 3. Walk through the setup wizard
# It confirms model staging is running, picks an embedding model,
# and verifies search works.
# 4. Ingest your documents (local folders or enterprise connectors: Confluence, Jira, Slack, Drive, S3, SQL)
kompile crawl start /path/to/your/documents/
# 5. Chat against the shared team instance
kompile chat --url=http://localhost:80812. Connect external MCP agents to the shared server (SSE)
kompile project open . writes a .mcp.json containing both the local kompile stdio server and the shared kompile-app SSE endpoint so external agents (Claude Code, Codex, Antigravity, Cursor) can combine local coding tools with shared team indices and collaborative fact sheets:
{
"mcpServers": {
"kompile": {
"command": "kompile",
"args": ["mcp-stdio", "--work-dir", "/path/to/project"]
},
"kompile-app": {
"url": "http://localhost:8080/mcp/sse",
"transport": "sse"
}
}
}3. Build and explore a server knowledge graph
Enable graph extraction during a crawl to extract typed entities and relationships, deduplicate across documents, and serve Graph RAG (exportable anytime as a portable .kgraph archive):
kompile crawl start /path/to/docs/ \
--graph \
--graph-model-provider=anthropic \
--graph-schema-mode=LENIENT
kompile crawl status --watch| Schema mode | Trade-off |
|---|---|
NONE | Maximum recall — extracts whatever entity/relation types the LLM finds. Can be noisy. |
LENIENT | Guided — follows your schema when possible and allows new types. Good default. |
STRICT | Maximum precision — only types defined in your schema are accepted. Clean, may miss novel types. |
Use kompile graph config presets for domain presets, and explore the resulting graph from the CLI:
kompile graph stats # Entity, relation, and community overview
kompile graph search "machine learning" # Find matching entities
kompile graph traverse --start-node=<id> # Explore neighborhoods
kompile graph communities --summarize # Detect and summarize clusters
kompile graph shell # Interactive Cypher query REPL
kompile graph browse # Interactive terminal browser4. Generate a custom self-contained application
Package a tailored Spring Boot RAG or pipeline server with only the modules you need:
# Interactive wizard
kompile build app --wizard
# Or generate from a preset
kompile build app --configName=myapp --preset=hosted-llm-rag| If you want... | Preset | What you get |
|---|---|---|
| Quick start with a hosted LLM | hosted-llm-rag | OpenAI LLM + local embeddings + PDF loader |
| AI agents that know your code | cli-agent-rag | Claude/Codex passthrough + local embeddings + file tools |
| Fully local, no API keys | samediff-rag | Local SameDiff embeddings + local LLM, nothing external |
| Small self-contained app | lite | Chat + RAG + Graph RAG in a minimal footprint |
| Everything | full | All modules — LLMs, embeddings, vector stores, OCR, graphs, training |
| Inference pipelines only | pipeline | Pipeline executor with SameDiff, ONNX, and Python steps |
| Minimal hosted setup | minimal | OpenAI embeddings + OpenAI LLM + local Anserini vector store |
cd kompile-rag-builds/myapp/project/
./scripts/start-all.sh # Start all configured services
# Or compile to a GraalVM native binary
mvn clean package -DskipTests -PnativeSee Build Applications and Model Staging (the optional :8090 service for ONNX/GGUF/TensorFlow conversion, LoRA/PEFT fine-tuning, and multi-node hot-reload serving).
Server ingestion & query flow
Ingestion:
Documents -> [Crawl] -> [Load] -> [Preprocess] -> [Route: text/VLM/table/code]
-> [Chunk] -> [Extract + Resolve entities] -> [Embed] -> [Index: vector store + graph store]
Query:
Question -> [Transform/Rewrite] -> [Embed] -> [Dense Vector + BM25 Search]
-> [Rerank] -> [Graph RAG expansion] -> [Assemble w/ fact sheets] -> [Generate w/ citations]See Crawl Jobs, Ingestion Pipeline, and Information Retrieval for full details.
Web UI screens
| Screen | What it does |
|---|---|
| Chat (default) | Conversational RAG with streaming, source attribution, multi-turn history, token metrics. Supports RAG mode and agent mode. |
| Knowledge | Document ingestion from 20+ sources, knowledge graph builder with entity/relationship browsing, fact sheets, graph visualization. |
| Code Projects | Register code repositories, trigger semantic indexing, browse code graphs, manage project context for agent sessions. |
| Tools | Configure MCP servers, browse and invoke tools, view tool call audit logs, manage prompt template skills. |
| KClaw (Agent Hub) | Run CLI agents interactively in the browser with MCP tool injection, permission management, heartbeat monitoring, session history. |
| Settings | Vector store backend, chunking strategy, embedding config, LLM provider, query rewriting, reranking, filter chains, guardrails, system prompts, tool gateway rules, ND4J environment tuning. |
| Developer | ND4J framework status, GPU lifecycle, subprocess logs, operation timing, benchmarks, VLM orchestration, SameDiff graph visualization, model debug. |
REST API highlights
The server exposes ~100+ endpoints:
| Endpoint | Purpose |
|---|---|
/api/chat, /api/chat/stream | Conversational RAG (streaming SSE) |
/api/graph-rag/search | Graph-augmented retrieval (local or global) |
/api/unified-crawl/start | Multi-source ingestion with graph extraction |
/api/agents/passthrough/* | Interactive agent terminal sessions over HTTP |
/api/agents/chat/stream | Structured agent chat with RAG augmentation |
/api/retriever/search | Direct vector search (bypass LLM) |
/api/skills | Prompt template CRUD (exposed as MCP prompts) |
/api/mcp/* | MCP server config, tool invocation, audit log |
/api/nd4j/environment | Full ND4J/CUDA runtime tuning |
/api/config/k-app | Vector store, subprocess, and pipeline config |
/api/projects/current | Project manifest and component management |
/api/setup/status | Setup wizard state and staging server management |
/api/fact-sheets | Notebook-style knowledge organization |
Subprocess architecture
Compute-heavy work runs in isolated subprocesses. Ingest, vector population, embedding, model initialization, and training retain their domain lifecycles. Every model-backed data pipeline—including VLM and OCR—runs through the reusable pipeline-serving stdio runtime owned by the MCP host.
This keeps the web server responsive while model processes retain loaded artifacts across compatible requests. Callers never select executables, ports, or subprocess types.
Pluggable modules
The same binary reshapes behavior based on which modules are on the classpath:
| Category | Options |
|---|---|
| Embeddings | Anserini SameDiff (BGE, Arctic Embed, E5), OpenAI, PostgresML, sentence-transformers, SameDiff |
| Vector stores | Anserini (Lucene HNSW), pgvector, Chroma, Vespa |
| LLM providers | OpenAI, Anthropic, Gemini, local SameDiff, CLI agent passthrough, Spring AI |
| Document loaders | PDF (extended + tables), Office, Tika, email, web crawler |
| Data sources | Slack, Confluence, Jira, Notion, Reddit, Google Drive, OneDrive, S3, SFTP, SQL, Discord |
| Chunkers | Token, sentence, recursive-character, markdown, table-aware |
| Graph | Neo4j knowledge graph, entity extraction, community detection |
| Other | KV cache, OCR pipeline, guardrails, filter chain, evaluation harness, training |