Skip to content

Commit 049ffb3

Browse files
authored
Merge pull request #6288 from ClickHouse/improve-agent-docs
2 parents 6788d95 + bec64dc commit 049ffb3

50 files changed

Lines changed: 330 additions & 165 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/cloud/features/10_AI_ML/agents/builder/code-interpreter.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,34 @@ doc_type: 'reference'
99
---
1010

1111
import BetaBadge from '@theme/badges/BetaBadge';
12+
import Image from '@theme/IdealImage';
13+
import runCode from '@site/static/images/cloud/agent-builder/run-code/run-code.png';
1214

1315
<BetaBadge/>
1416

1517
The code interpreter lets an agent execute code in a managed sandbox. Use it for computation, data transformation, format conversion, plotting, and anything else better done in code than in natural language.
1618

17-
## Enable it {#enable-it}
19+
## Enable the code interpreter {#enable-it}
1820

19-
Toggle **Code interpreter** in the Agent Builder's capabilities section, then save. The agent decides when to run code based on the user's request and the agent's instructions.
21+
In the Agent Builder, enable **Run Code** in the **Capabilities** section, then save. The agent decides when to run code based on the user's request and the agent's instructions.
22+
23+
<Image img={runCode} alt="Run Code section of the Capabilities panel with the Run Code checkbox enabled and an Upload to Code Environment button" size="sm"/>
2024

2125
## Supported languages {#supported-languages}
2226

2327
The sandbox is a Unix environment with two general-purpose runtimes and a few shell utilities:
2428

25-
- **Python 3** — the default for data tasks.
26-
- **Node.js (JavaScript)** — when an agent prefers JS for the job.
27-
- **Bash** and **sh** — shell scripting for chaining commands and quick I/O.
28-
- **AWK** and **sed** — line-oriented text processing.
29-
- **bc** — arbitrary-precision math.
29+
- **Python 3** - the default for data tasks.
30+
- **Node.js (JavaScript)** - when an agent prefers JS for the job.
31+
- **Bash** and **sh** - shell scripting for chaining commands and quick I/O.
32+
- **AWK** and **sed** - line-oriented text processing.
33+
- **bc** - arbitrary-precision math.
34+
35+
Agents reach for Python first for anything involving data parsing, transformation, or computation.
3036

31-
Agents reach for Python first for anything involving data parsing, transformation, or computation. Reserve the shell tools for tasks that genuinely benefit from a one-liner.
37+
:::tip
38+
Reserve the shell tools for tasks that genuinely benefit from a one-liner.
39+
:::
3240

3341
## Files {#files}
3442

@@ -42,10 +50,15 @@ Plan-specific resource limits (memory, files per run, monthly request quotas) ap
4250

4351
## When to use it {#when-to-use-it}
4452

45-
- Parse a CSV or JSON the user uploaded.
46-
- Compute summary statistics or run a quick simulation.
47-
- Convert between formats (Parquet, JSON, CSV).
48-
- Generate a plot from query results.
49-
- Anything where deterministic computation beats LLM reasoning.
53+
Reach for the code interpreter when the answer requires deterministic computation that a language model can't produce reliably by reasoning alone.
54+
Typical cases include:
55+
56+
- Parsing a CSV or JSON file the user uploaded.
57+
- Computing summary statistics or running a quick simulation.
58+
- Converting between formats (Parquet, JSON, CSV).
59+
- Generating a plot from query results.
5060

51-
Avoid it for tasks the model can answer directly. Code execution adds latency and consumes quota.
61+
:::tip
62+
Avoid it for tasks the model can already answer from context.
63+
Code execution adds latency and consumes quota.
64+
:::

docs/cloud/features/10_AI_ML/agents/builder/image-generation.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ doc_type: 'reference'
99
---
1010

1111
import BetaBadge from '@theme/badges/BetaBadge';
12+
import Image from '@theme/IdealImage';
13+
import toolsModal from '@site/static/images/cloud/agent-builder/tools-modal.png';
1214

1315
<BetaBadge/>
1416

