Skip to content

Start Here: Quick Start ​

Kompile is a folder-first AI coding harness and local knowledge runtime that runs on your own hardware. Any directory on your machine — a code repository, a docs folder, or a research workspace — works as a Kompile project immediately with no database server, Java runtime, or GPU drivers required.

This guide follows the natural progression of using Kompile: from your first lines of code in a folder, to making the harness repeatable and backed by local docs, to taming huge conversations, to working remotely across machines with shared memories.


First, the mental model: your folder is the project ​

Kompile does not require a central server or workspace database. When you run Kompile inside any directory, it keeps that project's state right in the folder while inheriting your personal defaults (sign-ins, global preferences) from ~/.kompile/:

text
~/.kompile/                  # Your global defaults, provider sign-ins, and installed runtimes
my-project/
├── .kompile/                # Auto-created: project memory, guardrails, code index, drafts, logs
├── .mcp.json & AGENTS.md    # Optional: connects external agents and sets repo instructions
└── data/crawls/             # Optional (with local-runtime): local search index + .kgraph files

Switching folders automatically switches memory, rules, code search, and indexed documents. In the browser UI (kompile chat --web), you can open multiple project folders side by side and each stays isolated in its own directory. (For formal manifests or Git-backed knowledge repos, see Projects.)

The harness is agent-configurable ​

You do not have to hand-edit JSON under .kompile/ or memorize slash commands to customize how Kompile behaves. Kompile exposes its own harness internals — setup diagnostics, subagent budgets, guardrails, hooks, skills, roles, sources, and peers — as MCP tools, so you can describe what you want in plain English and let your agent inspect, preview, and apply the configuration for you (with dry-run previews and confirmation gates before anything changes).


Stage 1: "I want to build something in a folder" (first lines of code) ​

Install the lightweight native CLI (cli-harness), sign in once, open any folder, and start working:

bash
# 1. Install the native Kompile CLI (macOS / Linux)
curl -fsSL https://raw.githubusercontent.com/GetKompile/kompile/main/install.sh | bash

# 2. First-time onboarding (sign in to an LLM provider, detect existing agents, import chats)
kompile onboard

# 3. Open any folder and launch chat
cd /path/to/my-project
kompile chat                 # Terminal harness (or `kompile chat --web` for the local browser UI)

