Skip to content
kaiport

Set up AI Pilot

Connect AI Pilot to Anthropic, an OpenAI-compatible API or a local model, choose a model and adjust Autopilot, file access and limits.

AI Pilot needs a model to work with, and you bring your own: an API key from Anthropic or another provider, or a model running on your computer. This page shows how to connect it in Settings → AI Pilot, what the other AI Pilot settings do and how to give AI Pilot rules for a single connection.

What you need

  • kaiport Pro. You can fill in the settings on this page without it; AI Pilot itself needs Pro.
  • An API key from a provider, or a local model server such as Ollama or LM Studio.
  • A model that supports tool calling (also called function calling). AI Pilot does all its work through tool calls.

Your provider bills model usage on your account; it isn't part of kaiport Pro.

Connect a provider

  1. Open Settings → AI Pilot: click Settings in the start window, or press ⌘,Ctrl,.
  2. Under Provider, click your provider, for example Anthropic or OpenAI. This fills in the API URL.
  3. Paste your key into API token. For a local model server, leave it empty.
  4. Click Load models and choose a model under Model.
  5. Click Test connection and wait for Connection successful – the model responds.
  6. Click Save.
Settings → AI Pilot
Settings with the AI Pilot section: provider buttons, API URL, API token, model and the further optionsSettings with the AI Pilot section: provider buttons, API URL, API token, model and the further options

Settings → AI Pilot

Provider presets

ProviderAPI URLAPI typeToken
Anthropichttps://api.anthropic.comAnthropic Messages APIrequired
OpenAIhttps://api.openai.com/v1OpenAI-compatiblerequired
OpenRouterhttps://openrouter.ai/api/v1OpenAI-compatiblerequired
Groqhttps://api.groq.com/openai/v1OpenAI-compatiblerequired
Mistralhttps://api.mistral.ai/v1OpenAI-compatiblerequired
DeepSeekhttps://api.deepseek.com/v1OpenAI-compatiblerequired
Togetherhttps://api.together.xyz/v1OpenAI-compatiblerequired
Ollama (local)http://localhost:11434/v1OpenAI-compatibleToken can stay empty
LM Studio (local)http://localhost:1234/v1OpenAI-compatibleToken can stay empty

Other providers and gateways with an OpenAI-compatible API work too, for example a vLLM server: enter their base URL in API URL.

Anthropic or OpenAI-compatible: detected from the URL

kaiport speaks two kinds of API: Anthropic's Messages API and the OpenAI-compatible chat completions API. You don't pick the kind yourself; kaiport recognizes it from the URL:

  • api.anthropic.com is Anthropic.
  • A URL that starts with one of the preset URLs gets that preset's type.
  • URLs that end in /v1, contain /openai, or name OpenRouter, Groq, Mistral, DeepSeek, Together, Ollama or LM Studio (also localhost:1234 and localhost:11434) are OpenAI-compatible.
  • Any other URL, such as a company proxy, keeps the type that was selected before.

For a proxy, click the matching preset first – Anthropic for a Claude proxy, OpenAI for an OpenAI-compatible gateway – and then replace the URL. When the type changes, kaiport clears the model list, because those models belong to the other API.

API URL and token

API URL is the base address of the API. For OpenAI-compatible APIs, kaiport calls /models and /chat/completions below it, so include a version part such as /v1 if your provider uses one. For Anthropic, keep https://api.anthropic.com unless you go through a proxy.

API token is your API key. kaiport stores it encrypted with your system's keychain (macOS Keychain, Windows DPAPI, Linux Secret Service) and never displays it again. Once a token is stored, the field stays masked and says A token is stored. Leave empty to keep it. To replace the key, type the new one and click Save. Settings → About shows under Encryption whether the system keychain is available; without it, secrets are only encoded.

Model

Load models asks the provider for its model list, using the URL and token currently in the form. On success kaiport reports how many models it loaded; if the model you had chosen isn't in the new list, it selects the first one.

The Model field is a searchable list: type part of a name to filter it. If a model is missing from the list, type its full ID and choose the entry shown in quotes to use it anyway. The loaded list is saved with the settings, and it is what the model picker in the AI Pilot panel offers.

Test connection

Test connection sends a tiny request to the model – "Reply with the single word: OK" – with the values currently in the form, so you can test before you save. The request carries AI Pilot's real tool definitions. That way the test checks what a real chat needs: the URL, the token, access to the model and whether the model accepts tool definitions.

The result appears below the fields: Connection successful – the model responds. or Test failed: followed by the provider's error message. The button is available once API URL and Model are filled in.

Save and availability

