Skip to content

feat: add Kilo Code agent support#1254

Open
michaelzeidler wants to merge 2 commits into
git-ai-project:mainfrom
michaelzeidler:feat/kilo-code
Open

feat: add Kilo Code agent support#1254
michaelzeidler wants to merge 2 commits into
git-ai-project:mainfrom
michaelzeidler:feat/kilo-code

Conversation

@michaelzeidler

@michaelzeidler michaelzeidler commented May 5, 2026

Copy link
Copy Markdown

Kilo Code (https://kilo.ai) is a fork of OpenCode that uses the same plugin API and SQLite database schema, but stores data under different paths (~/.local/share/kilo/kilo.db) and uses its own plugin package (@kilocode/plugin).

Changes:

  • Add checkpoint preset (kilo) with Kilo-specific data paths
  • Add hook installer deploying plugin to ~/.config/kilo/plugins/
  • Add TypeScript plugin adapted for @kilocode/plugin
  • Add Agent::Kilo variant for bash tool classification
  • Register transcript agent (reuses OpenCodeAgent, same DB schema)

Open in Devin Review

@CLAassistant

CLAassistant commented May 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

devin-ai-integration[bot]

This comment was marked as resolved.

@svarlamov

Copy link
Copy Markdown
Member

Thank you for the PR @michaelzeidler! Are there any other differences besides the path? If not, would it make sense to just have the KiloCode preset wrap the opencode preset and allow it to override the paths? And same re the plugin -- maybe even just symlink it in our repo? Not sure how likely they are to diverge in the future, but we try to maintain a single codebase for forks (Ex: vscode/windsurf/cursor IDE extensions share a single codebase)

@michaelzeidler michaelzeidler force-pushed the feat/kilo-code branch 3 times, most recently from 5d497f7 to 1a9892c Compare May 6, 2026 15:50
@michaelzeidler

Copy link
Copy Markdown
Author

Thanks, @svarlamov for the feedback! You're right — the only real differences between Kilo and OpenCode are paths/names. I've refactored to share code:

Preset: Both now delegate to a shared parse_opencode_family() function. Kilo's preset is just a config struct + one-liner:

pub(crate) static KILO_CONFIG: OpenCodeFamilyConfig = OpenCodeFamilyConfig {
    tool_name: "kilo",
    db_filename: "kilo.db",
    data_dir_name: "kilo",
    storage_env_var: "GIT_AI_KILO_STORAGE_PATH",
    bash_agent: Agent::Kilo,
};

impl AgentPreset for KiloPreset {
    fn parse(&self, hook_input: &str, trace_id: &str) -> Result<Vec<ParsedHookEvent>, GitAiError> {
        parse_opencode_family(&KILO_CONFIG, hook_input, trace_id)
    }
}

Installer: Same pattern — shared generate_family_plugin_content() handles placeholder substitution, Kilo just provides a different config.

Plugin: Single template at agent-support/opencode/git-ai.ts with CHECKPOINT_PRESET and PLUGIN_PACKAGE placeholders (alongside the existing GIT_AI_BINARY_PATH). Deleted the separate agent-support/kilo/ directory entirely.

Adding another OpenCode fork in the future would be ~30 lines (config struct + wrapper).

michaelzeidler and others added 2 commits May 13, 2026 13:42
Kilo Code (https://kilo.ai) is a fork of OpenCode that uses the same
plugin API and SQLite database schema, but stores data under different
paths (~/.local/share/kilo/kilo.db) and uses its own plugin package
(@kilocode/plugin).

Changes:
- Add checkpoint preset (kilo) with Kilo-specific data paths
- Add hook installer deploying plugin to ~/.config/kilo/plugins/
- Add TypeScript plugin adapted for @kilocode/plugin
- Add Agent::Kilo variant for bash tool classification
- Register transcript agent (reuses OpenCodeAgent, same DB schema)
…tool

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@michaelzeidler

Copy link
Copy Markdown
Author

hey @svarlamov,
fixed the conflict. Long weekend ahead here in germany, let me know if there is any thing i can do, to get this merged.
Best,
Micha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants