Skip to content

Agent Architecture

Kilo Code

Kilo Code is a multi-surface open-source coding agent spanning VS Code, JetBrains, CLI, cloud agents, MCP marketplace, code reviews, and specialized modes. The current connector row is extension-oriented, but the page must preserve the CLI and JetBrains overlap explicitly.

Source reviewed #14Checked 2026-07-06
Run type
Extension
Adapter
ts-plugin
Source
OSS · Kilo-Org/kilocode
Stars
★ 27k

Archive Context

This page is one host entry inside the full architecture archive and keeps multi-surface products visible instead of collapsing them into a single run type.

42 host archive
Host page
kilo
Run cohort
Extension: 4
Archive route
/agents

Host Surface Perspectives

The host is the primary architecture boundary. Each runnable surface below separates what the host owns from what agent-connector can safely install for Kilo Code.

1 surface entry

Extension

extension
Host entry
An IDE extension host runs inside VS Code, JetBrains, or another editor and receives workspace/editor context through that host's extension APIs.
Host owns
The editor owns activation, command palette placement, sidebar/chat UI, extension storage, trust prompts, and workspace permission boundaries.
Connector role
agent-connector targets documented extension-readable config, MCP, commands, skills, rules, and memory files without claiming control of the IDE. Current wired connector surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
Implementation consequence
Extension surfaces must distinguish file-backed connector artifacts from UI affordances that only the editor or marketplace extension can expose. No visible host-native gap is currently tracked for this surface.

Verified Architecture

Source-checked on 2026-07-06. These notes are intentionally separate from the generated surface matrix below.

Sequence #14

Source pass

Current source review findings are kept as the first architecture section so readers can separate external evidence from the generated local coverage model.

  • Kilo is presented as an agentic engineering platform, and the same repository backs both the VS Code extension and Kilo CLI rows.
  • The extension row is therefore linked to Kilo's shared backend conventions, while form factor metadata keeps it separate from the CLI adapter id.
  • Because Kilo Code and Kilo CLI share source lineage, marketplace and ts-plugin claims must be scoped to the specific adapter id shown on the page.

Runtime boundary

The current adapter row is an extension surface, while the public product spans VS Code, JetBrains, and CLI. agent-connector should show Kilo as multi-surface host nature without assuming all surfaces share one writable configuration model.

  • The README presents Kilo Code as available in VS Code, JetBrains, and CLI.
  • The CLI is described as forked from OpenCode, which is architecture evidence but not proof of identical file paths.
  • Cloud Agent and review surfaces are host workflows outside the local extension runtime.

MCP registration

Kilo advertises an MCP marketplace, so MCP should be treated as a first-class extension path. The connector must still identify whether a server is registered through the VS Code extension, JetBrains plugin, CLI, or cloud surface before claiming implementation.

  • Marketplace-backed MCP is a distribution concern as well as a tool registration concern.
  • A multi-IDE host can expose the same conceptual MCP feature through different storage layers.

Hook bridge

The current connector matrix treats Kilo as a TypeScript-plugin style host. Hook documentation should describe the extension/plugin bridge and avoid assuming the same hook contract applies to the CLI fork or cloud agent until those runtimes are tested separately.

  • Plugin host events and local CLI events are separate runtime boundaries.
  • Autonomous mode and code review automation are host behaviors, not necessarily connector hook events.

Content surfaces

Kilo's public modes include Code, Plan, Ask, Debug, and Review, and the product also advertises custom workflow features. The page should show those as host-native content surfaces while keeping agent-connector skills, commands, and memory tied to verified adapter paths.

  • Mode names are a useful teaching bridge between editor UX and agent architecture.
  • KiloClaw and cloud-agent naming should be represented as host affordances, not generic connector subagents.

Marketplace and host-only affordances

Kilo's MCP marketplace, multi-IDE distribution, CLI lineage, cloud agent, and code-review surfaces make it a strong example of product-family architecture. The coverage matrix needs to show which of those are host-native versus agent-connector implemented.

  • VS Code, JetBrains, and CLI should remain visible as separate surface labels.
  • The OpenCode lineage is relevant to plugin architecture but should not replace Kilo-specific source review.

Host-specific shape