1517
Image generation lets an agent produce new images from a text prompt or edit images the user has uploaded. The agent picks between generation and editing based on what was asked and the available context.
1618

17-
## Enable it {#enable-it}
19+
## Enable image generation {#enable-it}
1820

19-
Toggle the image-generation tool in the Agent Builder's capabilities section. Some agents have access to multiple image providers (for example DALL-E and Flux); the agent picks the appropriate one or you can restrict it in instructions.
21+
Image generation is added through the **Add Tools** modal in the Agent Builder (not the Capabilities section). Click **Add Tools** at the bottom of the Agent Builder panel, then add one of the image-model tools — for example **OpenAI Image Tools**, **DALL-E-3**, or **Stable Diffusion**. The agent picks the appropriate one based on the request, or you can restrict it in instructions.
22+
23+
<Image img={toolsModal} alt="Agent Tools modal showing image-model integrations including OpenAI Image Tools, DALL-E-3, and Stable Diffusion alongside other third-party tools" size="md"/>
2024

2125
## Generation {#generation}
2226

docs/cloud/features/10_AI_ML/agents/builder/index.md

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,27 @@ slug: /cloud/features/ai-ml/agents/builder
44
title: 'Agent Builder'
55
description: 'Create and configure ClickHouse Agents in the Agent Builder'
66
keywords: ['AI', 'ClickHouse Cloud', 'agents', 'agent builder', 'tools', 'instructions']
7-
doc_type: 'reference'
7+
doc_type: 'landing-page'
88
---
99

1010
import BetaBadge from '@theme/badges/BetaBadge';
1111

1212
<BetaBadge/>
1313

14-
The Agent Builder is where you create and configure agents. It opens as a side panel in the Cloud console.
14+
The Agent Builder is where you create and configure agents.
1515

16-
The panel has three sections:
16+
:::tip New to ClickHouse Agents?
17+
Start with the [Quickstart](/cloud/features/ai-ml/agents/quickstart). The pages below cover each part of the builder in detail.
18+
:::
1719

18-
- **Identity** at the top — name, description, avatar, and the instructions field (the system prompt).
19-
- **Model configuration** in the middle — provider, model, and generation parameters.
20-
- **Capabilities** at the bottom — the tools, MCP servers, skills, and subagents you attach.
20+
This section covers each part of the Agent Builder and contains the following pages:
2121

22-
Save from the footer button. Edits take effect on the next conversation; in-flight runs aren't interrupted.
23-
24-
## Identity {#identity}
25-
26-
The instructions field is the agent's system prompt. Describe the role, the kinds of questions it should answer, and any rules it must follow. Be specific about schema conventions, calculated metrics, and terminology if the agent will query your ClickHouse service — the model can't infer your business definitions on its own.
27-
28-
## Core configuration {#core-configuration}
29-
30-
- [Model parameters](/cloud/features/ai-ml/agents/builder/model-parameters) — Pick a model and tune generation parameters. Save a configuration as a named preset to reuse it.
31-
32-
## Built-in tools {#built-in-tools}
33-
34-
- [Code interpreter](/cloud/features/ai-ml/agents/builder/code-interpreter) — Sandboxed code execution.
35-
- [Web search](/cloud/features/ai-ml/agents/builder/web-search) — Public-web lookups.
36-
- [Image generation](/cloud/features/ai-ml/agents/builder/image-generation) — Generate images from text.
37-
- [Vision](/cloud/features/ai-ml/agents/builder/vision) — Accept image inputs.
38-
39-
## Extensibility {#extensibility}
40-
41-
- [MCP servers](/cloud/features/ai-ml/agents/builder/mcp-servers) — Attach third-party MCP servers to an agent.
42-
- [Skills](/cloud/features/ai-ml/agents/builder/skills) — Reusable instruction packs.
43-
- [Subagents](/cloud/features/ai-ml/agents/builder/subagents) — Delegate work to child agents.
22+
| Page | Description |
23+
|------|-------------|
24+
| [Code interpreter](/cloud/features/ai-ml/agents/builder/code-interpreter) | Sandboxed code execution. |
25+
| [Web search](/cloud/features/ai-ml/agents/builder/web-search) | Public-web lookups. |
26+
| [Image generation](/cloud/features/ai-ml/agents/builder/image-generation) | Generate images from text. |
27+
| [Vision](/cloud/features/ai-ml/agents/builder/vision) | Accept image inputs. |
28+
| [MCP servers](/cloud/features/ai-ml/agents/builder/mcp-servers) | Attach third-party MCP servers to an agent. |
29+
| [Skills](/cloud/features/ai-ml/agents/builder/skills) | Reusable instruction packs. |
30+
| [Subagents](/cloud/features/ai-ml/agents/builder/subagents) | Delegate work to child agents. |

