> For the complete documentation index, see [llms.txt](https://docs.kiloiot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kiloiot.io/ai-assistant/managing-chats-and-ai-access.md).

# Managing Chats and AI Access

Start new chats, revisit history, track your request allowance, and connect your own model key in Kilo IoT.

The Kilo AI Assistant works alongside you as you configure devices and automation. Open it using **AI Chat** in the sidebar. This page covers the workspace around the conversation itself — starting and revisiting chats, the request allowance that comes with your plan, and connecting your own model when you'd rather not work against that allowance.

## Starting a new chat

The **New Chat** action in the assistant’s top bar opens a fresh conversation. Because the assistant keeps the context of a conversation as you go — so you can refine a task across several messages — start a new chat when you move to an unrelated task, so earlier context doesn't carry over into work where it doesn't belong.

## Chat history

The top bar also opens **Chat history**, a list of your past conversations with the most recent first. Each conversation is titled from its content; one without a title yet shows as **Untitled chat**. Select any entry to reopen it and pick up where you left off. Your history persists across sessions and is scoped to you and your current organization — switch organizations and you see that workspace's conversations. Before you've chatted, the panel reads **No conversations yet**.

## Deleting a conversation

In Chat history, **Delete conversation** requests removal of that conversation. The interface has no undo, so save anything you need first. This action is separate from account closure and from handling copies already sent to a model provider. See [Privacy and Security](/ai-assistant/privacy.md) for a request covering those copies.

## Your request allowance

The assistant is part of the platform and includes a monthly allowance of AI requests that scales with your plan — higher tiers include more. Your remaining allowance is shown above the message input, so you always know where you stand.

When you reach the limit, the assistant tells you you've **reached your AI assistant limit**. The rest of the platform is unaffected — you can still monitor alarms, manage devices, and work through the regular interface. To keep using the assistant for building rules, diagnostics, and automation, either upgrade your plan or connect your own model key, which is not subject to the allowance.

## Connecting your own AI

<figure><img src="https://2057878315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtNQh1wBSHSaknslMdOXm%2Fuploads%2Fgit-blob-2ba8ad82fa94e60cc6ec43e5d91a679c300677e7%2Fai-connect-your-model.jpg?alt=media" alt="The Connect your AI panel — provider, base URL, API key, and model ID"><figcaption></figcaption></figure>

Connect your own provider account when you need a particular model or want AI usage billed under your existing provider contract. Chats that use your connection do not consume the AI request allowance included with your Kilo plan.

Before you start, obtain an API key from your provider. The provider endpoint must be reachable from Kilo; an address available only inside your private network will not connect.

To connect:

1. Open **AI Chat**, then select **Connect your AI**.
2. Choose **OpenAI**, **Anthropic**, **OpenRouter**, **Ollama**, or **Custom (OpenAI compatible)** under **Provider**.
3. Review the prefilled **Base URL**. Change it only when you use a self-hosted endpoint or an internal gateway that Kilo can reach.
4. Enter the **API Key**. Kilo treats it as a secret and masks it in the form. Every provider requires a key, including Ollama.
5. Enter the provider's exact model identifier under **Model ID**, or select one of the suggestions.
6. Select **Check connectivity**. Save the connection only after the panel reports **Connected**.
7. Select **Save**.

### Getting the Model ID right

Kilo sends the Model ID to the provider exactly as entered, so it must match the provider's catalog character for character. The field offers suggestions, but you can use any model that the provider makes available to your account.

**Ollama identifiers carry a version tag.** Ollama names a model `name:tag` — `gpt-oss:120b`, `gemma4:31b` — and the tag is part of the identifier rather than an optional suffix. Leave it off and the model is not found. Two more things specific to Ollama: the prefilled Base URL is Ollama Cloud, and most of the Ollama Cloud catalog needs a paid subscription on your Ollama account. The suggested identifiers do not.

**OpenRouter identifiers are namespaced** — `vendor/model`, such as `anthropic/claude-sonnet-4-6`.

### Checking the connection before you save

**Check connectivity** sends a real request to the provider. The panel reports **Connected** or **Not connected** and explains common failures:

| Message                                                                                      | Meaning                                                       | What to do                                                        |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------- |
| the provider rejected the API key                                                            | The key is incorrect, revoked, or belongs to another account. | Create or copy a valid key from the selected provider.            |
| the provider denied this key access to the model — check that your provider plan includes it | The key is valid, but its account cannot use the model.       | Choose a model included in the provider plan or update that plan. |
| the provider does not serve this model — check the model id                                  | The Model ID is not in the provider's catalog.                | Correct the ID. For Ollama, include the version tag.              |
| this model has been retired by the provider — pick a current one                             | The provider has withdrawn the model.                         | Select a current model.                                           |
| the provider refused the request for billing reasons — check the account behind this key     | Billing or a spending limit is blocking the provider account. | Resolve the account issue with the provider.                      |
| the provider is rate limiting this key — try again in a moment                               | The provider is temporarily limiting requests for the key.    | Wait, then check the connection again.                            |
| could not reach AI provider                                                                  | Kilo cannot reach the Base URL.                               | Check the address and make the endpoint reachable from Kilo.      |

Once saved, the panel shows the active Base URL, masked key, and Model ID. Your own model now serves new chats without using the platform allowance. Return to **Connect your AI** to update or disconnect it.

## Where to go next

* [Working With the Assistant](/ai-assistant/querying-your-data.md) — ask questions about your live deployment
* [Building With the Assistant](/ai-assistant/building-with-ai.md) — have it provision devices and author rules
* [Privacy and Security](/ai-assistant/privacy.md) — what the assistant can and can't see


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kiloiot.io/ai-assistant/managing-chats-and-ai-access.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
