Home Tutorials Categories Skills About
ZH EN JA KO
Model Integration

Kilocode Integration Guide

· 4 min read

Kilocode Introduction

Kilocode is an AI service platform focused on code generation and comprehension, offering high-quality code completion, explanation, and refactoring. Integrating Kilocode with OpenClaw enhances your AI assistant's ability to handle programming-related conversations and tasks.

Get API Credentials

  1. Visit the Kilocode website and register
  2. Go to the API management page
  3. Create a new API key
  4. Note the API key and endpoint address

Basic Configuration

{
  "providers": {
    "kilocode": {
      "type": "openai",
      "baseUrl": "https://api.kilocode.ai/v1",
      "apiKey": "{{KILOCODE_API_KEY}}",
      "models": ["kilo-coder-v2", "kilo-chat-v2"]
    }
  }
}
openclaw secrets set KILOCODE_API_KEY "kc-your-api-key"

Model Selection

  • kilo-coder-v2: Optimized for code generation, ideal for technical channels
  • kilo-chat-v2: General conversation model, suitable for everyday chat

Optimize Code Generation Quality

{
  "models": {
    "kilo-coder": {
      "provider": "kilocode",
      "model": "kilo-coder-v2",
      "temperature": 0.1,
      "topP": 0.95,
      "maxTokens": 8192,
      "stopSequences": ["```\n\n"]
    }
  }
}

Low temperature (0.1-0.3) produces more deterministic code output. Higher maxTokens ensures long code blocks are not truncated.

Connection Test

openclaw doctor --provider kilocode

Summary

Kilocode provides professional code generation capabilities for OpenClaw, particularly suited for developer-facing scenarios. With properly tuned model parameters, you can build an efficient programming assistant channel.

OpenClaw is a free, open-source personal AI assistant that supports WhatsApp, Telegram, Discord, and many more platforms