docs/cloud/features/10_AI_ML/agents/builder/mcp-servers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ ClickHouse Agents speaks Streamable HTTP — the production-grade MCP transport.
2828

2929
MCP servers can require credentials. ClickHouse Agents supports:
3030

31-
- **Bearer tokens** and other static headers fixed values you provide when configuring the server.
32-
- **OAuth 2.0** interactive flow. The first time you (or any user with access) calls a tool on the server, the browser opens a sign-in window; tokens are managed and refreshed automatically.
33-
- **Per-user credentials** variables in the server config substituted from the calling user's profile, so each user authenticates with their own identity rather than a shared service account.
31+
- **Bearer tokens** and other static headers - fixed values you provide when configuring the server.
32+
- **OAuth 2.0** - interactive flow. The first time you (or any user with access) calls a tool on the server, the browser opens a sign-in window; tokens are managed and refreshed automatically.
33+
- **Per-user credentials** - variables in the server config substituted from the calling user's profile, so each user authenticates with their own identity rather than a shared service account.
3434

3535
User-provided credentials are stored encrypted and scoped to the user who entered them. One user's credentials are never visible to another user's agent runs.
3636

docs/cloud/features/10_AI_ML/agents/builder/model-parameters.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,52 @@ title: 'Model parameters'
66
description: 'Configure model selection and generation parameters for ClickHouse Agents'
77
keywords: ['AI', 'ClickHouse Cloud', 'agents', 'model parameters', 'temperature', 'top-p', 'top-k', 'thinking', 'prompt caching']
88
doc_type: 'reference'
9+
draft: true
910
---
1011

1112
import BetaBadge from '@theme/badges/BetaBadge';
1213

1314
<BetaBadge/>
1415

15-
Model parameters control which model an agent uses and how that model generates responses. Configure them in the Agent Builder's **Model Parameters** panel.
16+
Model parameters control which model an agent uses and how that model generates responses.
17+
From the **Agent Builder** tab, click **Select a model** under the **Model** heading.
18+
This will open the **Model Parameters** window.
1619

1720
## Provider and model {#provider-and-model}
1821

19-
- **Provider** the upstream LLM provider.
20-
- **Model** the specific model from that provider. Different models have different strengths: large reasoning models for planning-heavy tasks, faster small models for routine queries.
22+
- **Provider** - select the upstream LLM provider.
23+
- **Model** - select the specific model from that provider. Different models have different strengths: large reasoning models for planning-heavy tasks, faster small models for routine queries.
2124

22-
Provider and model are required. The rest of the panel adapts based on what the selected model supports.
25+
Both **Provider** and **Model** are required. The rest of the panel adapts based on what the selected model supports.
2326

2427
## Context and output limits {#context-and-output-limits}
2528

26-
- **Max Context Tokens** caps total context the agent sends to the model. Leave as **System** to use the model's default. Lower it to reduce cost; raise it for agents that need to reason over large inputs.
27-
- **Max Output Tokens** caps the size of the agent's response. **System** uses the model's default. Set lower if responses are too long, higher if they're being cut off.
28-
- **File Token Limit** caps how many tokens a single uploaded file contributes to context. Useful when users attach large files and you don't want them to crowd out the rest of the conversation.
29+
- **Max Context Tokens** - caps total context the agent sends to the model. Leave as **System** to use the model's default. Lower it to reduce cost; raise it for agents that need to reason over large inputs.
30+
- **Max Output Tokens** - caps the size of the agent's response. **System** uses the model's default. Set lower if responses are too long, higher if they're being cut off.
31+
- **File Token Limit** - caps how many tokens a single uploaded file contributes to context. Useful when users attach large files and you don't want them to crowd out the rest of the conversation.
2932