Kilo Code is the VS Code extension sibling of Kilo CLI: it shares the Kilo backend conventions and uses a ts-plugin bridge with MCP, commands, skills, subagents, and memory.

  • Form factor: Extension.
  • Native surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
  • Wired surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
  • Visible gaps: none.

Hooks

Hooks enter through a generated plugin module that the host loads in its own runtime.

MCP

The adapter writes this host's native MCP registration dialect, including its root key, scope, transport fields, and environment syntax.

Memory

Managed memory text is written into the rules or memory file this host actually reads, with ownership markers for reversible uninstall.

Marketplace and affordances

A marketplace or plugin-driver path is wired, so install/update/uninstall can be driven rather than only emitted as files.

  • Runtime handlers: none.
  • User-visible affordances: Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary..

Known Limits

  • Do not assume Kilo CLI, VS Code, JetBrains, and cloud surfaces share one config path.
  • MCP marketplace availability should be separated from local adapter implementation.
  • OpenCode lineage is evidence to investigate, not a substitute for Kilo-specific runtime verification.

Architecture Diagram

Host-specific flow for the Extension surface.

ts-plugin
Host-owned architecture flowHost surfaceExtensionRuntimets-pluginNative artifactsMCP + hooks + content + memoryConnector boundaryplugin bridgeUser surfacecmds + skills + agents + memoryagent-connector writes only documented host artifacts; the host owns the agent loop.
  1. 1
    Entry point: Extension

    IDE extension host reads extension global storage and workspace-scoped files while the editor owns activation and UI.

  2. 2
    Connector package

    defineConnector package declares server, hooks, content, memory, and actions.

  3. 3
    Adapter module: kilo

    ts-plugin renderer at src/adapters/kilo/index.ts.

  4. 4
    Native host artifacts

    Adapter writes MCP config + plugin module + content files + memory/rules + marketplace bundle through this host's native file, package, or marketplace surface.

  5. 5
    Runtime boundary

    host loads generated TypeScript plugin bridge

  6. 6
    User-visible surface

    Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary.

  7. 7
    Coverage ceiling

    6/6 native surfaces wired. No visible host-native gap in the current coverage matrix.

Component Diagram

Static parts of the Kilo Code integration and which side owns each one.

Components and ownershipKilo Code hosthostagent-connector packageconnectorkilo adapterts-pluginNative artifactsartifactsRuntime bridgeruntimeUser-visible surfaceuser
  • Kilo Code host

    Extension surface owns the model loop, UI shell, config discovery, and native lifecycle for this integration.

  • agent-connector package

    Normalizes connector declarations into MCP, hook, memory, content, and action payloads before delegating to a host adapter.

  • kilo adapter

    Implements the ts-plugin translation layer in src/adapters/kilo/index.ts.

  • Native artifacts

    Adapter writes MCP config + plugin module + content files + memory/rules + marketplace bundle through this host's native file, package, or marketplace surface.

  • Runtime bridge

    host loads generated TypeScript plugin bridge

  • User-visible surface

    Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary.

Runtime Sequence Flow

Message order from install to runtime for the Extension surface.

User / projectagent-connectorkilo adapterKilo CodeAgent runtimeCoverage matrix1. Choose host adapter2. Resolve connector declaration3. Render host-native shape4. Host loads artifacts5. Run through host boundary6. Expose remaining ceiling
  1. 1 · User / project
    Choose host adapter

    Install or update starts against Kilo Code; the selected surface is Extension.

  2. 2 · agent-connector
    Resolve connector declaration

    The package reads connector metadata and routes it to the kilo adapter instead of exposing a generic host contract.

  3. 3 · kilo adapter
    Render host-native shape

    Adapter writes MCP config + plugin module + content files + memory/rules + marketplace bundle through this host's native file, package, or marketplace surface.

  4. 4 · Kilo Code
    Host loads artifacts

    host loads generated TypeScript plugin bridge

  5. 5 · Agent runtime
    Run through host boundary

    Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary.

  6. 6 · Coverage matrix
    Expose remaining ceiling

    6/6 native surfaces wired. No visible host-native gap in the current coverage matrix.

Architecture Archive

