Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 37
Glossary 12

Tools

Kilo Code + Gonka AI — AI-Agent in VS Code

Kilo Code is an open-source AI agent extension for VS Code that autonomously writes and edits code, runs terminal commands, and reads and fixes dozens of files at once. The project combines the strengths of Cline and Roo Code and is evolving as a unified agent platform: in addition to the IDE extension, there are options for JetBrains and CLI. The key feature is modes (agents): Code (writes code), Plan (also known as Architect — plans architecture without edits), Debug (finds the causes of errors), and Ask (answers project-related questions). You can also create your own modes.

The problem is the same as with any agent — token consumption. Kilo Code sends file context, command output, and step history to the model; a single task can easily consume 10-100M tokens. At Anthropic prices ($3-15 per 1M), this amounts to $30-1500 per session — impractical for everyday use.

JoinGonka Gateway reduces the cost hundreds and thousands of times: the same session costs $0.01-1.00. Since Kilo Code is open-source and supports any OpenAI-compatible endpoint (as well as Anthropic-format with a custom base URL), connecting our gateway is a matter of a single setting. This transforms Kilo Code from an expensive demonstration into an everyday tool.

Step 1: Install Kilo Code and Get Your Key

Installing Kilo Code: in VS Code open Extensions (Ctrl+Shift+X), search for "Kilo Code" and click Install. After installation, a Kilo Code icon will appear in the sidebar. The extension is also available in Open VSX for builds without a Marketplace.

JoinGonka API Key: if you don't have an account yet — register at gate.joingonka.ai/register, get 3M free tokens and create a key with the jg- prefix in Dashboard → API Keys. The same key works for both the OpenAI format (/v1) and the Anthropic format (/v1/messages) — the balance is shared.

Step 2: Configure Kilo Code (OpenAI Compatible)

The easiest way is to configure it with a one-command installer. For CLI/file tools, it will automatically register the JoinGonka provider (baseUrl, models), and for UI tools, it will show you the ready-to-use values for insertion:

npx @joingonka/setup --tool kilo

The installer is universal (if no flag is provided, it will offer a list of tools to choose from), will ask for your jg-… key, and perform a live check against the gateway once configured. It does not touch other settings. Below is the manual method if you prefer to set it up yourself.

Manual setup (Plan B)

Open the Kilo Code panel and go to the provider settings via the gear icon.

Method A — OpenAI Compatible (recommended). In the modern version of the extension, open Settings (gear icon) → Providers tab → bottom button Custom provider and fill in the dialog:

  • Provider ID: any identifier, for example joingonka.
  • Display name: for example JoinGonka Gonka.
  • Base URL: https://gate.joingonka.ai/v1
  • API key: jg-your-key
  • Models: add MiniMaxAI/MiniMax-M2.7. Kilo automatically fetches the list of models from the /v1/models endpoint — you can select a model from the list instead of entering it manually.

Click Submit — the models will appear in the picker. In the old interface (VSCode Legacy), the path is shorter: API ProviderOpenAI Compatible, then the Base URL, API Key, and Model fields with the same values.

Method B — Anthropic format. Our gateway also responds to the Anthropic API. Select API ProviderAnthropic, paste the jg-your-key key, check "Use custom base URL" and specify https://gate.joingonka.ai (without /v1 — Kilo will add /v1/messages itself).

Models and their output limits (all three are available right now):

ModelContextMax Output
MiniMaxAI/MiniMax-M2.7 (default)200K8192
deepseek-ai/DeepSeek-V4-Flash-0731380K32768
zai-org/GLM-5.3-Flash390K8192

In the custom provider dialog, you can set Max Output Tokens and Context Window for each model — set the values from the table for the chosen model.

Verification: in the Kilo Code chat, in Code mode, type "Create a hello.py file with a hello world function". The agent should suggest a diff for approval and create the file. By default, Kilo Code asks for confirmation before every action — this can be relaxed by allowing auto-execution for trusted operations.

Comparison of Agentic Session Costs

Kilo Code is an agentic tool: it doesn't just reply, it performs tasks entirely — reads files, writes code, runs tests, fixes bugs. Each step is an API call, and tokens accumulate quickly. Let's compare the cost of typical sessions via Anthropic Claude and via our gateway to the Gonka network:

TaskTokensAnthropic ClaudeJoinGonka Gonka
Simple bug-fix~5M$15 — $75$0.048
New feature (2–3 files)~20M$60 — $300$0.19
Module refactoring~50M$150 — $750$0.48
Full dev session (4h)~100M$300 — $1,500$0.96

Through JoinGonka Gateway, input costs ~$0.0069 per 1M tokens, output is about three times more expensive — this is hundreds and thousands of times cheaper than Anthropic and OpenAI. Kilo Code becomes an everyday tool: you can run it for every ticket, every bug, and every feature without counting costs. With Anthropic prices, you have to weigh every run.

Model parameters: MiniMax M2.7 has a 200K token context window and 8192 token max response length (DeepSeek V4 Flash has 380K and up to 32768, GLM-5.3 Flash has 390K and up to 8192). Kilo Code may request more, but the gateway will limit the output to the model's upper ceiling. For long generations, the agent breaks the work into steps.

Modes and tool calling

A strong point of Kilo Code is its modes (called modes in the old extension, agents in the new one), which you can switch between via a dropdown, the /agents command, or the Ctrl+. hotkey:

  • Plan / Architect — discuss and design a solution without touching files. Convenient to run via GLM-5.3 Flash — the reasoning model thinks before responding, and planning consumes a lot of context, but on our gateway, it costs pennies.
  • Code — default mode: writes and edits code, applies diffs, runs commands.
  • Debug — purposefully searches for the cause of a bug via logs and stack traces.
  • Ask — answers questions about the codebase without changes.

The separate Orchestrator mode in recent versions is deprecated: agents with full access to tools can now launch sub-tasks (subagents) themselves, without a dedicated orchestrator. Custom modes for your scenarios are also supported.

Tool calling: our gateway forwards native OpenAI function calling and Anthropic tool_use, and the selected models (MiniMax M2.7, DeepSeek V4 Flash, GLM-5.3 Flash) support tool invocation. This means the Kilo Code agent loop — reading a file, editing, running a command, indexing the codebase — works reliably on our models, without fragile parsing of text responses.

Kilo Code + Gonka = an open AI agent for VS Code with Plan/Code/Debug modes for pennies. A development session costs about $0.10 instead of $300–1500 with Anthropic, and the starting tokens allow you to try it without a card.

Want to learn more?

Explore other sections or start earning GNK right now.

Get free tokens →