3033
## Sampling {#sampling}
3134

32-
- **Temperature** randomness. Higher values (0.7–1.0) = more random, while lower values (0.0–0.3) = more focused and deterministic. We recommend altering this or Top P but not both.
33-
- **Top P** nucleus sampling. Changes how the model selects tokens for output.
34-
- **Top K** restricts sampling to the top K most likely tokens at each step. Supported by some providers; controls determinism along a different axis than temperature.
35+
- **Temperature** - randomness. Higher values (0.7–1.0) = more random, while lower values (0.0–0.3) = more focused and deterministic. We recommend altering this or Top P but not both.
36+
- **Top P** - nucleus sampling. Changes how the model selects tokens for output.
37+
- **Top K** - restricts sampling to the top K most likely tokens at each step. Supported by some providers; controls determinism along a different axis than temperature.
3538

36-
If you're not tuning for a specific behavior, leave the sliders near their defaults small changes here rarely move the needle and large ones can degrade output quality.
39+
If you're not tuning for a specific behavior, leave the sliders near their defaults as small changes rarely move the needle and large ones can degrade output quality.
3740

3841
## Reasoning controls {#reasoning-controls}
3942

4043
Available on models that expose extended reasoning. The exact set varies by provider.
4144

42-
- **Thinking** toggles the model's extended reasoning mode. When on, the model produces internal thinking tokens before its final answer; this usually improves accuracy on hard tasks at the cost of latency and tokens.
43-
- **Thinking Budget** token budget for the thinking phase. The model stops thinking and answers once it has spent this many tokens.
44-
- **Effort** high-level reasoning effort dial (**Auto**, low, medium, high). Used by reasoning models that don't expose a thinking-token budget directly.
45-
- **Thought Visibility** controls whether the model's thinking is shown to the user inline, hidden behind a collapsed view, or omitted entirely.
45+
- **Thinking** - this toggles the model's extended reasoning mode. When on, the model produces internal thinking tokens before its final answer; this usually improves accuracy on hard tasks at the cost of latency and tokens.
46+
- **Thinking Budget** - sets a token budget for the thinking phase. The model stops thinking and answers once it has spent this many tokens.
47+
- **Effort** - high-level reasoning effort dial (**Auto**, low, medium, high). Used by reasoning models that don't expose a thinking-token budget directly.
48+
- **Thought Visibility** - this controls whether the model's thinking is shown to the user inline, hidden behind a collapsed view, or omitted entirely.
4649

4750
## Conversation behavior {#conversation-behavior}
4851

49-
- **Resend Files** when on, files attached in earlier turns are re-sent on every subsequent turn so the model doesn't lose track of them. Turn off to save tokens if the conversation is short or the model is summarizing files as it goes.
50-
- **Use Prompt Caching** when supported by the provider, caches reusable parts of the prompt to reduce cost and latency on conversations where instructions and tool descriptions repeat across turns.
51-
- **Web Search** toggles provider-native web search on supported models. This is distinct from the [Web search tool](/cloud/features/ai-ml/agents/builder/web-search), which runs as one of the agent's tools rather than as a provider capability.
52+
- **Resend Files** - when on, files attached in earlier turns are re-sent on every subsequent turn so the model doesn't lose track of them. Turn off to save tokens if the conversation is short or the model is summarizing files as it goes.
53+
- **Use Prompt Caching** - when supported by the provider, caches reusable parts of the prompt to reduce cost and latency on conversations where instructions and tool descriptions repeat across turns.
54+
- **Web Search** - toggles provider-native web search on supported models. This is distinct from the [Web search tool](/cloud/features/ai-ml/agents/builder/web-search), which runs as one of the agent's tools rather than as a provider capability.
5255

