Skip to content

Kilo Code Setup Guide

An open-source AI coding agent for VS Code, JetBrains, and CLI, with 500+ models through Xiaomai API.

Website: https://kilo.ai | GitHub: https://github.com/Kilo-Org/kilocode | Docs: https://kilo.ai/docs

Overview

Kilo Code is an open-source AI coding agent for VS Code, JetBrains IDEs, and the command line. It supports custom APIs through an OpenAI-compatible interface. After configuring Xiaomai API, you can use Claude, GPT, Gemini, and other model families for code generation, debugging, and refactoring.

Supported Environment

  • VS Code: installed through extension
  • JetBrains: installed through plugin
  • CLI: command-line usage

Features

  • Multiple modes: Architect, Code, Debug, and other dedicated modes
  • Orchestrator mode: splits complex tasks and coordinates sub-agents
  • 500+ models: access many models through an OpenAI-compatible interface
  • Custom agents: define dedicated agents with .kilo/agents/*.md
  • Cross-platform: VS Code, JetBrains, and CLI share the same configuration style

Install Kilo Code

VS Code

  1. Open VS Code and press Ctrl + Shift + X
  2. Search for Kilo Code
  3. Click Install

JetBrains

  1. Open Settings -> Plugins -> Marketplace
  2. Search for Kilo Code
  3. Click Install and restart the IDE

CLI

bash
npm install -g @anthropic-ai/kilo

Get a Xiaomai API Key

  1. Sign in to the Xiaomai API console
  2. Create a new key and choose the auto token group
  3. Copy and save the key, such as sk-xxxx

Tip

If you do not have an account, register first, then create a key.

Configure Xiaomai API

Kilo Code supports both UI and configuration-file setup. The UI path is recommended first.

  1. Open the Kilo Code panel and choose Use your own API key
  2. In the Provider dropdown, choose OpenAI Compatible
  3. Fill in:
FieldValue
Base URLhttps://xiaomai.win/v1
API KeyYour Xiaomai API key, such as sk-xxxx
ModelModel ID, such as claude-sonnet-4-20250514
  1. Save

Common Model IDs

  • claude-sonnet-4-20250514 - Claude Sonnet 4
  • claude-opus-4-20250514 - Claude Opus 4
  • gemini-2.5-pro - Gemini 2.5 Pro
  • gpt-5.4 - GPT-5.4

Method 2: Configuration File

Kilo Code uses kilo.jsonc.

Configuration File Locations

  • Global config: ~/.config/kilo/kilo.jsonc
  • Windows: C:\Users\用户名\.config\kilo\kilo.jsonc
  • Project config: kilo.jsonc in the project root, with higher priority

Security

Do not commit a configuration file that contains an API key to Git. Environment variables are recommended for secrets.

Start Using

After configuration:

  1. Open the Kilo Code panel in VS Code
  2. Choose a working mode, such as Code, Architect, or Debug
  3. Enter your request. Kilo Code can read and write files and run commands

Working Modes

  • Code: daily coding and direct file edits
  • Architect: architecture design with planning before execution
  • Debug: analyze errors and fix them
  • Orchestrator: split complex tasks and coordinate multiple agents

FAQ

API key is invalid

  • Confirm the key was copied correctly, in sk-xxxx format
  • Confirm account balance is sufficient
  • Confirm Base URL is https://xiaomai.win/v1

Model request failed

  • Check whether the network can access https://xiaomai.win
  • Confirm the model ID is spelled correctly
  • Try another model

More Questions

Read the FAQ or contact support.

Friendly, practical, and reliable AI coding support