> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Notebooks with ClickStack

> AI-powered investigation notebooks for ClickStack

export const galaxyOnClick = eventName => () => {
  try {
    if (typeof window !== "undefined" && window.galaxy && eventName) {
      window.galaxy.track(eventName, {
        interaction: "click"
      });
    }
  } catch (e) {}
};

export const BetaBadge = ({link, galaxyTrack, galaxyEvent}) => {
  if (link) {
    return <a href={link} target="_blank" rel="noopener noreferrer" className="betaBadge" onClick={galaxyTrack && galaxyEvent ? galaxyOnClick(galaxyEvent) : undefined}>
                <Icon />
                <span>Beta</span>
            </a>;
  }
  return <div className="betaBadge">
            <Icon />
            <span>
                Beta feature. 
                <u>
                    <a href="/docs/beta-and-experimental-features#beta-features">
                        Learn more.
                    </a>
                </u>
            </span>
        </div>;
};

export const Image = ({img, alt, size}) => {
  return <Frame>
      <img src={img} alt={alt} />
    </Frame>;
};

AI Notebooks are an interactive investigation tool in ClickStack that combines an AI agent with manual analysis. You can describe an issue in plain language, and the AI agent will query logs, traces, and metrics on your behalf — surfacing relevant data, charts, and summaries as a series of tiles. You can also add your own tiles (charts, tables, searches, and markdown notes) alongside the AI-generated output, building a complete record of an investigation.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/RhEK5rhPj_7m6pWY/images/use-cases/observability/hyperdx-notebook-hero.png?fit=max&auto=format&n=RhEK5rhPj_7m6pWY&q=85&s=72c78cf9ad56fe4038d3f25a06f473ad" alt="AI Notebook investigating a Visa cache full outage" size="lg" width="1440" height="900" data-path="images/use-cases/observability/hyperdx-notebook-hero.png" />

<Info>
  **Managed ClickStack only**

  AI Notebooks are only available in Managed ClickStack deployments.
</Info>

<h2 id="setup">
  Setup
</h2>

AI Notebooks are currently in beta in ClickHouse Cloud. AI models and providers are managed automatically by the platform.

Before using AI Notebooks:

1. **Generative AI enabled** — A team admin must enable the Generative AI consent toggle. See [Enabling Generative AI](#enabling-generative-ai).
2. **Notebook access** — Your role must have read/write permissions for Notebooks.

Once enabled, the **Notebooks** entry appears in the left sidebar for everyone with the appropriate role.

<h2 id="enabling-generative-ai">
  Enabling Generative AI
</h2>

A team admin must enable the Generative AI consent toggle before notebooks (and other AI features) can be used.

1. Navigate to **Team Settings > Security Policies**.
2. Toggle **Generative AI** to on.
3. Review and accept the consent dialog.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/RhEK5rhPj_7m6pWY/images/use-cases/observability/hyperdx-notebook-ai-consent.png?fit=max&auto=format&n=RhEK5rhPj_7m6pWY&q=85&s=12c00544f98977d1cf52397b4c3a9a8a" alt="Generative AI toggle in Team Settings" size="lg" width="887" height="40" data-path="images/use-cases/observability/hyperdx-notebook-ai-consent.png" />

<h2 id="using-notebooks">
  Using AI Notebooks
</h2>

<h3 id="creating-a-notebook">
  Creating a notebook
</h3>

1. Select **Notebooks** from the left sidebar.
2. Click **New Private Notebook** (visible only to you) or **New Shared Notebook** (visible to your team).

The notebook list page shows all notebooks you have access to. You can filter by name, tags, or toggle between **My Notebooks** and **All Notebooks**.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/RhEK5rhPj_7m6pWY/images/use-cases/observability/hyperdx-notebook-list.png?fit=max&auto=format&n=RhEK5rhPj_7m6pWY&q=85&s=4e4c3bee3152d9d7a6f9513825f9173f" alt="Notebook list page" size="lg" width="1440" height="900" data-path="images/use-cases/observability/hyperdx-notebook-list.png" />

<h3 id="running-investigation">
  Running an AI investigation
</h3>

At the bottom of a notebook, enter a prompt describing what you want to investigate — for example, *"Why did error rates spike in the checkout service over the last hour?"*

Press **Send** (or hit Enter). The AI agent will:

1. Examine your available data sources.
2. Run search and aggregation queries against your logs, traces, and metrics.
3. Produce a series of tiles showing its thought process, the queries it ran, intermediate charts, and a final summary with conclusions.

Each step appears as a tile in the notebook. **Thought process** tiles show the reasoning behind each query, and **Output** tiles contain the agent's conclusions and optional charts. Unlike a standard AI chat, notebooks let you see exactly what data the AI is working with at each step — so you can verify its reasoning, spot interesting leads it may have overlooked, and [branch](#branching) the investigation to steer it in a different direction.

While an investigation is running, you can click **Stop** to cancel it.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/RhEK5rhPj_7m6pWY/images/use-cases/observability/hyperdx-notebook-tiles.png?fit=max&auto=format&n=RhEK5rhPj_7m6pWY&q=85&s=1215130ad6bf925b48643639e96ae219" alt="Notebook with AI-generated tiles" size="lg" width="1728" height="899" data-path="images/use-cases/observability/hyperdx-notebook-tiles.png" />

<h3 id="branching">
  Branching an investigation
</h3>

As the AI investigates, you may notice an intermediate step that surfaces something interesting — but the agent continued down a different path. **Branching** lets you restart from that point with a different prompt, without losing the original investigation path.

To create a branch:

1. Expand a thought process tile and click **Restart from Here**.
2. In the dialog, enter a modified prompt that steers the investigation in the new direction.
3. Click **Interrupt & Create Branch**. The AI starts a new investigation branch from that point.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/RhEK5rhPj_7m6pWY/images/use-cases/observability/hyperdx-notebook-branch-modal.png?fit=max&auto=format&n=RhEK5rhPj_7m6pWY&q=85&s=e360d6733a9fcc41cb1b342a15e40eb6" alt="Create New Branch dialog" size="md" width="620" height="317" data-path="images/use-cases/observability/hyperdx-notebook-branch-modal.png" />

Once a tile has multiple branches, left and right arrow buttons appear on the tile header with a badge (e.g. **1/2**) indicating how many branches exist. Click the arrows to switch between branches.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/RhEK5rhPj_7m6pWY/images/use-cases/observability/hyperdx-notebook-branching.png?fit=max&auto=format&n=RhEK5rhPj_7m6pWY&q=85&s=bbcf0a882e068a5cbacdd4dedd3a156b" alt="Branch navigation arrows and 1/2 badge on a tile" size="lg" width="1635" height="33" data-path="images/use-cases/observability/hyperdx-notebook-branching.png" />

<h3 id="manual-tiles">
  Adding manual tiles
</h3>

In addition to AI-generated tiles, you can add your own analysis blocks using the buttons at the bottom of the notebook:

| Button       | Shortcut | Description                                                                                                               |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| **Search**   | `S`      | A log/trace search view, equivalent to the search page.                                                                   |
| **Chart**    | `L`      | A time series line chart, using the same visualization builder as [Dashboards](/clickstack/features/dashboards/overview). |
| **Table**    | `T`      | A tabular aggregation view.                                                                                               |
| **Markdown** | `M`      | Freeform text for notes, hypotheses, or conclusions.                                                                      |

After adding a tile, it opens in inline edit mode where you can configure the data source, filters, and aggregations — the same interface used when building [dashboard visualizations](/clickstack/features/dashboards/overview#creating-visualizations). Click **Save** to finalize the tile.

Manual tiles are added below the last visible tile in the current branch. You can resize tiles vertically by dragging their bottom edge.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/RhEK5rhPj_7m6pWY/images/use-cases/observability/hyperdx-notebook-manual-tiles.png?fit=max&auto=format&n=RhEK5rhPj_7m6pWY&q=85&s=a66b4c5331e841120daf52d02b709e30" alt="Manual tile buttons at the bottom of a notebook" size="lg" width="1358" height="109" data-path="images/use-cases/observability/hyperdx-notebook-manual-tiles.png" />

<Note>
  If an AI investigation is currently running, adding or editing a manual tile will cancel the investigation. A confirmation dialog will appear before proceeding.
</Note>

<h3 id="sharing-organizing">
  Sharing and organizing
</h3>

* **Private vs. Shared** — Toggle the lock icon in the notebook header to switch between private (only you) and shared (visible to the team). Only the notebook creator can change this setting.
* **Tags** — Add tags to notebooks for easy filtering on the list page.
* **Naming** — Click the notebook title to rename it. If you start an investigation on an untitled notebook, the AI will suggest a name automatically.

<h3 id="custom-agent-context">
  Custom agent context
</h3>

Team admins can provide additional context that is included in every AI notebook investigation for the team. This is useful for giving the AI background on your system architecture, naming conventions, or known issues.

To configure this:

1. Navigate to **Notebooks** from the left sidebar.
2. Open **Agent Settings** (available to team admins).
3. Enter your custom context (up to 50,000 characters) and save.

This context is appended to the AI's system prompt for all notebook investigations across the team.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/RhEK5rhPj_7m6pWY/images/use-cases/observability/hyperdx-notebook-agent-context.png?fit=max&auto=format&n=RhEK5rhPj_7m6pWY&q=85&s=02ffa88f900e7ea86c32a41a01476a0a" alt="Agent Settings panel for custom context" size="lg" width="1440" height="900" data-path="images/use-cases/observability/hyperdx-notebook-agent-context.png" />