5356
## Reset {#reset}
5457

docs/cloud/features/10_AI_ML/agents/builder/skills.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,20 @@ When asked to generate a revenue report:
4040

4141
The frontmatter knobs that matter most:
4242

43-
- **`name`** kebab-case identifier.
44-
- **`description`** short summary used by the model to decide when this skill is relevant. Treat this as the most important field. Write it specifically; vague descriptions lead to wrong-skill invocations.
45-
- **`always-apply`** when `true`, the skill is primed into every turn instead of being selected. Use sparingly; always-apply skills consume context on every message.
46-
- **`user-invocable`** when `true` (the default), the skill appears in the `$` popover for manual selection.
43+
- **`name`** - kebab-case identifier.
44+
- **`description`** - short summary used by the model to decide when this skill is relevant. Treat this as the most important field. Write it specifically; vague descriptions lead to wrong-skill invocations.
45+
- **`always-apply`** - when `true`, the skill is primed into every turn instead of being selected. Use sparingly; always-apply skills consume context on every message.
46+
- **`user-invocable`** - when `true` (the default), the skill appears in the `$` popover for manual selection.
4747

4848
You can bundle supporting files alongside the skill — reference docs, sample queries, small scripts — by uploading a `.zip` containing the `SKILL.md` and its assets.
4949

5050
## Use a skill {#use-a-skill}
5151

5252
Three ways an agent reaches for a skill in a conversation:
5353

54-
- **User invocation** press `$` in the composer and pick the skill from the popover. The skill's content is primed for the next turn.
55-
- **Model auto-selection** based on the skill's `description`, the agent decides on its own when to apply it.
56-
- **Always-apply** primed on every turn for skills configured that way.
54+
- **User invocation** - press `$` in the composer and pick the skill from the popover. The skill's content is primed for the next turn.
55+
- **Model auto-selection** - based on the skill's `description`, the agent decides on its own when to apply it.
56+
- **Always-apply** - primed on every turn for skills configured that way.
5757

5858
## Manage skills {#manage-skills}
5959

docs/cloud/features/10_AI_ML/agents/builder/subagents.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ Use subagents to keep a parent agent focused. Long research passes, tool-heavy e
2020

2121
In the Agent Builder, open **Advanced settings** and toggle **Subagents**. Two more controls appear:
2222

23-
- **Allow self-spawn** when on, the agent can spawn copies of itself for parallel work. Useful for fan-out patterns (one parent, several identical workers).
24-
- **Additional subagents** pick specific other agents this parent is allowed to delegate to. The parent decides at runtime which subagent (if any) to call based on the task.
23+
- **Allow self-spawn** - when on, the agent can spawn copies of itself for parallel work. Useful for fan-out patterns (one parent, several identical workers).
24+
- **Additional subagents** - pick specific other agents this parent is allowed to delegate to. The parent decides at runtime which subagent (if any) to call based on the task.
2525

2626
Save. When the agent runs, it has a new tool available for invoking subagents.
2727

2828
## When a subagent helps {#when-a-subagent-helps}
2929

30-
- **Research subtasks** the parent decomposes a complex question, hands a slice to a subagent specialized for that slice, and synthesizes the responses.
31-
- **Tool-heavy passes** code interpreter sessions, multi-step web search loops, or anything that would consume the parent's context with intermediate tool output.
32-
- **Specialized review** one agent generates, another reviews, the reviewer's full reasoning stays in its own context window.
30+
- **Research subtasks** - the parent decomposes a complex question, hands a slice to a subagent specialized for that slice, and synthesizes the responses.
31+
- **Tool-heavy passes** - code interpreter sessions, multi-step web search loops, or anything that would consume the parent's context with intermediate tool output.
32+
- **Specialized review** - one agent generates, another reviews, the reviewer's full reasoning stays in its own context window.
3333

3434
Avoid subagents for trivial calls. The handoff adds latency and tokens.
3535

0 commit comments

Comments
 (0)