Skip to main content
在本指南中,你将学习如何构建一个 Agno AI 智能体,并借助 ClickHouse MCP 服务器ClickHouse SQL playground 交互。
示例 notebook你可以在 examples repository 中找到这个示例 notebook。

前置条件

  • 你的系统上需要已安装 Python。
  • 你的系统上需要已安装 pip
  • 你需要 Anthropic API key,或其他 LLM 提供商的 API key。
你可以在 Python REPL 中或通过脚本运行以下步骤。
1

安装库

运行以下命令安装 Agno 库:
2

设置凭证

接下来,您需要提供您的 Anthropic API 密钥:
Response
使用其他 LLM 提供商如果你没有 Anthropic API 密钥,但想使用其他 LLM 提供商, 可以在 Agno 文档中查看设置凭据的说明。
接下来,定义连接 ClickHouse SQL playground 所需的凭据:
3

初始化 MCP 服务器和 Agno agent

现在将 ClickHouse MCP 服务器配置为指向 ClickHouse SQL playground, 并初始化 Agno agent,然后向它提一个问题:
Response
最后修改于 2026年7月23日