# AI settings

> Configure agent behavior, AI providers, and the local model server in Kilo Desktop.

- 网址：https://funcoding.ai/agents/kilo-code/desktop/settings/ai/
- 来源：Kilo Code 官方文档原文（英文），MIT 许可，同步于 2026-11-18
- 官方原文：https://kilo.ai/docs/desktop/settings/ai

---
Open settings from the gear at the bottom of the sidebar, and use the search box at the top to filter them. The **AI** settings cover agent behavior, AI providers, and the local model server.

## Agent behavior

The **Agent Behavior** section is where you review and install the [agents](https://funcoding.ai/agents/kilo-code/code-with-ai/agents/using-agents/), [skills](https://funcoding.ai/agents/kilo-code/customize/skills/), and [MCP servers](https://funcoding.ai/agents/kilo-code/automate/mcp/what-is-mcp/) Kilo can use.

Installed items are grouped by type, and you can search them or filter by **Agents**, **MCPs**, or **Skills**. You can also filter by  **Workspace**. Each item shows the workspaces it applies to (such as **All workspaces**) and its author. Expand an item to see its details and to remove it; an MCP also shows whether it's **Connected**. **Refresh** re-checks for changes.

Select **+ Add** to open the **Kilo Marketplace**, where you can browse specialized agents, skills, and MCPs by category and install them. See [Marketplace](https://funcoding.ai/agents/kilo-code/customize/marketplace/) for the full catalog and how installing works.

Before an MCP is installed, Kilo shows exactly what it will add so you can review it:

- For an MCP that runs on your computer, the **Command** it starts and any **Environment** variables.
- For a remote MCP, the server **Address** and any **Headers**.
- When an MCP offers more than one way to run, an **Install method** choice.

A warning explains what kind of access you're granting (for example, *This MCP is started via a command on your computer*). If the MCP's configuration changes after you review it, Kilo refuses the install so you can check the new version first.

If the program an MCP needs isn't installed (for example `npx`), you'll see **This MCP server won't start yet**, with install commands you can copy for your OS. Select **Fix in chat** to have the agent help you install it.

## AI providers

The **AI Providers** section lists your enabled AI providers, and **Add AI Provider** (top-right) connects a new one.

The **Kilo Gateway** is the default path to models. When you're signed in it shows your account email and available balance; when you're signed out, use **Sign in**. Manage your account from the [Account](https://funcoding.ai/agents/kilo-code/desktop/settings/general/#account) section.

Other providers appear below the gateway:

- **Providers you add** — anything you connect with an API key, each with edit and delete actions.
- **System credentials** — some providers (such as **Amazon Bedrock**) connect automatically using credentials already on your machine rather than a stored API key. Expand the card to see the environment variables that were detected (for example, `AWS_PROFILE`). These are managed outside the app, so they can't be edited or removed here.

Local models are managed in the [Local model server](#local-model-server) section.

To add a provider, select **Add AI Provider** and either:

- **Pick a popular provider**. Available providers are **Anthropic**, **DeepSeek**, **OpenAI**, **Google**, **OpenRouter**, and **Vercel AI Gateway**. Paste its **API key** to connect to the provider.
- **Add a Custom AI Provider** for any OpenAI- or Anthropic-compatible endpoint. To enable a custom AI provider, you'll need:
    - The **Provider name**
    - An **API format** (OpenAI Compatible, OpenAI Responses, or Anthropic Messages)
    - The **Base URL**
    - An optional **API key** (only needed when the endpoint requires authentication).
    - The **Model ID(s)** the endpoint exposes. Flag whether each model supports **Reasoning** or **Images**.

    **Advanced settings** adds custom request headers — use `{env:MY_API_TOKEN}` in a header value to pull a secret from the environment.

Hosted models run through the gateway, so signing in is required to use them.

For details on the gateway itself, see [Models & Providers](https://funcoding.ai/agents/kilo-code/gateway/models-and-providers/).

## Local model server

The **Local Model Server** section manages a server that runs models on your own machine and makes them available to Kilo through an OpenAI-compatible endpoint. The toggle at the top starts and stops the server; the status beside it reads **Idle**, **Starting…**, or **Running**.

**System Monitor** shows live **CPU**, **RAM**, and **GPU** usage so you can gauge how much headroom a model has.

**Connect** holds the details an external client needs once the server is running: a copyable **Server Address** (for example `http://127.0.0.1:51009/v1`) and a masked **API Key**. Both read *Unavailable* until the server starts.  **Request info** opens example request URLs and `curl` commands for the endpoints.

**Models** lists the models you've added and lets you configure each one. Select **Add model** and choose:

- **From catalog** — opens the **Local Model Catalog**, where you can browse and download models from Anaconda. See [Model catalog](#model-catalog).
- **Import GGUF** — adds a model from a `.gguf` file on disk.

Once you have models, use **Search models** and the source filter (**All models**, **Catalog models**, or **Imported models**) to narrow the list. Each model shows whether it's **Loaded** or **Not loaded**. Its  menu can **Remove from model server** or reveal the file on disk. For a model you downloaded from the catalog, it can also **Delete downloaded model**, which removes the file from your computer; you can download it again later. Expand a catalog model and select **View in catalog** to open its catalog entry.

### Model catalog

The **Local Model Catalog** lists models available through your Anaconda account. If you aren't signed in, select **Sign in to Anaconda**. Kilo Desktop opens your browser to finish signing in, and the button reads **Waiting for browser…** until you do; select **Cancel** to stop. You can also sign in from [Account](https://funcoding.ai/agents/kilo-code/desktop/settings/general/#account).

- **Recommended Models** suggests **Chat & coding** and **Lightweight models** that suit your machine.
- **Search models** matches names, publishers, descriptions, licenses, tags, and quantizations. The sort button orders the list by **Newest**, **Estimated performance**, **Fastest**, **Largest**, or **Smallest**.
- Each model shows its capabilities (**Chat**, **Tool calling**, **Vision**, **Embedding**) and an estimate of how it runs on your machine, from **Runs Great** to **Too Heavy**, with approximate tokens per second.

Select a model to see its **Details**: a description, **Parameters**, **Context Window**, **License**, **Purpose**, and **Capabilities**. To download it, go to **Add to model server**, choose a quantization (each one shows its file size), and select **Add model**. Kilo Desktop picks the quantization that best fits your hardware by default, and you can't add one that needs more memory than your machine can safely use.

While the file downloads, the model shows **Downloading** with a percentage; select  to cancel. Kilo Desktop checks the finished file before adding it to the server, and the model shows **Added** when it's ready. If a download fails — for example, because there isn't enough disk space — the error appears below the quantization, and you can select **Try again**.

### Model settings

Select a model to open its settings, grouped into **General**, **Sampling**, and **Advanced** tabs. Every control has an automatic default so you only change what you need. After making a change, you can select the  reset button next to a control to return it to the default. Changes save automatically.

**General**

- **Coding tools and instructions** — off by default for faster local inference. Turn it on to give the model the full context and tools that Kilo Code uses by default. This is not advised for the smallest of models and should only be used with models that support tool-calling.
- **Context length** — the maximum number of tokens the model holds at once, including the conversation so far and the response being generated. Larger values use more memory and can slow generation. Ranges from **256** to **1,048,576** tokens.
- **Temperature** — how random the output is. Lower values are more predictable and focused; higher values are more varied and creative. Ranges from **0** to **2**.
- **Max tokens** — the maximum number of tokens the model generates in a single response. Unlimited by default; ranges from **1** to **1,048,576**.

**Sampling**

- **Top P** — limits sampling to the most likely tokens whose probabilities add up to this value (nucleus sampling). Lower values keep output focused; higher values allow more variety. Ranges from **0** to **1**.
- **Top K** — limits sampling to this many of the most likely tokens; **0** removes the limit. Ranges from **0** to **100**.
- **Min P** — drops tokens whose probability is below this fraction of the most likely token's probability. Ranges from **0** to **1**.
- **Repetition penalty** — discourages repeating the same sequences of tokens. Higher values penalize repetition more; **1** disables it. Ranges from **0** to **2**.
- **Presence penalty** — nudges the model toward tokens it hasn't used yet, encouraging new topics; **0** disables it. Ranges from **0** to **2**.

**Advanced**

- **Extra Arguments** — pass `llama.cpp` flags exactly as you would on the command line (for example `--n-gpu-layers 99`). Matching flags override the settings in the other tabs; app-managed flags are refused.

### Runtime settings

**Runtime** controls how the server itself runs:

- **Server port** — leave blank to pick an available port automatically or enter a specific port.
- **Models kept loaded** — keep **One model** loaded to save memory, or **All models** you use.
- **Serve on local network** — let trusted devices on your Wi-Fi or LAN connect.

See [Local inference](https://funcoding.ai/agents/kilo-code/desktop/features/local-inference/) for how local models appear in chats.
