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
- Kilo Code CLI installed — follow the official Kilo CLI guide
- An A2Agent API key — sign up at a2agent.me/register to get one
- A model ID listed on the A2Agent Models page
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
Connection error
Connection error
Confirm that the base URL is exactly:
A2Agent models do not appear
A2Agent models do not appear
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;
apiKeyis insideoptions; and- the model ID is spelled correctly.
Model not found
Model not found
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.