Use ClickHouse Assistant chat in ClickHouse Cloud

[Edit this page](https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/cloud/guides/AI_ML/AIChat/using_AI_chat.md)

> This guide explains how to enable and use the AI Chat feature in the ClickHouse Cloud Console.

Prerequisites

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

1. You must have access to a ClickHouse Cloud organization with AI features enabled (contact your org admin or support if unavailable).

Open the AI Chat panel

## Open the AI Chat panel[​](#open-panel "Direct link to Open the AI Chat panel")

1. Navigate to a ClickHouse Cloud service.
2. In the left sidebar, click the sparkle icon labeled “ClickHouse Assistant”.
3. (Shortcut) Press `⌘` + `'` (macOS) or `Ctrl` + `'` (Linux/Windows) to toggle open.

Accept the data usage consent (first run)

## Accept the data usage consent (first run)[​](#consent "Direct link to Accept the data usage consent (first run)")

1. On first use you're prompted with a consent dialog describing data handling and third‑party LLM sub-processors.
2. Review and accept to proceed. If you decline, the panel won't open.

Choose a chat mode

## Choose a chat mode[​](#modes "Direct link to Choose a chat mode")

AI Chat currently supports:

- **Agent**: Multi‑step reasoning over schema + metadata (service must be awake).
- **Docs AI (Ask)**: Focused Q&A grounded in official ClickHouse documentation and best‑practice references.

Use the mode selector at the bottom-left of the flyout to switch.

Compose and send a message

## Compose and send a message[​](#compose "Direct link to Compose and send a message")

1. Type your question (e.g. “Create a materialized view to aggregate daily events by user”).
2. Press `Enter` to send (use `Shift` + `Enter` for a newline).
3. While the model is processing you can click “Stop” to interrupt.

Understanding “Agent” thinking steps

## Understanding “Agent” thinking steps[​](#thinking-steps "Direct link to Understanding “Agent” thinking steps")

In Agent mode you may see expandable intermediate “thinking” or planning steps. These provide transparency into how the assistant forms its answer. Collapse or expand as needed.

Starting new chats

## Starting new chats[​](#new-chats "Direct link to Starting new chats")

Click the “New Chat” button to clear context and begin a fresh session.

Viewing chat history

## Viewing chat history[​](#history "Direct link to Viewing chat history")

1. The lower section lists your recent chats.
2. Select a previous chat to load its messages.
3. Delete a conversation using the trash icon.

Working with generated SQL

## Working with generated SQL[​](#sql-actions "Direct link to Working with generated SQL")

When the assistant returns SQL:

- Review for correctness.
- Click “Open in editor” to load the query into a new SQL tab.
- Modify and execute within the Console.

Stopping or interrupting a response

## Stopping or interrupting a response[​](#interrupt "Direct link to Stopping or interrupting a response")

If a response is taking too long or diverging:

1. Click the “Stop” button (visible while processing).
2. The message is marked as interrupted; you can refine your prompt and resend.

Keyboard shortcuts

## Keyboard shortcuts[​](#shortcuts "Direct link to Keyboard shortcuts")

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Action Shortcut|  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | | Open AI Chat `⌘ + '` / `Ctrl + '`| Send message `Enter`| New line `Shift + Enter` | | | | | | | |

- [Prerequisites](#prerequisites)- [Open the AI Chat panel](#open-panel)- [Accept the data usage consent (first run)](#consent)- [Choose a chat mode](#modes)- [Compose and send a message](#compose)- [Understanding “Agent” thinking steps](#thinking-steps)- [Starting new chats](#new-chats)- [Viewing chat history](#history)- [Working with generated SQL](#sql-actions)- [Stopping or interrupting a response](#interrupt)- [Keyboard shortcuts](#shortcuts)

Was this page helpful?