Skip to content

Installable Client Harnesses (agy, claude, codex, opencode, pi, gemini) ​

Kompile can run its own agentic loop directly against cloud or local models — and it can install and drive external coding-agent CLIs as clients inside your workspace.

Rather than repackaging third-party binaries, Kompile maintains a built-in catalog (cli-agents.json) backed by HarnessInstaller that runs each vendor's official installer on demand (or via /install), verifies the resulting binary, wires up MCP tools and guardrails, and tells you how to sign in.


Installable Harnesses at a Glance ​

HarnessBinary / Registry IDInstall command (/install or auto-install)How Kompile drives it as a clientMCP & GuardrailsSign-in commandQuickstart
Antigravityagy (agy-cli)/install agy — official antigravity.google/cli/install.{sh,ps1}Long-lived agy acp stdio session (--provider gemini --auth native, --mode passthrough --agent agy, or ACP preset agy)Shared ~/.gemini/config/mcp_config.json, AgyNativeToolGuard redirecting file/shell/search to mcp_kompile_*, live agy models discoverykompile auth login agyAntigravity (agy)
Claude Codeclaude (claude-cli)/install claude — official claude.ai/install.{sh,ps1}Native stream-json client (--provider anthropic --auth native), managed passthrough (--agent claude), or ACP preset claude-acp (claude-code-acp)--mcp-config, --allowedTools, .mcp.json, PreToolUse / Stop hooks, Enforcer, Judge, prompt-cache retentionclaude auth login or kompile auth login anthropic --oauthClaude Users
OpenAI Codexcodex (codex-cli)/install codex — official chatgpt.com/codex/install.{sh,ps1} (CODEX_NON_INTERACTIVE=1)Direct Responses API + live codex app-server discovery (--provider openai --auth oauth), managed passthrough (--agent codex), or ACP preset codex-acpNon-destructive -c MCP injection, prompt_cache_key, Enforcer, Judge, worker tieringcodex login or kompile auth login openai --oauthCodex Users
OpenCodeopencode (opencode-cli)/install opencode — official opencode.ai/install (Unix) / npm install -g opencode-ai (Windows)Native client (--provider opencode), managed passthrough (--agent opencode), or ACP preset opencode (opencode acp)Live opencode models --verbose catalog, OPENCODE_CONFIG_CONTENT Kompile-only worker surface, Console vs. subscription /usageopencode auth login or kompile auth login opencodeOpenCode Users
Pipi (pi-cli)/install pi — npm install -g @earendil-works/pi-coding-agentMeta-provider (pi --list-models, Pi native messages / stream-json) or managed passthrough (--agent pi)Live --list-models catalog; Kompile session history, reminders, and orchestrationpi—
Gemini CLIgemini (gemini-cli)/install gemini — npm install -g @google/gemini-cliGeneric ACP v1 preset gemini (gemini --experimental-acp) or passthrough (for Kompile's first-party Google route, use Antigravity (agy))mcpSupported: true in catalog, stream-json / --experimental-acpgeminiAntigravity (agy)

NOTE

Standalone ACP adapters (claude-code-acp, codex-acp): Kompile's ACP v1 client also ships built-in presets for claude-acp (claude-code-acp) and codex-acp (codex-acp). Those adapter binaries are installed separately via their upstream packages; for first-class Claude and Codex usage inside Kompile, /install claude and /install codex are all you need.


Installing, Upgrading & Inspecting Harnesses ​

Inside Chat (/install) ​

/install works in both Standard Chat and Managed Passthrough:

text
/install                  # list all 6 catalog harnesses with installed/missing status and interactive picker
/install agy              # install Google Antigravity CLI
/install claude           # install Anthropic Claude Code CLI
/install codex            # install OpenAI Codex CLI
/install opencode         # install OpenCode CLI
/install pi               # install Pi coding agent
/install gemini           # install Gemini CLI
/install agy --force      # re-run the official vendor installer to upgrade or repair

What HarnessInstaller does during /install:

  1. Runs the vendor's official installer (with a 15-minute safety timeout) and streams installer output live into your chat.
  2. Checks standard vendor install directories automatically — even if your current shell PATH hasn't been refreshed yet:
    • Unix: ~/.local/bin, ~/.opencode/bin, ~/.npm-global/bin
    • Windows: ~/.local/bin, %LOCALAPPDATA%\Programs\OpenAI\Codex\bin, %LOCALAPPDATA%\agy\bin, %APPDATA%\npm
  3. Verifies the installed binary (15-second version probe) and prints the exact sign-in command.

Exact Vendor Install Commands (macOS / Linux & Windows) ​

These are the exact commands Kompile executes from cli-agents.json (you can run /install <agent> inside chat, or run any of these directly in your shell):

macOS / Linux ​

bash
# Antigravity (agy)
curl -fsSL https://antigravity.google/cli/install.sh | bash

# Claude Code (claude)
curl -fsSL https://claude.ai/install.sh | bash

# OpenAI Codex (codex)
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# OpenCode (opencode)
curl -fsSL https://opencode.ai/install | bash

# Pi (pi)
npm install -g @earendil-works/pi-coding-agent

# Gemini CLI (gemini)
npm install -g @google/gemini-cli

Windows (PowerShell) ​

powershell
# Antigravity (agy)
irm https://antigravity.google/cli/install.ps1 | iex

# Claude Code (claude)
irm https://claude.ai/install.ps1 | iex

# OpenAI Codex (codex)
irm https://chatgpt.com/codex/install.ps1 | iex

# OpenCode (opencode)
npm install -g opencode-ai

# Pi (pi)
npm install -g @earendil-works/pi-coding-agent

# Gemini CLI (gemini)
npm install -g @google/gemini-cli

Onboarding & Diagnostics from the Shell ​

bash
kompile onboard           # first-run wizard: detect installed harnesses, auth, import history
kompile explain           # show detected harness binaries, auth state, MCP, LSP, and limits

On-Demand Auto-Install vs. Manual / Air-Gapped Mode ​

By default, selecting or delegating to an uninstalled harness that declares a vendor installer downloads it automatically on first use (HarnessInstaller.ensureInstalled).

For air-gapped machines or strict change control, disable automatic downloads and install harnesses explicitly with /install <agent>:

bash
export KOMPILE_DISABLE_AUTO_INSTALL=1
# or pass JVM property:
# -Dkompile.harness.autoInstall=false

Two Ways Kompile Uses an Installed Harness as a Client ​

Once a harness is installed, you can drive it in two complementary modes depending on how tightly you want Kompile's tooling integrated:

1. First-Class Native & Managed Passthrough Routes ​

Best for daily coding with Antigravity (agy), Claude Code, Codex, and OpenCode:

bash
# Managed passthrough (vendor CLI inside Kompile's TUI with MCP tools, memory, and guardrails)
kompile chat --mode passthrough --agent agy
kompile chat --mode passthrough --agent claude
kompile chat --mode passthrough --agent codex
kompile chat --mode passthrough --agent opencode

# Direct / native provider routes (Kompile's standard loop + vendor auth/session transport)
kompile chat --provider gemini --auth native      # runs via agy acp
kompile chat --provider anthropic --auth native   # runs via Claude Code CLI
kompile chat --provider openai --auth oauth       # runs via ChatGPT/Codex OAuth
kompile chat --provider opencode                  # runs via OpenCode CLI

First-class routes give you vendor-specific login (kompile auth login ...), live model catalog discovery, MCP tool injection, tool guards/hooks, and /usage account quota tracking.

2. Generic ACP v1 Client Mode (--acp-command / /acp) ​

Best when you want to talk to any ACP v1 coding agent over standard stdio JSON-RPC 2.0 — including agy, opencode, gemini, claude-code-acp, codex-acp, or another kompile acp instance:

bash
kompile chat --acp-command agy
kompile chat --acp-command opencode
kompile chat --acp-command "my-custom-agent acp"

Or switch live inside any chat session with /acp presets and /acp connect <preset|command>. Kompile enforces strict workspace root containment on client fs/* and terminal/* callbacks. See ACP v1 (Server & Client) for the full protocol, preset list, and editor setup.


Per-Harness Notes ​

  • Antigravity (agy): Kompile's first-party Google/Gemini CLI client. Runs over a long-lived agy acp process with unlimited turn duration, AgyNativeToolGuard redirecting native file/shell/search tools to mcp_kompile_*, and shared ~/.gemini/config/mcp_config.json.
  • Claude Code (claude): Uses Anthropic's official standalone installer (claude.ai/install.{sh,ps1}). Kompile injects .mcp.json / --mcp-config, installs PreToolUse and Stop enforcement hooks, and supports named multi-account credentials.
  • OpenAI Codex (codex): Uses OpenAI's official installer (chatgpt.com/codex/install.{sh,ps1}). Supports ChatGPT subscription OAuth, live codex app-server model discovery, and non-destructive -c MCP injection without overwriting your global Codex config.
  • OpenCode (opencode): Works both via its native CLI (opencode run --format json + opencode models --verbose) and over ACP v1 (opencode acp), with separate /usage meters for Console (opencode/) and subscription (opencode-go/) models.
  • Pi (pi): Installed via npm (@earendil-works/pi-coding-agent); exposes a multi-provider model catalog (pi --list-models) usable inside Kompile Chat.
  • Gemini CLI (gemini): Installed via npm (@google/gemini-cli). Available via /install gemini and the gemini ACP preset (gemini --experimental-acp); for Kompile's primary Gemini route, prefer Antigravity (agy).

  • ACP v1 (Server & Client) — Running kompile acp for editors and connecting to external ACP agents via /acp.
  • Installation & Updates — Installing Kompile itself (portable JBang, native, local-runtime, full platform) and managing release channels.
  • Quickstarts by Audience — Step-by-step setup guides for Codex, Claude, Antigravity (agy), GitHub Copilot, OpenCode, and API routers.
  • Import & Resume — Importing existing transcripts from 11 external CLIs/IDEs and resuming across vendors.

Released under the Apache-2.0 License.