Skip to main content
Kilo Code CLI supports custom providers through its kilo.json configuration file. After adding A2Agent, you can select a model using the Kilo model picker and run coding tasks directly from your terminal.

Prerequisites

Setup

1

Install Kilo Code CLI

Create the configuration directory:
Create or edit the global configuration file:
2

Add A2Agent as a custom provider

Add the following configuration:
Replace YOUR_A2AGENT_KEY with your A2Agent API key.The API key is written directly into the local Kilo configuration. You do not need to set OPENAI_API_KEY, OPENAI_BASE_URL, or complete a separate login flow.Use the exact model IDs currently shown on the A2Agent Models page. The model IDs above are examples and may change.If your file already contains other providers, add a2agent inside the existing provider object instead of replacing the entire file.
3

Start Kilo Code CLI

Go to the project you want to work on:
Start Kilo:
4

Select or switch models

Open the model picker:
Select the a2agent provider, then choose a configured model.For example:
5

Run a task and verify the connection

Enter a task in the Kilo session:
You can also run a one-shot task:
If Kilo returns a response, the A2Agent connection is working.

Troubleshooting

Kilo reached A2Agent, but the API key was rejected.
  • Confirm that the key is a valid A2Agent API key.
  • Make sure the complete key was copied.
  • Check for extra spaces or line breaks.
  • Do not use an OpenAI API key.
  • Confirm that apiKey is inside the a2agent provider’s options object.
Confirm that the base URL is exactly:
Check that:
  • the file is located at ~/.config/kilo/kilo.json;
  • the JSON syntax is valid;
  • the Provider ID is a2agent;
  • the provider uses @ai-sdk/openai-compatible;
  • at least one model is listed;
  • apiKey is inside options; and
  • the model ID is spelled correctly.
After editing the file, close and restart Kilo.
The model ID must match an available A2Agent model exactly.Check the current list at:https://a2agent.me/modelsThen update the corresponding entry under models and, if necessary, the default model value.