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

# 快速入门

> 构建并运行首个连接到 ClickHouse Cloud 服务的 ClickHouse Agent

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

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>;
};

在 Cloud 控制台中创建自定义智能体，并针对您的服务执行自然语言查询。

<div id="prerequisites">
  ## 前置条件
</div>

* 一个可供查询的 ClickHouse Cloud 服务。
* 智能体构建器中有 **创建智能体** 选项。若未显示，请让组织管理员按照[共享与访问](/zh/products/cloud/features/ai-ml/agents/sharing-and-access)中的说明，通过管理员设置授予创建智能体的权限。

<div id="build-the-agent">
  ## 构建智能体
</div>

<Steps>
  <Step>
    ### 启动 ClickHouse 智能体

    在你的 Cloud 服务中，点击左侧边栏中的 **ClickHouse 智能体**，打开智能体启动页。点击 **Launch ClickHouse 智能体** 以打开智能体构建器。

    <Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/huP88Vza7bEG09HU/images/cloud/agent-builder/launch-ch-agents.png?fit=max&auto=format&n=huP88Vza7bEG09HU&q=85&s=eb003c363ea35ae4b3a128e7c05aa0f7" alt="Cloud 服务导航中已选中 ClickHouse 智能体（Beta），显示带有 Launch ClickHouse 智能体 按钮的启动页" size="lg" width="3836" height="1938" data-path="images/cloud/agent-builder/launch-ch-agents.png" />
  </Step>

  <Step>
    ### 创建智能体

    在智能体构建器中，点击左侧面板顶部的 **Create New Agent**。填写以下核心字段：

    * **Name** - 智能体的简短标识。
    * **Description** - 对智能体用途的说明，团队成员可以看到。
    * **Category** - 智能体所属的类别。除非你的组织定义了自定义类别，否则保留为 `General` 即可。
    * **Instructions** - 系统提示，用于说明智能体的角色、应回答的问题以及必须遵循的业务规则。
    * **Model** - 从下拉列表中选择模型。在[模型参数](/zh/products/cloud/features/ai-ml/agents/builder/model-parameters)中调整 temperature 和其他生成设置。

    <Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/huP88Vza7bEG09HU/images/cloud/agent-builder/agent-builder.png?fit=max&auto=format&n=huP88Vza7bEG09HU&q=85&s=d0b3a2968764d7409ca639eb0f338d59" alt="智能体构建器面板，显示 Create New Agent 下拉菜单、表单字段（Name、Description、Category、Instructions、Model）以及 Capabilities 部分" size="lg" width="3834" height="1932" data-path="images/cloud/agent-builder/agent-builder.png" />
  </Step>

  <Step>
    ### 附加能力和工具

    智能体的能力和工具分布在两个位置。

    主面板中的 **Capabilities** —— 包括 [Run Code](/zh/products/cloud/features/ai-ml/agents/builder/code-interpreter)、[网页搜索](/zh/products/cloud/features/ai-ml/agents/builder/web-search)、File Context、制品、[MCP Servers](/zh/products/cloud/features/ai-ml/agents/builder/mcp-servers) 和[技能](/zh/products/cloud/features/ai-ml/agents/builder/skills)等第一方功能。打开智能体所需的开关即可。

    <Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/huP88Vza7bEG09HU/images/cloud/agent-builder/capabilities.png?fit=max&auto=format&n=huP88Vza7bEG09HU&q=85&s=377d128f77dee49749200261eee7a2c3" alt="智能体构建器面板中的 Capabilities 部分，显示 Run Code、Web Search、File Context、Artifacts、MCP Servers 和 Skills 开关" size="sm" width="616" height="1412" data-path="images/cloud/agent-builder/capabilities.png" />

    面板底部 **Add Tools** 按钮中的 **Tools** —— 包括[图像生成](/zh/products/cloud/features/ai-ml/agents/builder/image-generation)、[视觉](/zh/products/cloud/features/ai-ml/agents/builder/vision)、搜索 API 以及外部服务等第三方集成。

    <Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/huP88Vza7bEG09HU/images/cloud/agent-builder/tools-button.png?fit=max&auto=format&n=huP88Vza7bEG09HU&q=85&s=4b18f52a2aa9663c09cc719e6bdffffb" alt="智能体构建器面板底部，突出显示 Add Tools 按钮" size="sm" width="596" height="836" data-path="images/cloud/agent-builder/tools-button.png" />

    点击 **Add Tools** 浏览目录：

    <Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/huP88Vza7bEG09HU/images/cloud/agent-builder/tools-modal.png?fit=max&auto=format&n=huP88Vza7bEG09HU&q=85&s=80cb90aa3290765aeb07f2f9b7420c80" alt="Agent Tools 模态框，显示第三方集成网格，包括 Google、OpenAI Image Tools、Wolfram、DALL-E-3、Tavily Search、Calculator 和 Stable Diffusion" size="lg" width="2560" height="1280" data-path="images/cloud/agent-builder/tools-modal.png" />

    [子智能体](/zh/products/cloud/features/ai-ml/agents/builder/subagents)在 **Advanced settings** 下配置——详情请参阅子智能体页面。

    你可以随时更改已附加的能力和工具。
  </Step>

  <Step>
    ### 运行查询

    保存智能体，打开一个新对话，然后从智能体选择器中选择你的智能体。输入一个问题——例如，*"本周按行数统计，排在前 10 的表有哪些？"*——智能体会先进行规划，再按需调用工具并返回答案。

    <Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/huP88Vza7bEG09HU/images/cloud/agent-builder/chat-query.png?fit=max&auto=format&n=huP88Vza7bEG09HU&q=85&s=d55ce37870027c47d6f71d90585cd09e" alt="聊天记录显示问题“本周按行数统计，排在前 10 的表有哪些？”以及智能体的响应——一个按行数对各服务前 10 张表进行排名的 Markdown 表格，下方还有 Key Observations" size="lg" width="2722" height="1882" data-path="images/cloud/agent-builder/chat-query.png" />
  </Step>
</Steps>

<div id="next-steps">
  ## 后续步骤
</div>

* 与队友共享[该智能体](/zh/products/cloud/features/ai-ml/agents/sharing-and-access)。
* 该智能体达到稳定版本后，将其发布到[市场](/zh/products/cloud/features/ai-ml/agents/marketplace)。