(On Windows PowerShell, install with irm https://raw.githubusercontent.com/GetKompile/kompile/main/install.ps1 | iex — see Installation & Updates for channels and offline mirrors.)

Your first session ​

Ask Kompile to inspect your repo or write your first lines of code — for example: "Scaffold a small CLI parser in src/, add a unit test, and run it."

Behind the scenes, Kompile:

  • Reads and edits files in my-project with managed tools and automatic diff tracking.
  • Creates my-project/.kompile/ automatically to store project memory, code indices, and session history.
  • Lets you switch freely between the terminal (kompile chat) and browser (kompile chat --web) against the exact same folder and sessions.

TIP

Already using Codex, Claude Code, Antigravity (agy), Copilot, OpenCode, or Cursor?

  • See Quickstarts by Audience for provider-specific setup and recommended subagent models.
  • To keep using your external agent while giving it Kompile's folder-scoped tools, connect it over MCP (Model Context Protocol) by adding a .mcp.json in my-project (command: "kompile", args: ["mcp-stdio", "--work-dir", "/path/to/my-project"]) — or wrap the agent directly in passthrough mode with kompile chat --agent=claude-code. See MCP Integration.

Stage 2: "I've built something with the harness — now tailor it and add your docs" ​

Once you have real code and a few sessions under your belt, you can shape the harness around your workflow — either by asking your agent directly or by using interactive menus:

Let the agent configure the harness for you ​

Because Kompile's internals are exposed through first-class MCP tools (onboarding, project_config, enforcer_config, policy_enforce, hooks, judge_control, skill_manager, role_manager, sources, peer), you can just ask in plain English:

  • "Inspect my Kompile setup and explain how subagents, guardrails, and LSP are configured."
  • "Cap subagents to 3 workers, ban expensive models for workers, and save our Maven build command to project memory — preview the changes first."
  • "Add a reusable skill for our release checklist and turn on the Enforcer for this repo."

Safety rails are built in: configuration tools default to a dry-run preview (dryRun=true), require your explicit confirmation before changing guardrails or hooks, never expose raw secrets, and block subagents from weakening your rules. See Customizing the Harness Using an Agent for full examples. (Prefer interactive terminal menus or direct slash commands? Use kompile configure, /memory, /skills, /enforcer, draft, /cost, and /usage.)

Bring your docs and local models into the folder (local-runtime) ​

When you also want to search PDFs, Office docs, Markdown, or URLs — or run local LLMs on your own CPU/GPU — install the local-runtime add-on (one command, still zero servers):

bash
kompile install local-runtime

Everything stays under my-project/data/crawls/ and works in both kompile chat / kompile chat --web and kompile mcp-stdio:

  • Local hybrid search (RAG): crawl_documents and crawl_source parse and index 18+ formats (PDF, Office, Markdown, HTML, etc.) using local keyword (BM25) + dense vector search (rag_search / knowledge_search).
  • Portable .kgraph knowledge graphs: Plain vector search finds passages that sound similar to a question, but cannot trace multi-hop relationships or check whether a claim is supported or contradicted. Crawling with local-runtime also extracts named entities (people, services, concepts) and typed relationships into a .kgraph file — a self-contained, portable ZIP archive storing entities, relationships, source excerpts, embeddings, and reasoning models right in your folder. Tools like ask_graph_verify, ask_graph_query, and graph_reason then verify claims (SUPPORTED, REFUTED, or UNKNOWN) with exact source citations. (See Knowledge Graphs & Grounded Reasoning and Walkthrough: Crawling PDFs & Querying Knowledge Graphs.)
  • Local LLMs: Download GGUF models from HuggingFace and serve them locally with kompile local-models (--provider kompile-local). See Local Models & local-runtime.

Stage 3: "My conversations are getting too big — or I'm switching tools and models" ​

Long coding sessions inevitably hit context limits, fill disk with tool logs, or span multiple models and editors. Kompile handles all three inside the harness:

  • Summarize without losing context (/compact & /auto-compact): Run /compact (optionally with focus, e.g. /compact keep the auth plan and failing test IDs) or let /auto-compact trigger automatically near your model's real context window. Kompile summarizes older turns while keeping recent turns intact and re-loading active memories and skills so nothing important is forgotten. See Context Compaction.
  • Inspect and reclaim disk space (/gc): Run /gc in chat (or open /storage in kompile chat --web) for a safe dry-run breakdown of transcripts, tool-call journals, process logs, and caches before opting in to cleanup. See Disk Space & /gc.
  • Resume across models and external CLIs (/resume & /import): Pick up any saved conversation with /resume or kompile resume-all, switch providers mid-project with target-aware compaction, or import existing transcripts from Claude Code, Codex, Antigravity, Cursor, OpenCode, and more. See Import & Resume.
  • Archive huge transcripts without losing searchability (/blob-store): Connect an object or folder archive (S3/R2, mounted drive, or HTTP) so older transcripts pack out of local disk while remaining searchable across sessions.

Stage 4: "I want to run the harness remotely and share conversations & memories across machines" ​

You do not need a heavy database server just to work from a laptop while keeping your memories, transcripts, and GPU models on a workstation:

  • Multi-project browser workspace (kompile chat --web): Run the Web Harness against a folder (or up to 8 project folders side by side) with live streaming, embedded terminal, storage controls, and remote browser access. See The Web Harness.
  • Direct encrypted machine pairing (kompile peer): Pair your laptop, workstation, or GPU box over pinned TLS (kompile peer) with no central cloud server. From one machine you can search and read memories, transcripts, skills, and files stored on a paired peer without copying everything locally — and even call GPU-hosted local models on your workstation.
  • Unified sources (/sources): Register paired peers, S3/R2 /blob-store archives, shared folders (NFS/SMB), GitHub Releases, and external CLI stores in one place so every machine can search, pull, and share conversations, memories, skills, and portable .kgraph files.

For a step-by-step walkthrough of pairing a laptop and workstation over a VPN to share memories, transcripts, and tools, follow Walkthrough: Connecting Peers & Remote Storage (and see Peers & Sources).


OrderPageWhat you'll learn
1Installation & Updatescli-harness vs. local-runtime vs. full, release channels (prerelease/stable), and self-updates
2ProjectsHow <project>/.kompile/, .mcp.json, and optional kompile.project.json organize folder-based projects
3How a Session WorksWhat a real session looks like: sign-in & model selection → chat or resume → how an agent turn runs
4CLI vs. Web HarnessSide-by-side comparison of terminal kompile chat and multi-project browser kompile chat --web
5Standard Daily WorkflowQuota/cost visibility, reusable skills, staging edits with draft, and controlling subagents

Browse Hands-On Walkthroughs for full step-by-step guides (subagents, customizing guardrails, peers, PDFs & .kgraph, Spins, and Extensions).


Need a shared team server or clustered RAG? ​

Solo coding, folder-based persistence, the browser UI (kompile chat --web), local RAG, .kgraph reasoning, local models, and peer-to-peer memory/transcript sharing all run on cli-harness + local-runtime.

When you need a multi-user or distributed server deployment — shared external databases (pgvector, Chroma, Vespa, Neo4j), clustered multi-node crawls, enterprise OAuth connectors, team messaging channels, or custom compiled Spring Boot RAG apps — head to Kompile Server (kompile-app) and Distributed Crawl Cluster.

Released under the Apache-2.0 License.