Skip to content
SupportLogin
Edit on GitHub

Kilo Code

Use Adaption's hosted models and inference stacks as the inference provider in the Kilo Code CLI.

The Kilo Code CLI ships with Adaption as a built-in provider. Hosted models work as soon as Kilo can read your Adaption API key. Inference stacks need one extra provider entry in your Kilo configuration.

You can also connect the Adaption MCP server separately to give Kilo tools for interacting with the Adaption Platform.

Terminal window
npm install -g @kilocode/cli

Check the install with kilo --version. This guide was tested with Kilo 7.8.

  1. Sign in to Adaption.

  2. Open Settings, then API keys.

  3. Create a key and copy it. You will not be able to view the key again.

  4. Export it as ADAPTION_API_KEY so Kilo can read it automatically:

    Terminal window
    export ADAPTION_API_KEY="pt_live_..."

    To keep the key in Kilo’s credential store instead of your shell, run kilo auth login, choose Adaption, and paste the key.

Run kilo auth list to confirm Kilo sees the key. Adaption appears with ADAPTION_API_KEY next to it.

List the Adaption models Kilo knows about:

Terminal window
kilo models adaption

Every entry uses the adaption/<model-id> form, where <model-id> is a model ID from Models. Send a one-off prompt to check the connection:

Terminal window
kilo run -m adaption/glm-5.2 "Explain this repository to me."

In the TUI, run /models and choose an Adaption entry. To make one the default, set the top-level model field in ~/.config/kilo/kilo.jsonc (every project) or kilo.jsonc in a project directory:

~/.config/kilo/kilo.jsonc
{
"$schema": "https://app.kilo.ai/config.json",
"model": "adaption/qwen3.5-397b",
}

API keys are bound to an organization, so no X-Organization-Id header is needed.

An inference stack is a saved configuration of a model, tools, datasets, and memory. You call it with the model ID stack/<slug>, which Adaption shows on the stack’s page and returns as model_id when you list stacks.

Stacks are only served by the Responses API. The built-in Adaption provider sends requests to Chat Completions, so add a second provider that uses the Responses API and list your stacks under it:

~/.config/kilo/kilo.jsonc
{
"$schema": "https://app.kilo.ai/config.json",
"provider": {
"adaption-stacks": {
"name": "Adaption stacks",
"npm": "@ai-sdk/openai",
"env": ["ADAPTION_API_KEY"],
"options": {
"baseURL": "https://api.prod.adaptionlabs.ai/api/v1",
},
"models": {
"stack/support-assistant": {
"name": "Support Assistant",
},
},
},
},
}
  • npm: "@ai-sdk/openai" makes Kilo call the Responses API.
  • env tells Kilo to send ADAPTION_API_KEY as Authorization: Bearer ....
  • Each key in models is sent to Adaption as the model, so it must match the stack’s model_id exactly.

Stacks belong to your account and cannot be discovered automatically. Add one entry per stack you want to use.

Select adaption-stacks/stack/support-assistant in /models, or run it directly:

Terminal window
kilo run -m adaption-stacks/stack/support-assistant "Summarize our open tickets."

See Key concepts for how a stack’s model, tools, datasets, and memory apply to each request.

The inference provider and the Adaption MCP server are separate. To let Kilo call Adaption’s dataset and AutoScientist tools, add the hosted MCP server at https://api.prod.adaptionlabs.ai/api/v1/mcp. See MCP for the complete tool catalog and sign-in steps.

  • The requested model is not available for a stack. The stack was called through the built-in adaption provider, which uses Chat Completions. Call it through the Responses provider from Use an inference stack instead.
  • Model not found: <provider>/<model>. Kilo has no entry for that model. For a stack, add its stack/<slug> under models and confirm with kilo models adaption-stacks. Check kilo config check too, because Kilo ignores a config file it cannot parse.
  • environment references are not allowed in project config. A project kilo.jsonc cannot use {env:...} values. Use the provider’s env field, as in the example above.
  • Requests fail with 401. ADAPTION_API_KEY is not set in the shell that started Kilo, or the key was revoked. Run kilo auth list to check.
  • A request returns 502 or 503. The model provider could not complete the request. Wait and retry; if it persists, check the model’s status in the Adaption app.
  • Models: full list of hosted models, context lengths, and modalities.
  • Generate a model response: conversation state, streaming, tools, and image inputs.
  • MCP: dataset and AutoScientist tools for Kilo’s MCP client.