Context, tokens and privacy
Read the Context & tokens gauge and learn how AI Pilot handles long conversations, what it costs and what is sent to your AI provider.
Every request to a model carries the conversation so far: your messages, AI Pilot's steps and their results. This page explains how much of the model's context window a chat uses, what happens when it fills up, what you pay for, and which data leaves your computer.
The Context & tokens gauge
Next to the model picker in the AI Pilot panel sits a small ring. It fills up as the conversation grows, and its label shows how full the model's context window is: – before the first request, then a percentage such as 23%. The ring changes color at 70% and again at 90%. If kaiport doesn't know the model's context window, the label shows the number of tokens instead, for example 18.4k. A ≈ in front means the numbers are estimates.
Click the ring to open Context & tokens:
| Line | What it shows |
|---|---|
| Context window | The tokens of the latest request and response – roughly what the next request has to carry – against the model's limit, with the percentage. limit unknown if kaiport doesn't know the limit. |
| Tokens in this chat | All tokens of the chat so far, split into Input, Output and, if your provider reports them, Cache read and Cache written. |
| Requests and model | How many requests the chat made, and the model it used. |
| Summaries | Appears once older messages were summarized, for example Older messages were summarized 2× to stay within the context window. See below. |
If your provider doesn't report token numbers, the popover says Estimated – the provider does not report token counts. kaiport then estimates about four characters per token. The last line reminds you: “New chat” clears the context.
kaiport learns the context window from the provider: from Anthropic's model information, or from an OpenAI-compatible provider's model list when it includes the value. Otherwise it estimates the window from the model name.
Long conversations
When a conversation fills 70% of the context window, AI Pilot summarizes the older half before the next request. The model condenses what you asked for, what was done, important output and open questions, and the summary replaces the older messages. The recent turns stay word for word. Summarizing costs one extra request, and it only happens when the context window is known.
In any case, AI Pilot sends at most the 80 most recent messages of a conversation, where each tool result counts as a message; older ones are dropped. For a new topic, click New chat: it clears the context and makes requests smaller and cheaper.
Costs
kaiport doesn't charge for model usage and doesn't sell tokens. Your provider bills the tokens on your account at its prices; the gauge shows token counts, not money. Tokens are used by:
- every step of a task, because each request carries the whole conversation, including command output and file excerpts,
- the instructions and system facts sent with each request,
- Test connection, which sends a tiny request,
- automatic summaries of long conversations,
- requests of the editor assistant.
Local models through Ollama or LM Studio cost nothing per token.
What AI Pilot sends to your provider
Requests go directly from your computer to the API URL in your settings. Nothing passes through kaiport's servers. A request contains:
- AI Pilot's instructions, including your Additional instructions and the connection's AI instructions for this connection,
- the connection's name, user name and host; in storage tabs also the storage type, endpoint, region and bucket or container – never passwords or keys,
- the system facts from the check at session start: operating system, host name, user and groups, tools and resources,
- your messages, including the extracted text of attached files,
- the conversation so far: AI Pilot's answers and the results of its steps – command output, screen contents, file listings, search matches and the file contents it read,
- in storage tabs, the folders you are looking at and, if the connection failed, the error message and kaiport's hints.
How your provider handles this data is up to its terms. Check them before you use AI Pilot on confidential systems.
What stays on your computer
- The passwords, keys and tokens stored with your connections. AI Pilot never sees them.
- Passwords you type into the terminal when
sudoor another program asks. AI Pilot never asks for them in the chat, and password prompts don't show what you type. - Your API token. kaiport keeps it encrypted and only uses it to authenticate its requests to your provider.
- The chat history and the audit log, see Where the data is stored.
Control what leaves your computer
Settings → AI Pilot has two settings for file contents:
- Send file contents to the AI – when off, AI Pilot can't read files or search their contents, and the editor assistant can only generate new content. AI Pilot then works with names, sizes and dates only.
- Limit per file (KB) – caps how much of a single file is sent, 64 KB by default. Longer files are shortened to their beginning and end; the content search skips them.
Even with file contents on, the content search never sends whole files, only the matching lines, and its card lists every file it read.
If no data may leave your computer at all, use a local model through Ollama or LM Studio. See Set up AI Pilot.
Where the data is stored
AI Pilot's files are in kaiport's data folder. Settings → About shows its path under Data.
| System | Data folder |
|---|---|
| macOS | ~/Library/Application Support/kaiport |
| Windows | %APPDATA%\kaiport |
| Linux | ~/.config/kaiport |
| File | Contents |
|---|---|
chats.json | The latest conversation of up to 30 connections, each with up to 120 messages – including command output, file excerpts and the text of attachments. The file isn't encrypted. New chat deletes the conversation of that connection. |
ai-audit.jsonl | The audit log, one line per entry. kaiport only appends to it. |
settings.json | The AI Pilot settings. The API token is stored encrypted. |