Skip to content

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 ​

bash
# 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:8081

2. 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:

json
{
  "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):

bash
kompile crawl start /path/to/docs/ \
  --graph \
  --graph-model-provider=anthropic \
  --graph-schema-mode=LENIENT

kompile crawl status --watch
Schema modeTrade-off
NONEMaximum recall — extracts whatever entity/relation types the LLM finds. Can be noisy.
LENIENTGuided — follows your schema when possible and allows new types. Good default.
STRICTMaximum 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:

bash
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 browser

4. Generate a custom self-contained application ​

Package a tailored Spring Boot RAG or pipeline server with only the modules you need:

bash
# Interactive wizard
kompile build app --wizard

# Or generate from a preset
kompile build app --configName=myapp --preset=hosted-llm-rag
If you want...PresetWhat you get
Quick start with a hosted LLMhosted-llm-ragOpenAI LLM + local embeddings + PDF loader
AI agents that know your codecli-agent-ragClaude/Codex passthrough + local embeddings + file tools
Fully local, no API keyssamediff-ragLocal SameDiff embeddings + local LLM, nothing external
Small self-contained appliteChat + RAG + Graph RAG in a minimal footprint
EverythingfullAll modules — LLMs, embeddings, vector stores, OCR, graphs, training
Inference pipelines onlypipelinePipeline executor with SameDiff, ONNX, and Python steps
Minimal hosted setupminimalOpenAI embeddings + OpenAI LLM + local Anserini vector store
bash
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 -Pnative

See 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 ​

text
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 ​

ScreenWhat it does
Chat (default)Conversational RAG with streaming, source attribution, multi-turn history, token metrics. Supports RAG mode and agent mode.
KnowledgeDocument ingestion from 20+ sources, knowledge graph builder with entity/relationship browsing, fact sheets, graph visualization.
Code ProjectsRegister code repositories, trigger semantic indexing, browse code graphs, manage project context for agent sessions.
ToolsConfigure 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.
SettingsVector store backend, chunking strategy, embedding config, LLM provider, query rewriting, reranking, filter chains, guardrails, system prompts, tool gateway rules, ND4J environment tuning.
DeveloperND4J framework status, GPU lifecycle, subprocess logs, operation timing, benchmarks, VLM orchestration, SameDiff graph visualization, model debug.

REST API highlights ​

The server exposes ~100+ endpoints:

EndpointPurpose
/api/chat, /api/chat/streamConversational RAG (streaming SSE)
/api/graph-rag/searchGraph-augmented retrieval (local or global)
/api/unified-crawl/startMulti-source ingestion with graph extraction
/api/agents/passthrough/*Interactive agent terminal sessions over HTTP
/api/agents/chat/streamStructured agent chat with RAG augmentation
/api/retriever/searchDirect vector search (bypass LLM)
/api/skillsPrompt template CRUD (exposed as MCP prompts)
/api/mcp/*MCP server config, tool invocation, audit log
/api/nd4j/environmentFull ND4J/CUDA runtime tuning
/api/config/k-appVector store, subprocess, and pipeline config
/api/projects/currentProject manifest and component management
/api/setup/statusSetup wizard state and staging server management
/api/fact-sheetsNotebook-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:

CategoryOptions
EmbeddingsAnserini SameDiff (BGE, Arctic Embed, E5), OpenAI, PostgresML, sentence-transformers, SameDiff
Vector storesAnserini (Lucene HNSW), pgvector, Chroma, Vespa
LLM providersOpenAI, Anthropic, Gemini, local SameDiff, CLI agent passthrough, Spring AI
Document loadersPDF (extended + tables), Office, Tika, email, web crawler
Data sourcesSlack, Confluence, Jira, Notion, Reddit, Google Drive, OneDrive, S3, SFTP, SQL, Discord
ChunkersToken, sentence, recursive-character, markdown, table-aware
GraphNeo4j knowledge graph, entity extraction, community detection
OtherKV cache, OCR pipeline, guardrails, filter chain, evaluation harness, training

Released under the Apache-2.0 License.