Save stores provider, URL, token and model together; the button becomes active as soon as you change one of them. kaiport confirms with AI settings saved.

AI Pilot becomes available – in terminal and storage tabs and in the editor – once the saved settings contain a model, an API URL and a token. Only URLs with localhost or 127.0.0.1 work without a token; Anthropic always needs one. Until then, the section shows AI Pilot becomes available in the terminal once URL, token (if needed) and model are saved., and the AI Pilot panel shows Set up an AI provider with a button to Open settings.

Anthropic (Claude)

With Anthropic, kaiport uses Anthropic's official SDK and the streaming Messages API.

  • Token: an Anthropic API key (sk-ant-…).
  • API URL: https://api.anthropic.com. Change it only for a proxy.
  • Models: Load models lists the models your key can use.
  • Thinking: on models that support adaptive thinking, kaiport turns it on, and Claude decides how much to think about each step. A summary of its thinking appears in the chat as a collapsible Reasoning block.
  • Context window: kaiport asks Anthropic for the model's context window, so the context gauge in the panel shows an exact percentage.
  • Creativity (temperature) isn't sent to Anthropic; Claude uses its default.

OpenAI-compatible APIs

For all other providers, kaiport uses the OpenAI-compatible chat completions API. It sends the token as a bearer token, streams the answer and asks the server to report token usage; servers without that option still work, and the token counts are then estimated. If the provider streams the model's reasoning, it appears as a Reasoning block. The context window comes from the provider's model list when it includes one (OpenRouter does, for example); otherwise kaiport estimates it from the model name.

Local models

With Ollama or LM Studio, your requests stay on your computer.

  1. Start the model server and download or load a model that supports tool calling.
  2. In Settings → AI Pilot, click Ollama (local) or LM Studio (local).
  3. Leave API token empty.
  4. Click Load models and choose the model.
  5. Click Test connection, then Save.

kaiport only accepts an empty token for URLs with localhost or 127.0.0.1. If the model server runs on another computer in your network, enter a token: the one your server expects, or any placeholder if it doesn't check tokens.

Other AI Pilot settings

These settings take effect as soon as you change them; they don't need Save.

SettingDefaultWhat it does
AutopilotoffDefault for new chats: run commands without asking. Potentially dangerous commands always require confirmation. You can switch Autopilot per chat in the panel.
Send file contents to the AIonAllows AI Pilot to read files, search their contents and use the editor assistant on a file's text. When off, AI Pilot works with names, sizes and dates only.
Limit per file (KB)64How much of one file's content is sent at most, 4 to 4096 KB. Larger files are shortened; the editor assistant's Edit mode rejects them.
Creativity (temperature)0.20 to 2; higher values make answers more varied. Only sent to OpenAI-compatible APIs.
Max. steps per request30How many rounds of tool calls AI Pilot may make for one message, 1 to 100. When it reaches the limit, it stops; send a message such as "continue" to let it go on.
Additional instructionsemptyText appended to AI Pilot's instructions in every chat and in the editor assistant, for example Always use apt instead of apt-get.
AI audit log–View log shows every command and file operation of AI Pilot, see the audit log.

For what file contents mean for your privacy, see Context, tokens and privacy.

Instructions for one connection

Some rules only apply to one server: "this is production", "the web root is /var/www". Store them with the connection:

  1. In the start window, open the connection's menu (…) and choose Edit.
  2. Switch to the AI tab.
  3. Write your rules into AI instructions for this connection.
  4. Click Save.

AI Pilot adds these instructions to its system prompt whenever it works in a tab of this connection. The AI tab exists for SSH connections; storage connections don't have it. The same tab holds Denied commands (AI) and Allowed commands (AI), see Approvals and safety.

Choose the model per chat

The model in the settings is the default. The toolbar of the AI Pilot panel has a model picker that switches the model for the chat in that tab. It offers the models you loaded with Load models. Provider, URL and token always come from the settings, so the picker switches between models of the same provider. New tabs start with the default model, and the editor assistant always uses the default model.

When something goes wrong

MessageWhat to check
Invalid API key (401). or HTTP 401: …The token is wrong or was revoked. Paste a new one and click Save.
Rate limit reached (429) – please wait a moment. or HTTP 429: …Your provider limits the number of requests. Wait a moment, or check your plan with the provider.
Could not load models: …URL or token is wrong, or the local model server isn't running.
Test failed: …Read the provider's message after the colon. A model without tool calling usually fails here.
The model sent nothing for 120s – the connection was dropped.The provider stopped sending data. Send your message again.
Empty response from the model. …The provider declined or filtered the request. Rephrase it or send it again.
Claude declined the request (…).Claude refused the request. Rephrase it.