> For the complete documentation index, see [llms.txt](https://docs.cortecs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortecs.ai/integration-examples/coding/kilo-code.md).

# Kilo Code

[**Kilo Code**](https://kilocode.ai/docs/) is one of the most popular coding assistants available today, and it’s completely free as a Visual Studio Code extension. By combining Kilo Code with Cortecs, you can create a privacy-preserving coding assistant. This guide will walk you through the setup.

{% hint style="info" %}
*Before you begin: Make sure you have generated your Cortecs API key. If not, check out our* [*QuickStart*](/quickstart.md) *guide.*
{% endhint %}

## 1. Install Kilo Code

First, install the **Kilo Code** extension in your VS Code. You can find it in the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=kilocode.Kilo-Code). Follow the official installation instructions.

Once installed, you’ll need to configure an **external provider**.

The first thing is to install the extension in your VSCode. See the [official documentation](https://kilocode.ai/install) to see how to do that.

## 2. Connect to cortecs

Cortecs provides **OpenAI-compatible API endpoints**, making it easy to integrate with Kilo Code and many other tools.

Use the following settings to connect Kilo Code to Cortecs:\
– **API Provider:** OpenAI Compatible\
– **Base URL:** <code class="expression">space.vars.DEFAULT\_API\_BASE\_URL</code>\
– **API Key:** Your API Key\
– **Model:** <code class="expression">space.vars.DEFAULT\_CODING\_MODEL</code> (feel free to pick another one from the [catalogue](https://cortecs.ai/serverlessModels))

## 3. (Optional) Enable Local Code Indexing

To improve context awareness, enable [**code indexing**](https://kilocode.ai/docs/features/codebase-indexing). It can be deployed locally, so no code is stored outside of your computer.

1. Start a local Qdrant vector database: docker `docker run -p 6333:6333 qdrant/qdrant`
2. In Kilo Code, click the **Indexing** button in the bottom-right corner (see screenshot).
3. Configure the embedding model:

   – **API Provider:** OpenAI Compatible\
   – **Base URL:** <https://api.cortecs.ai/v1/\\>
   – **API Key:** Your API Key\
   – **Model:** bge-large-en-v1.5 (feel free to pick another one from the [catalogue](https://cortecs.ai/serverlessModels))

   \- **Model dimension:** 1024 (reasonable default)
4. Save the settings and press *Start indexing*.

Once complete, Kilo Code will have full local context of your codebase — without sending data to external servers.

<figure><img src="/files/cAUrvj0QYOfZjPEVMQ7g" alt="" width="188"><figcaption></figcaption></figure>

Enjoy your **privacy-preserving coding assistant** with the power of Cortecs and Kilo Code. Explore other models, tweak the setup to your needs, and join the conversation on our [Discord](https://discord.com/invite/bPFEFcWBhp) to share feedback 👩‍💻👨‍💻