The same five study axes are rendered for every host: runtime shape, hooks, MCP, memory, and host-only affordances.

Host-specific shape

Kilo Code is the VS Code extension sibling of Kilo CLI: it shares the Kilo backend conventions and uses a ts-plugin bridge with MCP, commands, skills, subagents, and memory.

  • Form factor: Extension.
  • Native surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
  • Wired surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
  • Visible gaps: none.

Hooks

Hooks enter through a generated plugin module that the host loads in its own runtime.

MCP

The adapter writes this host's native MCP registration dialect, including its root key, scope, transport fields, and environment syntax.

Memory

Managed memory text is written into the rules or memory file this host actually reads, with ownership markers for reversible uninstall.

Marketplace and affordances

A marketplace or plugin-driver path is wired, so install/update/uninstall can be driven rather than only emitted as files.

  • Runtime handlers: none.
  • User-visible affordances: Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary..

Special Feature Inventory

Host-specific capabilities separated from the generic surface matrix: lifecycle hooks, MCP registration, memory/rules, marketplace delivery, and UI or content affordances owned by the host.

Lifecycle hooks

Wired

Hooks enter through a generated plugin module that the host loads in its own runtime.

MCP registration

Wired

The adapter writes this host's native MCP registration dialect, including its root key, scope, transport fields, and environment syntax.

Memory and rules

Wired

Managed memory text is written into the rules or memory file this host actually reads, with ownership markers for reversible uninstall.

Marketplace delivery

Driver wired

A marketplace or plugin-driver path is wired, so install/update/uninstall can be driven rather than only emitted as files.

Host-only affordances

3/3 wired

Wired host affordances: Commands, Skills, Subagents. Host-native gaps: none. Not confirmed: Statusline handler, Action affordances.

Source Review Notes

Latest source pass for host-specific architecture details. This is separate from generated adapter coverage and local drift guards.

Checked 2026-07-06Open review source
Kilo-Org/kilocode repository
  • Kilo is presented as an agentic engineering platform, and the same repository backs both the VS Code extension and Kilo CLI rows.
  • The extension row is therefore linked to Kilo's shared backend conventions, while form factor metadata keeps it separate from the CLI adapter id.
  • Because Kilo Code and Kilo CLI share source lineage, marketplace and ts-plugin claims must be scoped to the specific adapter id shown on the page.

Evidence Map

Each host page ties public source evidence to the local adapter and drift guards that keep the rendered archive aligned with code.

Public source: Kilo-Org/kilocode

Primary public repository or product source used for current host status and source links.

external
Open source

Local adapter implementation

Defines the install/uninstall behavior, native config rendering, capability flags, and any runtime parse/format bridge for this host.

local
src/adapters/kilo/index.ts

Platform metadata and host-native matrix

Records the form factor, public source target, ranking source, native host surfaces, and current agent-connector coverage cells.

local
site/src/platform-data.ts

Architecture drift guard

Asserts that every registered host has a page, diagram, host-specific brief, source link, form-factor band, and adapter-aligned surface data.

local
tests/docs/platform-drift.test.ts

Marketplace driver registry

Shows this host has a drivable package/plugin install path beyond direct native-file writes.

local
src/core/marketplace-drivers/registry.ts

Runtime Shape

The host loads a generated TypeScript plugin module that bridges in-process host events to the connector runtime.

MCP registration
Wired through this adapter
Hook bridge
Wired

Connector Surfaces

Static content

MCP server, Hooks, Commands, Skills, Subagents, Memory

Runtime handlers

No runtime handler surfaces wired

Surface Matrix

Wired means agent-connector installs it now. Host native marks support we know about but have not wired yet.

SurfaceStatus
MCP server
Static content
agent-connector installs this surface today.
Wired
Hooks
Static content
agent-connector installs this surface today.
Wired
Commands
Static content
agent-connector installs this surface today.
Wired
Skills
Static content
agent-connector installs this surface today.
Wired
Subagents
Static content
agent-connector installs this surface today.
Wired
Memory
Static content
agent-connector installs this surface today.
Wired
Statusline handler
Runtime handler
No confirmed host-native surface.
N/A
Action affordances
Runtime handler
No confirmed host-native surface.
N/A