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.
Install Kilo
Section titled “Install Kilo”npm install -g @kilocode/cliCheck the install with kilo --version. This guide was tested with Kilo 7.8.
Create and export an API key
Section titled “Create and export an API key”-
Sign in to Adaption.
-
Create a key and copy it. You will not be able to view the key again.
-
Export it as
ADAPTION_API_KEYso 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.
Select a model
Section titled “Select a model”List the Adaption models Kilo knows about:
kilo models adaptionEvery 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:
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:
{ "$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.
Use an inference stack
Section titled “Use an inference stack”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:
{ "$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.envtells Kilo to sendADAPTION_API_KEYasAuthorization: Bearer ....- Each key in
modelsis sent to Adaption as themodel, so it must match the stack’smodel_idexactly.
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:
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.
Optional: connect the MCP server
Section titled “Optional: connect the MCP server”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.
Troubleshooting
Section titled “Troubleshooting”The requested model is not availablefor a stack. The stack was called through the built-inadaptionprovider, 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 itsstack/<slug>undermodelsand confirm withkilo models adaption-stacks. Checkkilo config checktoo, because Kilo ignores a config file it cannot parse.environment references are not allowed in project config. A projectkilo.jsonccannot use{env:...}values. Use the provider’senvfield, as in the example above.- Requests fail with
401.ADAPTION_API_KEYis not set in the shell that started Kilo, or the key was revoked. Runkilo auth listto check. - A request returns
502or503. The model provider could not complete the request. Wait and retry; if it persists, check the model’s status in the Adaption app.
Next steps
Section titled “Next steps”- 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.